How diegitfk/cloud_proyect works
Overall Project Components
• Frontend: A Next.js application (indicated by the “frontend” folder structure with pages, api routes, components, and configuration files such as next.config.mjs and tsconfig.json). This represents the user interface, handling file management (upload, download, folder structure, trash, etc.) and the interaction with backend APIs.
• Backend: Split into two main services under the “backend” directory:
• Authentication Service (“backend/auth”): Implements login and user management using FastAPI and integrates with MongoDB (through the Beanie ODM). It manages user identity and maintains user folder data.
• Cloud Service (“backend/cloud”): Implements file handling functionalities like uploads, downloads, sharing, resource transfers, and even webhook handling. Like auth, it’s built on FastAPI with additional routers and utility modules.
• Nginx: Acts as a reverse proxy and load balancer (configured in “backend/nginx/nginx.conf”), routing incoming HTTP requests to the appropriate backend services.
• Docker/Docker Compose: The project uses Docker containers for deployment, as seen from Dockerfiles in subdirectories (both in auth and cloud) and a docker-compose.yml file which orchestrates the containers. This provides isolation, scalability, and a consistent deployment environment.
• MongoDB (logical component): Although not directly present in the file tree, the README and the ODM layer (Beanie framework) indicate that this database is used to store authentication data and users’ folder metadata.
Architectural Patterns and Design Principles
• Microservices/Multi-service Backend Architecture: The clear separation between auth and cloud services indicates a modular and scalable design.
• API Gateway/Reverse Proxy Pattern: Nginx is used to centralize request routing, load balancing, and potentially security enforcement before traffic reaches the backend containers.
• Containerization: Docker is used to encapsulate backend services which implies portability and easy reproducibility of environments.
• Data Modeling: Usage of Beanie ODM for MongoDB suggests an object-oriented approach in data management.