SocketDrop is a lightweight real-time file sharing app built with Java and Spring Boot.
Users connect via WebSockets, join rooms, and share files with live progress updates — without authentication or a database.
- WebSocket-based real-time communication
- Room-based file sharing
- File upload, download, and delete via HTTP
- Live transfer progress updates
- QR-code based room join (URL)
- In-memory storage only
POST /file/uploads(multipartfile, optionalroomIdfor progress broadcast)GET /file/downloads/{fileId}DELETE /file/downloads/{fileId}
- Client messages:
{ "type": "CREATE_ROOM", "displayName": "alice" }{ "type": "JOIN_ROOM", "roomId": "room_x", "displayName": "bob" }{ "type": "LEAVE_ROOM" }
- Server messages:
ROOM_CREATEDROOM_JOINEDUPLOAD_PROGRESS(STARTED,COMPLETED,FAILED)ERROR
- Static single-page UI is available at
/viasrc/main/resources/static/index.html. - Assets:
src/main/resources/static/app.jssrc/main/resources/static/styles.css
- Supports create/join/leave room, room-scoped upload, room-authorized download, and delete.
- Java 17
- Spring Boot
- Spring WebSocket
- Spring Web (REST)
- Maven
- No authentication
- No database
- Designed for learning and demonstration purposes
docker build -t socket-drop:latest .
docker run --rm -p 8080:8080 -v socket_drop_storage:/app/storage socket-drop:latestdocker compose up --buildSPRING_FILE_BASE_PATH(default:/app/storage)SPRING_FILE_MAX_SIZE(default in app:524288000)SPRING_FILE_MAX_DOWNLOAD_SIZE(default in app:52428800)SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE(default:50MB)SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE(default:50MB)
Prince Pal
Created by Prince Pal with love.