{"id":29820605,"url":"https://github.com/imjhaji03/datadrop-file-sharing-system","last_synced_at":"2026-04-14T06:03:12.329Z","repository":{"id":303954304,"uuid":"1017280370","full_name":"imjhaji03/Datadrop-File-Sharing-System","owner":"imjhaji03","description":"A file-sharing system that allows users to directly share and download files without relying on a central server. Built with networking protocols, the system ensures efficient, secure, and scalable file transfers between peers.","archived":false,"fork":false,"pushed_at":"2026-03-27T09:23:38.000Z","size":336,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T20:37:40.226Z","etag":null,"topics":["docker","java","maven","nextjs13","nginx","socket-programming","vps"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imjhaji03.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-10T09:43:21.000Z","updated_at":"2026-03-27T09:23:42.000Z","dependencies_parsed_at":"2025-07-10T18:08:39.845Z","dependency_job_id":null,"html_url":"https://github.com/imjhaji03/Datadrop-File-Sharing-System","commit_stats":null,"previous_names":["imjhaji03/datadrop-file-sharing-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imjhaji03/Datadrop-File-Sharing-System","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjhaji03%2FDatadrop-File-Sharing-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjhaji03%2FDatadrop-File-Sharing-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjhaji03%2FDatadrop-File-Sharing-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjhaji03%2FDatadrop-File-Sharing-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imjhaji03","download_url":"https://codeload.github.com/imjhaji03/Datadrop-File-Sharing-System/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjhaji03%2FDatadrop-File-Sharing-System/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31784255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","java","maven","nextjs13","nginx","socket-programming","vps"],"created_at":"2025-07-28T23:01:11.477Z","updated_at":"2026-04-14T06:03:12.323Z","avatar_url":"https://github.com/imjhaji03.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\r\n  \u003ch1 align=\"center\"\u003eDatadrop\u003c/h1\u003e\r\n  \u003cp align=\"center\"\u003e\r\n    Simple, secure, and direct peer-to-peer file sharing.\r\n    \u003cbr /\u003e\r\n    Connect \u0026 Share. No cloud, no intermediaries.\r\n  \u003c/p\u003e\r\n\u003c/p\u003e\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003c!-- Badges for technologies --\u003e\r\n  \u003cimg src=\"https://img.shields.io/badge/Java-11%2B-blue.svg?logo=java\u0026logoColor=white\" alt=\"Java 11+\"\u003e\r\n  \u003cimg src=\"https://img.shields.io/badge/Next.js-13%2B-black.svg?logo=next.js\u0026logoColor=white\" alt=\"Next.js\"\u003e\r\n  \u003cimg src=\"https://img.shields.io/badge/PM2-Process_Manager-green.svg?logo=node.js\u0026logoColor=white\" alt=\"PM2\"\u003e\r\n  \r\n\u003c/p\u003e\r\n\r\n## ✨ Showcase\r\n\r\nDatadrop provides a clean and seamless experience for sharing files directly between any two devices with a web browser. The process is simple: select a file, share the code, and download.\r\n\r\n|                 1. Select a File \u0026 Get Invite Code                 | 2. Receive \u0026 Download on Any Device |\r\n|:------------------------------------------------------------------:| :---: |\r\n| \u003cimg src=\"images/Desktop Share View.png\" alt=\"Desktop Share View\"\u003e | \u003cimg src=\"images/Mobile Receive View.jpg\" alt=\"Mobile Receive View\"\u003e |\r\n\r\n## 🚀 Features\r\n\r\n-   **Direct Datadrop Transfer**: Files are sent directly from the sender to the receiver, ensuring privacy and speed.\r\n-   **Simple Invite Codes**: Share files easily using a temporary, system-generated invite code.\r\n-   **Drag \u0026 Drop UI**: Modern, responsive interface for an effortless user experience.\r\n-   **No File Size Limits**: Your transfer capacity is only limited by your own network.\r\n-   **Cross-Platform**: Works on any OS with Java, Node.js, and a modern web browser.\r\n\r\n## 🛠️ Technology Stack\r\n\r\n-   **Backend**: Java (via Spring Boot) with Maven for dependency management.\r\n-   **Frontend**: Next.js, React, and Tailwind CSS for a modern, responsive UI.\r\n-   **Process Management**: PM2 for running the backend and frontend as persistent services on a server.\r\n\r\n## ⚙️ How It Works\r\n\r\nDatadrop uses a central Java server for coordination (i.e., \"handshaking\") but establishes a direct connection for the file transfer itself.\r\n\r\n1.  **File Upload (Sender)**: A user uploads a file. The UI sends a request to the Java backend. The backend starts a temporary file server on an available port and returns the port number as an **Invite Code**.\r\n2.  **File Sharing**: The sender shares the Invite Code with the receiver.\r\n3.  **File Download (Receiver)**: The receiver enters the code. Their browser connects **directly** to the sender's temporary file server to download the file. The central server is not involved in the transfer itself.\r\n\r\n## 📦 Getting Started\r\n\r\n### Prerequisites\r\n\r\n-   Java 11+ (JDK)\r\n-   Node.js 18+ and npm\r\n-   Maven 3.6+\r\n-   Docker (optional, for Docker-based setup)\r\n\r\n### Option 1: Quick Start Scripts (Easiest)\r\n\r\nThese scripts handle building the backend and launching both servers for you.\r\n\r\n**Linux/macOS:**\r\n```bash\r\n./start.sh\r\n```\r\n\r\n**Windows:**\r\n```bash\r\nstart.bat\r\n```\r\n\r\n### Option 2: Manual Setup\r\n\r\n**Backend (Terminal 1):**\r\n```bash\r\n# Build the Java project\r\nmvn clean package\r\n\r\n# Run the backend server\r\njava -jar target/Datadrop-1.0-SNAPSHOT.jar\r\n```\r\nThe backend server will start on port `8080`.\r\n\r\n**Frontend (Terminal 2):**\r\n```bash\r\n# Navigate to the UI directory\r\ncd ui\r\n\r\n# Install dependencies\r\nnpm install\r\n\r\n# Run the development server\r\nnpm run dev\r\n```\r\nThe frontend will be available at `http://localhost:3000`.\r\n\r\n## 🏗️ Deployment\r\n\r\nFor detailed instructions on deploying to a VPS, see [DEPLOYMENT.md](DEPLOYMENT.md).\r\n\r\nThe recommended method for a production environment is using **PM2**, a process manager for Node.js applications that can also manage the Java backend. This ensures that your services automatically restart if they crash.\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"images/PM2.png\" alt=\"PM2 Setup in Terminal\"\u003e\r\n  \u003cem\u003eDatadrop backend and frontend running as managed services with PM2.\u003c/em\u003e\r\n\u003c/p\u003e\r\n\r\n## 🔒 Security Considerations\r\n\r\nThis application is a proof-of-concept and does not include advanced security features.\r\n\r\n-   **No Encryption**: File data is transferred in plaintext. Do not use for sensitive information.\r\n-   **No Authentication**: Anyone with a valid Invite Code can initiate a download.\r\n-   For production use, consider implementing **end-to-end encryption (E2EE)** and robust network security policies.\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eView Low Level Design (LLD)\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n```mermaid\r\nclassDiagram\r\n%% --- Backend Components (Java / Spring Boot) ---\r\n    class DatadropApplication {\r\n        +main(String[] args)\r\n    }\r\n    class FileController {\r\n\u003c\u003cRest Controller\u003e\u003e\r\n+uploadFile(MultipartFile file, HttpServletRequest request)\r\n}\r\nclass FileService {\r\n\u003c\u003cService\u003e\u003e\r\n+startFileServer(MultipartFile file) int\r\n}\r\n\r\n%% --- Frontend Components (Next.js / React) ---\r\nclass HomePage {\r\n-file: File\r\n-shareInfo: object\r\n+handleFileSelect()\r\n+renderChildComponent()\r\n    }\r\nclass FileUpload {\r\n+handleDragDrop(event)\r\n+generateShareLink()\r\n}\r\nclass FileDownload {\r\n-inviteCode: string\r\n-senderIp: string\r\n+triggerDownload()\r\n}\r\n\r\n%% --- Key Data Structures ---\r\nclass ApiData {\r\n\u003c\u003cData Transfer Object\u003e\u003e\r\n+MultipartFile Request\r\n+string host\r\n+string inviteCode\r\n}\r\nclass Datadrop_Connection {\r\n\u003c\u003cHTTP Request\u003e\u003e\r\nDirect GET to http://\u003csender_ip\u003e:\u003cinvite_code\u003e\r\n}\r\n\r\n%% --- RELATIONSHIPS ---\r\nDatadropApplication ..\u003e FileController : \"Initializes\"\r\nHomePage --\u003e FileUpload : \"Displays\"\r\nHomePage --\u003e FileDownload : \"Displays\"\r\n\r\nFileUpload --|\u003e FileController : \"Makes API call to /api/upload\"\r\nFileController --\u003e FileService : \"Delegates to\"\r\n\r\n%% This shows the direct Datadrop link, not connected to the main server\r\nFileDownload ..\u003e Datadrop_Connection : \"Initiates direct download\"\r\n\r\n%% --- NOTES AND ANNOTATIONS ---\r\nnote for FileController \"Exposes the REST API endpoint for initiating a share. Returns the sender's IP and a port.\"\r\nnote for FileService \"Core logic: Finds an open port and starts a temporary HTTP server on the sender's machine to serve the file.\"\r\nnote for FileUpload \"Handles file selection via UI and calls the backend API to generate the share information.\"\r\nnote for Datadrop_Connection \"This is the direct data transfer. It's an HTTP request from the receiver's browser to the sender's temporary server, not the main backend.\"\r\n```\r\n\r\n\u003c/details\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimjhaji03%2Fdatadrop-file-sharing-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimjhaji03%2Fdatadrop-file-sharing-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimjhaji03%2Fdatadrop-file-sharing-system/lists"}