How theturefaded/cosc310-team19-food-delivery works
This repository is a small FastAPI backend for restaurant discovery and registration—not yet a complete food-delivery app. The principal workflow is an HTTP client request routed through the restaurant API to service logic, which reads restaurant records and, for additions, assigns an ID and checks duplicate names before persistence. The README also documents root and health checks. Menus, ordering, and delivery tracking are explicitly planned, not implemented here. The repository excerpt does not show its write implementation, so that relationship is supported by the README rather than inferred from the excerpt.
Main entry points: restaurant_route.py Restaurant routes · restaurant_service.py Restaurant service · main.py FastAPI app · restaurant_repository.py Restaurant repository
Components 8
HTTP API
- FastAPI app
app/main.py - Restaurant routes
app/api/routes/restaurant_route.py
Restaurant Logic
- Restaurant schemas
app/schemas/restaurant.py - Restaurant service
app/services/restaurant_service.py - Domain errors
app/errors.py
Restaurant Storage
- Restaurant repository
app/repositories/restaurant_repository.py - Restaurant JSON
data/restaurants.json
Other components
- HTTP client
Connections 9
- HTTP client → FastAPI app: sends requests
README.md - FastAPI app → Restaurant routes: registers routes
app/main.py - Restaurant routes → Restaurant service: dispatches requests
app/api/routes/restaurant_route.py - Restaurant routes → Restaurant schemas: validates input
app/api/routes/restaurant_route.py - Restaurant service → Restaurant schemas: builds results
app/services/restaurant_service.py - Restaurant service → Restaurant repository: reads and writes
README.md - Restaurant service → Domain errors: raises domain errors
app/services/restaurant_service.py - Restaurant routes → Domain errors: maps duplicates
app/api/routes/restaurant_route.py - Restaurant repository → Restaurant JSON: reads and updates
README.md