How abnerastete/hells-kitchen works
Main Components
a) API Layer
• FastAPI application (main.py) as the entry point
• Router component (router/item.py) as the request handler layer
b) Business Logic Layer
• Model package (model/model.py) representing the business logic
• Schemas package (schemas/schemas.py) for data validation and serialization
c) Data Layer
• Database package (database/database.py, database/crud.py)
• Database connection and CRUD operations
d) Infrastructure
• Docker container (represented by Dockerfile)
• Docker Compose environment (docker-compose.yml)
Component Relationships
• External Clients → API Layer (HTTP requests)
• API Layer → Business Logic Layer
• Business Logic Layer → Data Layer
• Data Layer → Database (external)
┌─────────────────────────────────────── Docker Container ───────────────────────────────────────┐
• ┌─────────────┐ ┌─────────────────┐ ┌──────────────────┐ ┌──────────────┐ │
• FastAPI │ │ Routers │ │ Business Logic │ │ Database │ │
• Server │ --> │ (item.py) │ ---> │ Layer │ --> │ Layer │ │
• (main.py) │ │ │ │ (model.py) │ │ (crud.py) │ │
• ┘ └─────────────────┘ └──────────────────┘ └──────────────┘ │
• ↑ ↕ ↕ ↕ │
• ┌─────────────────┐ ┌──────────────────┐ │ │
• Schemas │ │ Database │ │ │
• Validation │ │ Connection │───────────┘ │
• (schemas.py) │ │ (database.py) │ │
• ┘ └──────────────────┘ │
• ┘
Additional Elements
a) External Dependencies:
• Database system (likely PostgreSQL or similar)
• External services if mentioned in requirements.txt
b) Configuration:
• Configuration files and their relationship to components
• Environment variables flow