A full-stack application for secure, end-to-end encrypted file storage with client-side encryption and key management.
Secure File Vault is designed to provide maximum security for your files through client-side encryption. Files are encrypted in the browser before being sent to the server, ensuring that even the server operator cannot access your files' contents. The system uses modern cryptography techniques including RSA and AES-GCM encryption.
- End-to-End Encryption: Files are encrypted in the browser before upload
- Zero-Knowledge Design: The server never sees unencrypted files or encryption keys
- RSA & AES Hybrid Encryption: Uses RSA for key exchange and AES-GCM for file content
- User Authentication: Secure login/registration system with password hashing
- File Management: Upload, download, and manage your encrypted files
- Responsive UI: Modern interface built with React and Tailwind CSS
The application consists of two main components:
- Frontend (React/Vite): Handles user interface, authentication, and encryption/decryption
- Backend (Node.js/Express): Manages user accounts and stores encrypted files
- Client-side Encryption: All encryption/decryption happens in the browser
- Key Management: Private keys can be exported and saved locally
- Password Hashing: PBKDF2 with strong salting for password security
- No Plain-text Storage: Only encrypted data is transmitted and stored
- Node.js v22.12+ and npm
- Modern web browser with Web Cryptography API support
-
Clone the repository:
git clone https://github.com/RickyTheDude/secure-file-vault.git cd secure-file-vault -
Install dependencies for both client and server:
# Install server dependencies cd server npm install # Install client dependencies cd ../client npm install
-
Configure port settings if needed (especially for macOS users):
- Edit
server/config.jsto change the server port - Edit
client/src/config/apiConfig.jsto match the server port
- Edit
-
Start the server:
cd server node server.js -
In a new terminal, start the client:
cd client npm run dev -
Open your browser and navigate to
http://localhost:5173
-
Build and start containers (script):
./run.sh up # builds and runs in foreground ./run.sh up-detach # builds and runs in background
Or use Docker Compose directly:
docker compose up --build
-
Open in your browser:
- Frontend:
http://localhost:3000 - Backend health:
http://localhost:5001/health
- Frontend:
-
Logs:
docker compose logs -f # all services docker compose logs -f server # backend only docker compose logs -f client # frontend only
-
Exec into containers (common commands):
# Open a shell inside the backend container docker compose exec server sh # Open a shell inside the frontend (nginx) container docker compose exec client sh # Quick checks inside backend docker compose exec server node -v docker compose exec server ls -la /app/storage docker compose exec server curl -s http://localhost:5000/health | cat
-
Stop containers:
./run.sh down # or docker compose down -
Reset data (deletes LevelDB and stored files):
./run.sh down-v # or docker compose down -v
- Registration: Create an account and securely save your private key
- Login: Authenticate with your username, password, and import your private key
- File Management: Upload files which are automatically encrypted
- Download: Files are automatically decrypted when downloaded
This project is licensed under the MIT License - see the LICENSE file for details.
- Web Cryptography API
- React.js
- Node.js
- LevelDB
- Tailwind CSS
