A secure, end-to-end encrypted data sharing platform built with Next.js, featuring anonymous file uploads, virus scanning, and ephemeral chat rooms. Files are automatically encrypted before upload and self-destruct after download or expiry.
- End-to-End Encryption: Files encrypted client-side using AES-256 before upload
 - Virus Scanning: Automatic malware detection using ClamAV integration
 - Self-Destructing Files: Automatic cleanup after download or expiry
 - Password Protection: Optional password-protected file links
 - Multi-File Support: Upload entire folders with preserved structure
 - Anonymous Sharing: No registration required
 - Download Limits: Configurable download count restrictions
 - Modern UI: Beautiful, responsive interface with dark/light themes
 
- Real-time Chat Rooms: Anonymous ephemeral chat rooms with auto-deletion
 - Collaborative Coding: Live collaborative code editing with custom cursors
 - Multi-language Support: JavaScript, TypeScript, Python, Java, C/C++, HTML/CSS, JSON, Markdown
 - Y.js Integration: Built on Y.js for reliable real-time collaboration
 - WebRTC Communication: Peer-to-peer communication for low latency
 - Code Synchronization: Automatic conflict resolution and synchronization
 - File Download: Download code files with proper extensions
 - Tabbed Interface: Switch between code editor and chat seamlessly
 
- Zero-Knowledge Architecture: Server cannot decrypt your files
 - Audit Logging: Comprehensive activity tracking
 - Rate Limiting: Protection against abuse
 - IP Tracking: Security monitoring without compromising privacy
 
- Frontend: Next.js 15, React 19, TypeScript
 - Styling: Tailwind CSS, Radix UI components
 - Backend: Next.js API Routes
 - Database: Supabase (PostgreSQL)
 - File Storage: Appwrite Cloud Storage
 - Encryption: AES-256 with crypto-js
 - Virus Scanning: ClamAV integration with appwrite ( inbuilt )
 - Real-time: Supabase real-time subscriptions for chat
 - Collaborative Coding: Y.js, y-monaco, y-webrtc, Monaco Editor
 - WebRTC: Peer-to-peer communication for low-latency collaboration
 
app/
โโโ page.tsx              # Landing page with animations
โโโ files/
โ   โโโ page.tsx          # File upload interface
โ   โโโ [id]/page.tsx     # File download/view page
โ   โโโ manage/[id]/      # File management interface
โโโ api/                  # Backend API routes
โโโ layout.tsx            # Root layout with theme provider
app/api/
โโโ files/
โ   โโโ upload/           # File upload with encryption
โ   โโโ download/[token]/ # Secure file download
โ   โโโ metadata/[token]/ # File metadata retrieval
โ   โโโ manage/[id]/      # File management operations
โโโ chat/rooms/create/    # Chat room creation
โโโ health/               # Health check endpoint
โโโ verify-hcaptcha/      # CAPTCHA verification
- Node.js 18+
 - pnpm (recommended) or npm
 - Supabase account
 - Appwrite account
 
git clone https://github.com/SinghAman21/silentparcel.git
cd silentparcelpnpm installCreate a .env.local file in the root directory:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Appwrite Configuration
NEXT_PUBLIC_APPWRITE_ENDPOINT=your_appwrite_endpoint
NEXT_PUBLIC_APPWRITE_PROJECT_ID=your_appwrite_project_id
APPWRITE_API_KEY=your_appwrite_api_key
NEXT_PUBLIC_APPWRITE_BUCKET_KEY=your_bucket_id
# Security Configuration
JWT_SECRET=your_jwt_secret_key  node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
ENCRYPTION_KEY=your_encryption_key   node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# File Configuration
ALLOWED_FILE_TYPES='jpg,jpeg,png,pdf,zip,txt,docx,mp4,mp3'
# Redis Configuration (optional, for rate limiting)
REDIS_URL=your_redis_url
Run the SQL script to create required tables:
# Connect to your Supabase database and run:
psql -h your_supabase_host -U postgres -d postgres -f scripts/setup-supabase.sql- Create a new project in Appwrite
 - Create a storage bucket named 
your-bucket-name - Set appropriate permissions for file upload/download
 - Generate API keys with necessary permissions
 
