{"id":26402451,"url":"https://github.com/satwikmishra1107/apdofile","last_synced_at":"2026-04-05T22:33:37.058Z","repository":{"id":282568023,"uuid":"947435459","full_name":"satwikmishra1107/APdoFile","owner":"satwikmishra1107","description":"A distributed file storage solution leveraging Discord as the backend. Upload files of any size, which are chunked, hashed, and distributed across Discord servers. Only metadata is stored locally, providing unlimited storage without infrastructure costs. Built with React, Tailwind CSS, and Firebase.","archived":false,"fork":false,"pushed_at":"2025-03-15T13:39:37.000Z","size":328,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T14:22:49.375Z","etag":null,"topics":["aws-ec2","expressjs","firebase","javascript","nodejs","reactjs","shadcn-ui","typescript"],"latest_commit_sha":null,"homepage":"http://3.7.162.84/","language":"TypeScript","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/satwikmishra1107.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}},"created_at":"2025-03-12T17:23:38.000Z","updated_at":"2025-03-15T13:39:41.000Z","dependencies_parsed_at":"2025-03-15T14:22:53.568Z","dependency_job_id":"05fcb270-c6ac-4317-aad1-2031763efa97","html_url":"https://github.com/satwikmishra1107/APdoFile","commit_stats":null,"previous_names":["satwikmishra1107/apdofile"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satwikmishra1107%2FAPdoFile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satwikmishra1107%2FAPdoFile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satwikmishra1107%2FAPdoFile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satwikmishra1107%2FAPdoFile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/satwikmishra1107","download_url":"https://codeload.github.com/satwikmishra1107/APdoFile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056432,"owners_count":20390720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aws-ec2","expressjs","firebase","javascript","nodejs","reactjs","shadcn-ui","typescript"],"created_at":"2025-03-17T15:18:52.330Z","updated_at":"2026-04-05T22:33:36.850Z","avatar_url":"https://github.com/satwikmishra1107.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# APDO-FILE\n\n[![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Fira+Code\u0026weight=600\u0026size=25\u0026duration=1000\u0026pause=1000\u0026color=F7F7F7\u0026width=700\u0026lines=Distributed+File+Storage+System+Using+Discord)](https://git.io/typing-svg)\n---\nOriginal Data of [APdoFile](https://github.com/satwikmishra1107/APdoFile/blob/main/README.md) Updated by [Pome](https://github.com/satwikmishra1107) \u003cimg src=\"https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Smilies/Green%20Heart.png\" alt=\"Green Heart\" width=\"30\" height=\"30\" /\u003e\n\nAPDO-FILE is an innovative file storage solution that leverages Discord as a backend storage service while maintaining file integrity and accessibility through a modern web interface.\n\n### 🚀 Features\n\n- **Unlimited Storage**: Store files of any size by chunking them into smaller pieces\n- **Secure File Handling**: Each file chunk is hashed to ensure data integrity\n- **Zero Server Storage**: Your files are distributed across Discord servers, not on our infrastructure\n- **Easy Retrieval**: Download your files whenever you need them\n- **Modern UI**: Built with React, Tailwind CSS, and shadcn/ui components\n\n### 💻 Tech Stack\n\n- **Frontend**: React with Vite, Tailwind CSS, shadcn/ui\n- **Authentication**: Firebase for secure user login/signup\n- **Backend**: Custom Node.js server for file processing\n- **Storage**: Discord API for distributed file storage\n- **Deployment**: AWS EC2\n\n### 🛠️ How It Works\n\n1. Upload any file through the intuitive UI\n2. Our system breaks the file into manageable chunks\n3. Each chunk is uploaded to Discord with a unique hash identifier\n4. Only metadata (filename, size, hash) is stored in our database\n5. When you need your file, the system retrieves and reassembles all chunks\n\n### 🔒 Privacy \u0026 Security\n\nYour files are securely distributed with hash verification to ensure complete data integrity. We store minimal metadata while the actual file content is fragmented across Discord's infrastructure.\n\n### 🌐 Deployment\n\nThe entire system is deployed on AWS EC2, ensuring reliability and accessibility.\n\n### 🚀 Getting Started\n\n#### Prerequisites\n- Node.js (v16+)\n- npm or yarn\n- Firebase account\n- Discord bot token with proper permissions\n\n#### Installation\n\n1. Clone the repository\n```bash\ngit clone https://github.com/yourusername/APDO-FILE.git\ncd APDO-FILE\n```\n2. Install dependencies\n```bash\nnpm install\n# or\nyarn install\n```\n3. Configure environment variables\n```bash\ncp .env.example .env\n```\nEdit the .env file with your Firebase and Discord credentials.\n\n4. Start the development server\n```bash\nnpm run dev\n# or\nyarn dev\n```\n5. Build for production\n```bash\nnpm run build\n# or\nyarn build\n```\n\n### 🔧 Configuration\n\n#### Firebase Setup\n1. Create a Firebase project at [Firebase Console](https://console.firebase.google.com/)\n2. Enable Authentication with Email/Password method\n3. Create a Firestore database\n4. Add your Firebase configuration to `firebaseConfig.ts`:\n\n```typescript\nexport const firebaseConfig = {\n apiKey: \"YOUR_API_KEY\",\n authDomain: \"your-project.firebaseapp.com\",\n projectId: \"your-project-id\",\n storageBucket: \"your-project.appspot.com\",\n messagingSenderId: \"YOUR_MESSAGING_SENDER_ID\",\n appId: \"YOUR_APP_ID\"\n};\n```\n\nDiscord Bot Setup\n\n1. Create a Discord application at Discord Developer Portal\n2. Create a bot for your application and copy the token\n3. Invite the bot to your server with proper permissions\n4. Configure the bot token in your .env file:\n\n```\nDISCORD_BOT_TOKEN=your_bot_token_here\nDISCORD_CHANNEL_ID=your_channel_id_here\n```\n\n### 🛠️ File Processing\nThe system processes files in the following way:\n\nFiles are chunked into smaller pieces (default 8MB per chunk)\nEach chunk is assigned a unique hash using SHA-256\nChunks are uploaded to Discord with metadata\nUpon retrieval, chunks are downloaded and reassembled based on the stored hashes\n\n### 📁 Project Structure\n\n```\nAPDO-FILE/\n├── server/           # Backend server code\n│   ├── app.js        # Main server file\n│   ├── chunk.js      # File chunking logic\n│   └── retrieve.js   # File retrieval logic\n├── src/              # Frontend source code\n│   ├── components/   # UI components\n│   ├── context/      # React context providers\n│   └── lib/          # Utility functions\n├── .env              # Environment variables\n└── README.md         # Project documentation\n```\n\n### 🧩 API Endpoints\n\n`POST /api/upload` - Upload a file\n`GET /api/files` - List all user files\n`GET /api/download/:fileId` - Download a specific file\n`DELETE /api/files/:fileId` - Delete a file\n\n### 🤝 Contributing\nContributions are welcome! Please feel free to submit a Pull Request.\n\nFork the repository\nCreate your feature branch (git checkout -b feature/amazing-feature)\nCommit your changes (git commit -m 'Add some amazing feature')\nPush to the branch (git push origin feature/amazing-feature)\nOpen a Pull Request\n\n### 📜 License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n### 🙏 Acknowledgments\n\nDiscord for providing the infrastructure that makes this possible\nFirebase for authentication and database services\nThe shadcn/ui team for their beautiful UI components\n\n### 📊 Performance Considerations\n\n#### File Size Handling\n- Small files (\u003c10MB): Uploaded as a single chunk for efficiency\n- Medium files (10-100MB): Split into multiple chunks, processed in parallel\n- Large files (\u003e100MB): Chunked with progress tracking and resumable uploads\n\n#### Network Optimization\n- Implements retry logic for failed chunk uploads\n- Uses concurrent uploads for faster processing\n- Throttles requests to avoid Discord API rate limits\n\n### 🔐 Security Features\n\n- Client-side encryption option for sensitive files\n- Secure hash verification to prevent tampering\n- OAuth 2.0 authentication flow with Firebase\n- No file data stored on centralized servers\n\n### 🖥️ Deployment Guide\n\n#### AWS EC2 Setup\n1. Launch an EC2 instance (t2.micro is sufficient for most use cases)\n2. Configure security groups to allow HTTP/HTTPS traffic\n3. Install Node.js and npm on the instance\n\n```bash\nsudo apt update\nsudo apt install nodejs npm\n```\n4. Clone the repository and install dependencies\n```bash\nClone the repository and install dependencies\n```\n\n5. Set up environment variables and start the application\n```bash\nbashCopycp .env.example .env\nnano .env  # Edit environment variables\nnpm run build\nnpm start\n```\n6. (Optional) Set up PM2 for process management\n```bash\nbashCopysudo npm install -g pm2\npm2 start npm --name \"apdo-file\" -- start\npm2 startup\npm2 save\n```\n### 📱 Mobile Support\nThe application is fully responsive and works on:\n\nDesktop browsers (Chrome, Firefox, Safari, Edge)\nMobile browsers (iOS Safari, Android Chrome)\nTablets and other devices\n\n### 🗺️ Roadmap\n\n Desktop application using Electron\n Mobile app using React Native\n End-to-end encryption\n Multiple storage backend options (beyond Discord)\n File sharing capabilities\n Team/organization accounts\n\n### ⚙️ Advanced Configuration\nFor advanced users, additional configuration options are available in config.ts:\n\n```typescript\nexport const config = {\n  chunkSize: 8 * 1024 * 1024, // 8MB chunks by default\n  maxConcurrentUploads: 3,\n  retryAttempts: 5,\n  retryDelay: 2000, // ms\n  hashAlgorithm: 'SHA-256',\n  compressionEnabled: true,\n  // Add your custom configuration here\n};\n```\n### 📊 Analytics\nOptional anonymous usage statistics can be enabled to help improve the application. No file data is ever collected, only performance metrics and feature usage patterns.\n\n*APDO-FILE: The distributed storage solution for the modern web*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatwikmishra1107%2Fapdofile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsatwikmishra1107%2Fapdofile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatwikmishra1107%2Fapdofile/lists"}