Serv-r Storage is an open-source cloud storage platform. This repo makes up the backend and as of now its split into 3 main components: Python API using Fastapi to handle main routing and authentication; Rust for file and object storage related stuff and Cloudflares R2 for the actual object storage.
Simple setup mainly using FastAPI and SQLAlchemy. Website sends requests here, handles authentication related queries and forwards file related ones to the Rust worker. It has two subdirectories, database which handles the connection to the database, and auth which has the models defined for the database, request forms, and so on; And the methods file which has the methods called by main for authentication related stuff. This part will eventually be handled by Rust aswell.
Python sends the requests here when it comes to the non-auth stuff. Http worker with Tokio, handles most of file/object-storage related functions, all defined in the files/methods file. SQLX for database stuff, and aws-s3 methods for storage. Most functions have the same-ish logic, just some more/less stuff.
File caching handled by async moka. Theres two listeners with their own routers in the main function, where one is the file methods endpoint and the other is the auth one which is not being used as of now(not functional).
Currently using a self hosted Minio instance, but in the future have to migrate to another solution