Install ClamAV for virus scanning:
# Ubuntu/Debian
sudo apt-get install clamav clamav-daemon
# macOS
brew install clamav
# Windows
# Download from https://www.clamav.net/downloadspnpm devVisit http://localhost:3000 to see the application.
next: React framework for productionreact&react-dom: UI librarytypescript: Type safety@supabase/supabase-js: Database clientappwrite&node-appwrite: File storageadm-zip: ZIP file manipulationbcryptjs: Password hashingjsonwebtoken: JWT token handlingnanoid: Unique ID generation
tailwindcss: Utility-first CSS framework@radix-ui/*: Accessible UI componentslucide-react: Icon librarygsap: Advanced animationsmotion: Framer Motion for animationsnext-themes: Dark/light theme switching
zod: Schema validation@hcaptcha/react-hcaptcha: CAPTCHA protectionioredis: Redis client for rate limitingform-data: Form data handling
eslint: Code linting@types/*: TypeScript type definitions
- Client-side Encryption: Files encrypted using AES-256 before upload
 - Key Generation: Unique encryption key for each file
 - Secure Storage: Encrypted files stored in Appwrite
 - Automatic Cleanup: Files deleted after expiry or download limit
 
- Files scanned using ClamAV before storage
 - Infected files rejected with detailed logging
 - Audit trail maintained for security monitoring
 
- Download tokens for secure file access
 - Edit tokens for file management
 - Password protection for sensitive files
 - Rate limiting to prevent abuse
 
zip_file_metadata: Main file records with encryption keyszip_subfile_metadata: Individual files within ZIP archivesaudit_logs: Security and activity loggingfiles: Legacy file storage (deprecated)
download_token: Secure access tokenedit_token: Management access tokenencrypted_key: AES encryption keyappwrite_id: Storage referenceexpiry_date: Automatic deletion timestamp
- Connect your GitHub repository to Vercel
 - Configure environment variables in Vercel dashboard
 - Deploy automatically on push to main branch
 
Ensure all environment variables are properly configured in your production environment, especially:
- Database connection strings
 - API keys and secrets
 - File size limits
 - Allowed file types
 
ALLOWED_FILE_TYPES='jpg,jpeg,png,pdf,zip,txt,docx,mp4,mp3'JWT_SECRET=your_secure_jwt_secret  node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
ENCRYPTION_KEY=your_encryption_key   node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
ZIP_ENCRYPTION_PUBLIC_KEY=your_zip_encryption_public_key    openssl genrsa -out private.pem 2048
ZIP_ENCRYPTION_PRIVATE_KEY=your_zip_encryption_private_key    openssl rsa -in private.pem -pubout -out public.pemNEXT_PUBLIC_APPWRITE_ENDPOINT=https://your-appwrite-instance.com/v1
NEXT_PUBLIC_APPWRITE_PROJECT_ID=your_project_idThe system maintains comprehensive audit logs for:
- File uploads/downloads
 - Security events (virus detection, failed access)
 - User activity tracking
 - System performance metrics
 
Automated cleanup scripts remove expired files:
node scripts/cleanup-expired-files.jsHealth check endpoint available at /api/health for monitoring.
We welcome contributions from the community! Here's how you can help:
- 
Create an Issue
- Before starting any work, check the repository for existing issues.
 - If your idea or bug fix is not listed, create a new issue to discuss it.
 
 - 
Fork the Repository
- Click on the "Fork" button at the top right of the repository page to create your own copy of the repository.
 
 - 
Create a New Branch
- Clone your forked repository to your local machine:
git clone https://github.com/<your-username>/silentparcel.git cd silentparcel
 - Create a new branch using the format 
<username>--issue-<issue-no>:Example:git checkout -b <username>--issue-<issue-no>
git checkout -b SinghAman21--issue-01
 
 - Clone your forked repository to your local machine:
 - 
Make Your Changes
- Implement the changes you want to contribute in this branch.
 
 - 
Create a Pull Request (PR)
- Push your changes to your forked repository:
git push origin <username>--issue-<issue-no> -u
 - Go to the original repository and click on "New Pull Request."
 - Select your branch and provide a brief description of the changes you have made.
 
 - Push your changes to your forked repository:
 
- Follow the existing code style and conventions
 - Add tests for new features
 - Update documentation as needed
 - Ensure all tests pass before submitting a PR
 
This project is licensed under the MIT License - see the LICENSE file for details.
For support, email [email protected] or create an issue in the GitHub repository.
- Enhanced chat room features
 - API rate limiting improvements
 - Multi-language support
 
Built with โค๏ธ for privacy-conscious users worldwide
