Giter Club home page Giter Club logo

chamberofsecrets-backend's People

Contributors

amansharma2910 avatar saum7800 avatar suhanichawla avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

amansharma2910

chamberofsecrets-backend's Issues

Set up Google OAuth

The Google Drive API requires the user to be authenticated via Google OAuth. Also, the user will have to provide access to the application to access their Google Drive. For this, Google OAuth needs to be set up.

Add exception handling if a horcrux is not found on the user's file storage service

Right now, there is no error handling implemented for the case when due to some reason, a horcrux is not found on one of user's file storage services (for example in case the user deletes a horcrux by mistake).

Implement the error handling for uploads, downloads and delete API. In case the exception handling is triggered, delete the file record from the database as well, and then return a valid response in the form of {"message": "Horcrux not found on user's account. The file is no longer readable. Deleting from the chamber."}

Create model for user

Create a user model in Django that will require the following fields:

  • user_id
  • email
  • username
  • password
  • public_key
  • whether the user wants to authenticate each time a file is horcruxed/resurrected

Add Dropbox oauth

Add authentication for Dropbox so that the horcruxes can be uploaded/downloaded from the user's dropbox.

Improve documentation

Improve the docusaurus project documentation:

  • The existing contribution guidelines are very vague. You can work on the guidelines to improve them.
  • Add information regarding the API endpoints and how requests can be made to them.

Create model serializers

Create model serializers to convert DB models to JSON and vice versa. This is required for communication with the frontend.

create horcrux module with encryption decryption logic

Create a module that does the following
Encryption:
Takes a file, and encrypts it with public key
Splits the file into horcruxes

Decryption:
Merges all horcruxes to get encrypted file
Decrypts the encrypted file to get original file

Create endpoint to fetch user's files

Implement a GET API endpoint in the backend that gets all the files that were uploaded by the user. The user can then decide which file they want to download.

Create model for files

Add models for storing files in the database. The following should be roughly the structure (required fields) for the file model:

  • user_id (foreign key to the user model)
  • file_id (unique file id)
  • filename
  • split_links

Integrate download and decryption flow

Integrate the download file API workflow, where horcruxes are downloaded from various file storages, then recombination and decrypted into the original file, which is then sent to the client as an HTTP response.

Create FileData model to store user file upload info

This table stores the info such as the owner of the file, the name of the file, and the links/urls of the uploaded horcruxes.
This table should have a 1:n relationship with the User model, i.e., one user (owner) can have multiple files.

Implement OneDrive OAuth

Implement server-flow OAuth for OneDrive with read-write access to the user's OneDrive storage so that the horcruxes can be uploaded, downloaded and deleted from the storage.

For this, you need to also implement the GET method to generate the authentication URI and the POST method to authenticate the user using the authentication token.

Refer to the authenticate/google_auth.py , authenticate/dropbox_auth.py and authenticate/views.py files for insights on the implementation.

Add OneDrive to uploads, downloads and delete APIs

Right now both the first and third horcruxes are getting uploaded to the user's Google Drive. Same with the downloads and deletes. Instead, once the OneDrive OAuth is implemented, make it so that the third horcrux goes on the user's OneDrive.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.