How sleep-revolution/sleepscorerapi works
Main Components
a) Client Layer:
• Web Interface (Templates)
• Static Assets
• Admin Portal
b) Application Layer:
• FastAPI Server
• Routers (Admin Router)
• Middleware Components
c) Business Layer:
• Services Layer
• Repositories Layer
• Infrastructure Layer
d) Data Layer:
• Database (indicated by Models/Database.py)
Component Relationships
• Client → FastAPI (HTTP requests)
• FastAPI → Middleware → Services
• Services → Repositories
• Repositories → Database
Technical Details
• FastAPI endpoint groups
• Middleware chain order
• Database connections
• Template rendering flow
• Static file serving
Additional Elements
• Component types
• Security boundaries
Infrastructure Notes
Deployment-related components:
• Docker container boundary (indicated by Dockerfile)
• Jenkins pipeline connection (indicated by Jenkinsfile)
Remember to emphasize the clean architecture pattern evident in the project structure (Services → Repositories → Models), and clearly show how the Infrastructure components support the entire system.