A secure file sharing application with client-side encryption, built with Node.js and Express.
- 🔒 Client-side encryption using AES-GCM
- 🔗 Unique, secure download links
- ⏱️ Automatic file expiration
- 🚫 One-time download links
- 🔄 Real-time upload/download progress
- 📋 Copy to clipboard functionality
- 🎯 Drag and drop file upload
- Node.js (v14 or higher)
- MongoDB (local or Atlas cluster)
- npm or yarn
- Clone the repository:
git clone https://github.com/yourusername/zeroshare.git
cd zeroshare- Install dependencies:
npm install- Create a
config.jsfile in the root directory with your configuration:
module.exports = {
app: {
name: 'ZeroShare',
description: 'Secure file sharing with client-side encryption',
version: '1.0.0',
maxFileSize: 100 * 1024 * 1024, // 100MB
supportedFileTypes: '*' // All file types
},
security: {
encryptionAlgorithm: 'AES-GCM',
keyLength: 256,
fileExpiry: 24, // hours
maxDownloads: 1
},
database: {
uri: 'your_mongodb_connection_string'
},
server: {
port: 3000,
cors: {
origin: '*',
methods: ['GET', 'POST'],
allowedHeaders: ['Content-Type']
}
}
};- Create an
uploadsdirectory in the root folder:
mkdir uploads- Start the development server:
npm run dev- For production:
npm start- To share the application temporarily (using ngrok):
npm run share-
File Upload:
- User selects a file through the UI
- File is encrypted client-side using AES-GCM
- Encrypted file is uploaded to the server
- A unique download link is generated
-
File Download:
- User receives the download link
- Link contains the file ID and encryption key
- File is downloaded and decrypted client-side
- File is automatically deleted after download
- Client-side encryption ensures files are never stored in plain text
- One-time download links prevent unauthorized access
- Automatic file expiration after 24 hours
- Secure key transmission through URL hash
- No server-side decryption
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.