How emrick-r/ytastycrousty-g3 works
Ytasty Crousty is a FastAPI ordering backend for three restaurants. Customers browse the restaurant catalog, place orders, and track them; staff and administrators manage products and order status, while role-based access also supports account and restaurant administration. The graph separates those domain routes from authentication, persistence, and startup seeding. The README documents the restaurant management capabilities; the restaurants router and several order and model implementations were not sampled, so their internal call details are not inferred.
Main entry points: database.py Database sessions · main.py FastAPI application · models Domain models · auth.py Login and users
Components 12
API domains
- FastAPI application
src/main.py - Restaurant management
src/routers/restaurants.py - Product catalog
src/routers/products.py - Order lifecycle
src/routers/orders.py
Identity and access
- Login and users
src/routers/auth.py - Role authorization
src/core/deps.py - JWT and password security
src/core/security.py
Persistence and startup
- Database sessions
src/db/database.py - PostgreSQL
- Domain models
src/models - Initial data seeding
src/db/seed.py
Other components
- API consumer
Connections 25
- API consumer → FastAPI application: calls API
- FastAPI application → Restaurant management: dispatches
- FastAPI application → Product catalog: dispatches
- FastAPI application → Order lifecycle: dispatches
- FastAPI application → Login and users: dispatches
- FastAPI application → Database sessions: creates tables
- FastAPI application → Initial data seeding: initializes data
- Login and users → Database sessions: uses sessions
- Restaurant management → Database sessions: uses sessions
- Product catalog → Database sessions: uses sessions
- Order lifecycle → Database sessions: uses sessions
- Login and users → JWT and password security: checks credentials, signs token
- Role authorization → JWT and password security: verifies token
- Login and users → Role authorization: protects user routes
- Product catalog → Role authorization: checks access
- Order lifecycle → Role authorization: checks access
- Database sessions → PostgreSQL: queries and persists
- Initial data seeding → Database sessions: writes initial records
- Initial data seeding → JWT and password security: hashes passwords
- Database sessions → Domain models: maps domain tables
- Initial data seeding → Domain models: creates records
- Login and users → Domain models: reads and writes users
- Restaurant management → Domain models: reads and writes restaurants
- Product catalog → Domain models: reads and writes products
- Order lifecycle → Domain models: reads and writes orders