Skip to content

Fuad28/CloudBox

Repository files navigation

CloudBox

CloudBox was an attempt to practice a newly learnt framework , flask by picking up a sufficently complex project. CloudBox is a cloud storage API built with flask. Read the documentation here.

Features

Here I'll list features (or part) of the API

  • Auth - Handles user authentication and authorization.
  • Store - Handles all logics partaining to storing and retrieving users files and folders (collectively referred to as assets).
  • Payment - Handles logic for users to buy more storage space.

Technologies

  • Flask
  • Databases
    • PostgreSQL
  • ORM / ODM
    • Flask SQL ALchemy ORM
    • Flask Mongoengine ODM(MongoDB)
  • Storage services
    • Cloudinary
    • AWS S3 bucket
  • Payment services
    • Paystack
  • Celery
  • Redis
  • Deployment
    • Docker
    • Github actions (CI/ CD)
    • AWS EC2
    • Nginx

Setup Locally

  1. Clone the project and navigate to the cloudbox directory.
  2. Run docker-compose -f docker-compose.dev.yml up -d —build

Detailed specification.

The API enforces security on actions performed on an asset. For example, only the owner and editors of a file can delete an asset, update an asset and upload to an asset (folder asset). Also, every asset has a any_one_access attribute that can be set initially by an asset owner and subsequently by the asset's editors. This feature controls who can view an asset and what actions they can perform on an asset. Refer to the documentation for more information on how the API works.

Entity relationship diagram.

Screen Shot 2022-09-29 at 1 55 10 PM

Resources

  1. Flask tutorial playlist
  2. Mongoengine docs
  3. Flask Mongoengine docs
  4. Flask SQLAlchemy docs
  5. Flask Mail Sendgrid
  6. Flask Migrate
  7. Flask Signals
  8. Celery with flask
  9. Github actions
  10. Publishing docker Images
  11. SSH for github actions
  12. Deploy Flask Application on EC2 with docker