How dechen17714/tabletap_scaling_project works
TableTap is a restaurant ordering platform: diners use QR-linked menus to place and track orders, while owners manage restaurant profiles, menus, tables, orders, and dashboard metrics. The main runtime path is browser UI → FastAPI routes → ORM-backed PostgreSQL state; owner authentication additionally uses Google OAuth. The sampled backend shows route-to-data and application routing, but the frontend implementation and several backend modules were not sampled, so UI/API wiring is shown only as unverified.
Main entry points: main.py FastAPI application · database.py Database sessions · models.py Restaurant data models · menu.py Menu management
Components 18
Restaurant experience
- Web interface
frontend/public/assets/js/app.js
Backend API
- FastAPI application
backend/app/main.py - Customer ordering
backend/app/routers/customer.py - OAuth routes
backend/app/routers/auth.py - Menu management
backend/app/routers/menu.py - Table and QR management
backend/app/routers/tables.py - Orders and dashboard
backend/app/routers/dashboard.py - Owner profile
backend/app/routers/owner.py - API schemas
backend/app/schemas.py
Identity and configuration
- Authentication dependency
backend/app/dependencies.py - Token helpers
backend/app/auth.py - Runtime settings
backend/app/config.py
Persistence
- Database sessions
backend/app/database.py - Restaurant data models
backend/app/models.py - PostgreSQL
database/init.sql
Other components
- Diner
- Restaurant owner
- Google OAuth
Connections 32
- Diner → Web interface: browses and orders
README.md - Restaurant owner → Web interface: manages restaurant
README.md - Web interface → FastAPI application: uses API
- FastAPI application → OAuth routes: registers routes
backend/app/main.py - FastAPI application → Customer ordering: registers routes
backend/app/main.py - FastAPI application → Menu management: registers routes
backend/app/main.py - FastAPI application → Table and QR management: registers routes
backend/app/main.py - FastAPI application → Orders and dashboard: registers routes
backend/app/main.py - FastAPI application → Owner profile: registers routes
backend/app/main.py - OAuth routes → Google OAuth: exchanges OAuth
backend/app/routers/auth.py - OAuth routes → Token helpers: creates tokens
backend/app/routers/auth.py - OAuth routes → Restaurant data models: looks up restaurant
backend/app/routers/auth.py - Authentication dependency → Token helpers: decodes token
backend/app/dependencies.py - Authentication dependency → Database sessions: gets session
backend/app/dependencies.py - Authentication dependency → Restaurant data models: loads restaurant
backend/app/dependencies.py - Database sessions → Runtime settings: reads database URL
backend/app/database.py - Database sessions → PostgreSQL: connects to
- Customer ordering → Database sessions: queries and saves
backend/app/routers/customer.py - Customer ordering → Restaurant data models: uses entities
backend/app/routers/customer.py - Menu management → Database sessions: queries and saves
backend/app/routers/menu.py - Menu management → Restaurant data models: uses entities
backend/app/routers/menu.py - Menu management → FastAPI application: serves uploaded images
backend/app/routers/menu.py - Table and QR management → Database sessions: queries and saves
backend/app/routers/tables.py - Table and QR management → Restaurant data models: uses entities
backend/app/routers/tables.py - Orders and dashboard → Database sessions: queries and updates
backend/app/routers/dashboard.py - Orders and dashboard → Restaurant data models: uses entities
backend/app/routers/dashboard.py - Owner profile → Database sessions: persists profile
backend/app/routers/owner.py - Owner profile → Restaurant data models: updates restaurant
backend/app/routers/owner.py - Orders and dashboard → API schemas: validates responses
backend/app/routers/dashboard.py - Menu management → API schemas: validates responses
backend/app/routers/menu.py - Table and QR management → API schemas: validates responses
backend/app/routers/tables.py - Owner profile → API schemas: validates responses
backend/app/routers/owner.py