{
  "id": 11836238,
  "title": "I Built a QR-Code File Transfer App with Spring Boot and Vanilla JavaScript",
  "url": "https://urgent.news/2026/10/04/i-built-a-qr-code-file-transfer-app-with-spring-boot-and-vanilla",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-04T03:43:52.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/arshisabah/i-built-a-qr-code-file-transfer-app-with-spring-boot-and-vanilla-javascript-kem"
  },
  "original_language": "en",
  "account": "Imagine being able to transfer a file between two devices without any cables, Bluetooth or cloud storage - just a screen and a camera. That's the concept behind QR File Transfer, a small project I developed using Spring Boot, MySQL and plain JavaScript. The sender displays a stream of QR codes on their screen while the receiver scans them with a camera to rebuild the original file.\n\nTo send a file, all you need is a browser and a device. The sender chooses a file, the browser creates a transfer and gets back an ID like TRF-K7M2QX. The file is broken into 400-byte chunks, each encoded in base64 and wrapped in JSON before being turned into a QR code. The receiver types the transfer ID, enables the camera and scans the screen. As every chunk is scanned, they check the reconstructed file size and can then download the file. Once the receiver marks the transfer as completed, the sender's screen stops showing codes.\n\nThe backend only stores metadata about the transfer - name, size, type, chunk count and status. No actual file data ever passes through the system. The architecture is simple: Java 17, Spring Boot 3.3, Spring Data JPA and MySQL handle the backend, while the frontend consists of HTML, CSS and vanilla JavaScript. QR code generation and scanning are handled by the qrcode and jsQR libraries respectively.\n\nThe backend exposes three REST endpoints: POST /api/transfers creates a new transfer, GET /api/transfers/{id} retrieves transfer details and PUT /api/transfers/{id}/status updates the transfer status. Each QR code carries information about its chunk index, total chunks, data and its base64 encoding.\n\nSome lessons learned from testing this include chunk size considerations - smaller 400-byte chunks work better than the initial 2048-byte chunks. Looping through QR codes until the receiver signals completion instead of stopping after the first scan helps handle missed frames. Phone cameras generally require HTTPS access, so plain HTTP connections are blocked. Finally, always validate input from the camera as QR codes can contain untrusted data.\n\nTo try it out, clone the repository from GitHub, run the backend with Maven and open the provided HTML files in a browser. This project is currently limited in size (max 1MB) and speed (around 400 bytes every 1.8 seconds), but future improvements could include encryption, more efficient chunk transmission and automatic expirations. If you have suggestions or find bugs, feel free to contribute to the project.",
  "summary": "What if you could send a file from one device to another with no cable, no Bluetooth and no cloud upload, using only a screen and a camera? That was the idea behind QR File Transfer , a small project I built with Spring Boot, MySQL and plain JavaScript. The sender's screen plays a stream of QR codes, and the receiver's camera scans them and rebuilds the file. arshisabah / QR-File-Transfer-System…",
  "key_points": [
    "QR File Transfer app developed using Spring Boot and vanilla JavaScript",
    "File broken into 400-byte chunks, encoded in base64 and QR codes",
    "Receiver scans QR codes with camera, reconstructs and downloads file"
  ],
  "editors_take": "This development showcases a novel use of QR codes for file transfer, highlighting the potential for device-to-device interactions without relying on traditional connectivity methods or cloud storage.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}