LockBox is a secure file encryption and decryption platform using AES-256-CTR method, that allows users to upload, store, and share files securely. With unique secret keys generated for every file, users can ensure that their data is encrypted, accessible only to authorized individuals with the key.
- User Authentication: Secure login and registration system.
- File Encryption: AES-256 encryption to secure uploaded files.
- File Decryption: Decrypt and download files using a secret key.
- User-Specific Files: Each user's files are privately managed.
- Key-Based Access: Access to files is granted only with the corresponding secret key.
- Upload a File: Log in, upload a file, and get a unique secret key for encryption.
- Download a File: Use the secret key to decrypt and download a file.
- Manage Files: View, download, and delete files from your personal dashboard.
- React.js
- Material-UI
- Axios for HTTP requests
- React Router for navigation
- React Toastify for notifications
- Node.js with Express.js
- MongoDB for database management
- Multer for file uploads
- Crypto for encryption and decryption
Follow these steps to set up the project locally.
- Node.js and npm
- MongoDB installed and running locally or remotely
- Git
-
Clone the Repository
git clone https://github.com/yourusername/lockbox.git cd lockbox
-
Install Dependencies
-
Backend:
cd backend npm install
-
Frontend:
cd ../frontend npm install
-
-
Set up MongoDB
Ensure MongoDB is running on your system. If using a remote MongoDB instance, update the connection string in the backend
server.js
file:mongoose.connect('your_mongo_connection_string', { useNewUrlParser: true, useUnifiedTopology: true });
-
Run the Application
-
Start the backend server:
cd backend node server.js
-
Start the frontend:
cd ../frontend npm start
-
-
Access the Application
Open your browser and navigate to:
http://localhost:3000
backend/
│
├── models/
│ ├── File.js # File model
│ └── User.js # User model
│
├── uploads/ # Encrypted file storage
├── server.js # Main backend server
└── package.json # Backend dependencies
frontend/
│
├── src/
│ ├── components/ # React components (Dashboard, Login, etc.)
│ ├── App.js # Main app file
│ ├── index.js # React entry point
│ └── package.json # Frontend dependencies
Endpoint | Method | Description |
---|---|---|
/register |
POST | Register a new user |
/login |
POST | Log in an existing user |
Endpoint | Method | Description |
---|---|---|
/upload |
POST | Upload and encrypt a file |
/download/:file |
POST | Decrypt and download a file |
/verify-key |
POST | Verify the secret key for a file |
/files |
GET | Fetch all files for a user |
/files/:id |
DELETE | Delete a specific file |
Create a .env
file in the backend
directory for environment-specific configurations:
MONGO_URI=your_mongo_connection_string
PORT=5000
I love contributions! Follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature"
- Push to the branch:
git push origin feature-name
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.
For inquiries or support, contact me at [email protected].
Enjoy using LockBox🔐!