This codebase is my submission for the hackathon conducted by Cloudwiry, titled 'Storage - An ocean of bits & bytes'.
Click here for the video demo, and explanation.
Stack:
- AWS EFS - Distributed storage disk
- AWS RDS (postgres) - User data storage
- AWS Elastic Beanstalk - Managed servers, Application Load Balancing
- AWS Route53 - DNS, Routing
- AWS Codepipeline, Cloudwatch - CICD
- FastAPI - Web framework
In this solution, users can interact with a FastAPI application, which acts as a blob storage system. The core logic of my solution is that an AWS EFS volume, which is automatically mounted to EC2 instances as a part of AWS Elastic Beanstalk environment, will serve as a distributed storage disk. The Beanstalk environment also has an Application Load Balancer. Users from multiple availbility zones can access the same storage system (The EFS volume), even if they are routed to different servers(EC2 Instances) by the Application Load Balancer. An AWS RDS postgres instance stores the usernames, encrypted passwords, names and IDs of the users.
- User Account creation/deletion
- User Authentication, Password Encryption and API Protection
- Upload, Rename, Share, Download, Delete file functionalities
- Trash, which stores deleted files until emptied, for every user
- Autoscaling, Load Balancing and Distributed file storage
- CICD for faster bug fixes and quicker releases
- File compression
This application has been deployed to AWS Beanstalk.
All you need to do is download the postman collection file and start testing out the APIs. However, if you feel the need to run the server locally:
- Clone this repository
git clone https://github.com/Vishakhavel/file-management-system.git
- Move into the project directory
cd file-management-system
- Create a virtual environment
python3 -m venv <your-venv-name>
- Activate the virtual environment
source <your-venv-name>/bin/activate
- Install dependencies
pip3 install -r requirements.txt
- Start the server
uvicorn application:app --reload
Download this Postman collection file, open it in postman and use it to test the application, after creating the environment and the environment variables as explained in the video.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.