How haydakiwi/food-delivery works
Food Delivery API is a small FastAPI backend. A client requests the restaurant list; the registered route uses configured data-path settings to construct the repository and service, calls the service, and returns restaurant records validated against the Pydantic schema. The repository reads the JSON data file. The separate health endpoint is served by the application entry point. The README also documents generated API docs; wiring beyond the shown application setup is not modeled.
Main entry points: restaurants.py Restaurant route · restaurant_service.py Restaurant service · restaurant_repository.py Restaurant repository · restaurant.py Restaurant schema
Components 9
HTTP API
- FastAPI application
app/main.py - Restaurant route
app/api/routes/restaurants.py - Health check
app/main.py
Restaurant Domain
- Restaurant service
app/services/restaurant_service.py - Restaurant schema
app/schemas/restaurant.py
Configuration & Data
- Data path config
app/core/config.py - Restaurant repository
app/repositories/restaurant_repository.py - Restaurant JSON
data/restaurants.json
Other components
- API client
Connections 10
- API client → Restaurant route: requests list
README.md - API client → Health check: checks health
README.md - FastAPI application → Restaurant route: registers router
app/main.py - Restaurant route → Data path config: reads path
app/api/routes/restaurants.py - Restaurant route → Restaurant repository: constructs
app/api/routes/restaurants.py - Restaurant route → Restaurant service: calls
app/api/routes/restaurants.py - Restaurant route → Restaurant schema: declares response
app/api/routes/restaurants.py - Restaurant service → Restaurant repository: loads records
app/services/restaurant_service.py - Restaurant service → Restaurant schema: validates records
app/services/restaurant_service.py - Restaurant repository → Restaurant JSON: reads JSON
README.md