Secure File Share is a web application built with Django for the backend and React for the frontend, designed to enable users to securely upload, share, and access files with encryption and permission management. The project provides a secure environment for file sharing using token-based access and role-based permissions.
The backend is built using Django and contains the logic for file management, encryption, access control, and user permissions.
- Authentication: Used JWT and Google Authenticator for authentication.
- File Encryption: Files are encrypted before being uploaded to ensure security.
- Token-Based Access: Users are granted file access via tokens, with expiration times and permissions.
- Permission Management: File access is based on user roles (e.g., guest, registered user) and email-based authentication.
The frontend is built using React, providing an intuitive interface for users to interact with the system. It allows users to upload, share, view, and download files securely.
- File Upload: Users can upload files with encryption.
- File Access: Users can access files by providing a token or email.
- PDF Rendering: If the uploaded file is a PDF, it is rendered directly in the browser for viewing.
- Permissions: Users can download or view files based on their access rights.
- Clone the repository:
git clone https://github.com/priyansh18a/secure-file-share.git cd secure-file-share/file-sharing-app-backend - Create and activate a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Run migrations:
python manage.py migrate
- Run the development server:
python manage.py runserver
Your backend will now be running on http://localhost:8000.
- Navigate to the frontend directory:
cd file-sharing-app-frontend - Install dependencies:
npm install
- Start the React development server:
npm start
The frontend will now be running on http://localhost:3000.
To simplify the process of running both the backend and frontend in Docker containers, the project includes a docker-compose.yml file.
-
Ensure Docker is installed on your machine. If it's not, follow the installation instructions from the official Docker website.
-
Navigate to the root directory of the project.
-
Run the following command to build and start both the frontend and backend inside Docker containers:
docker-compose up --build
This will build both the frontend and backend containers and start the application. The backend will be accessible on http://localhost:8000, and the frontend will be accessible on http://localhost:3000.
- To stop the containers, press Ctrl+C or run:
docker-compose down
- Upload Files: Use the backend API or frontend interface to upload files with encryption.
- Access Files: Users can access files by providing their email or access token.
- Download Files: Users with the necessary permissions can download files securely.
- Backend: Django, Django REST Framework, SQLite (or PostgreSQL in production)
- Frontend: React, Material-UI, PDF.js (for rendering PDFs)
- Encryption: AES-GCM for file encryption and decryption
- Docker: Docker Compose to containerize and run both frontend and backend
Register:
Login:
2FA:
FileUpload:
File Access:
Admin View:
- Fork the repository.
- Create a new branch for your changes.
- Make your changes and commit them.
- Push to your fork and create a pull request.





