How aniketbhil/zestra works
Zestra serves diners and restaurant teams through a React client and FastAPI backend. The main diner journey is browse a QR-linked menu, place and pay for an order, then follow its live status; reservation booking is a separate customer journey. Restaurant workflows cover menu and inventory upkeep, orders, reservations, analytics, and AI insights. The backend also provides authentication, WebSockets, and scheduled background work. README feature descriptions support several subsystem links; unsampled route implementations are represented at their existing directory paths, not inferred in detail.
Main entry points: main.py FastAPI application · api.js API client · tasks.py Scheduled tasks · App.jsx Web application
Components 34
Web client
- Web application
zestra-frontend/src/App.jsx - Public menu
zestra-frontend/src/pages/public/PublicMenu.jsx - Checkout
zestra-frontend/src/pages/public/Checkout.jsx - Order tracking
zestra-frontend/src/pages/public/OrderTracking.jsx - Customer reservations
zestra-frontend/src/store/dashboard/useReservationStore.js - Restaurant dashboard
zestra-frontend/src/pages/dashboard/DashboardHome.jsx - API client
zestra-frontend/src/services/api.js - Authentication state
zestra-frontend/src/store/auth/useAuthStore.js - Diner order state
zestra-frontend/src/store/public/useOrderStore.js - Order dashboard state
zestra-frontend/src/store/dashboard/useRestaurantOrderStore.js - Reservation state
zestra-frontend/src/store/dashboard/useReservationStore.js
Backend API
- FastAPI application
zestra-backend/app/main.py - Authentication API
zestra-backend/app/api/v1/auth.py - Public menu and orders
zestra-backend/app/api/v1/public.py - Order API
zestra-backend/app/api/v1/orders.py - Payments API
zestra-backend/app/api/v1/payments.py - Reservations API
zestra-backend/app/api/v1/reservations.py
Restaurant operations
- Menu API
zestra-backend/app/api/v1/menu.py - Inventory API
zestra-backend/app/api/v1/inventory.py - Restaurant API
zestra-backend/app/api/v1/restaurants.py - Analytics and AI
zestra-backend/app/api/v1/ai.py - Dashboard API
zestra-backend/app/api/v1/dashboard.py
Realtime and jobs
- WebSocket routes
zestra-backend/app/api/v1/ws.py - Connection manager
zestra-backend/app/services/connection_manager.py - Scheduled tasks
zestra-backend/app/workers/tasks.py - ARQ worker
zestra-backend/app/workers/worker.py
Persistence and integrations
- Database sessions
zestra-backend/app/db/session.py - Order records
zestra-backend/app/models/order.py - Inventory records
zestra-backend/app/models/inventory_item.py
Other components
- Diner
- Restaurant team
- PostgreSQL
- Redis
- Razorpay
Connections 37
- Diner → Web application: uses
README.md - Restaurant team → Web application: uses
README.md - Web application → Public menu: routes to
README.md - Web application → Restaurant dashboard: routes to
README.md - Public menu → Checkout: continues to
README.md - Checkout → Diner order state: places order
README.md - Diner order state → API client: calls
zestra-frontend/src/store/public/useOrderStore.js - Customer reservations → Reservation state: uses
README.md - Reservation state → API client: calls
zestra-frontend/src/store/dashboard/useReservationStore.js - API client → FastAPI application: HTTP requests
README.md - Authentication state → API client: calls
zestra-frontend/src/store/auth/useAuthStore.js - Restaurant dashboard → Order dashboard state: manages orders
README.md - Order dashboard state → API client: calls
zestra-frontend/src/store/dashboard/useRestaurantOrderStore.js - FastAPI application → Authentication API: mounts routes
zestra-backend/app/main.py - FastAPI application → Public menu and orders: mounts routes
zestra-backend/app/main.py - FastAPI application → Order API: mounts routes
README.md - FastAPI application → Payments API: mounts routes
README.md - FastAPI application → Reservations API: mounts routes
README.md - FastAPI application → Menu API: mounts routes
README.md - FastAPI application → Inventory API: mounts routes
README.md - FastAPI application → Restaurant API: mounts routes
README.md - FastAPI application → Analytics and AI: mounts routes
README.md - FastAPI application → Dashboard API: mounts routes
README.md - FastAPI application → WebSocket routes: mounts
zestra-backend/app/main.py - FastAPI application → ARQ worker: starts
zestra-backend/app/main.py - ARQ worker → Scheduled tasks: registers
zestra-backend/app/workers/worker.py - Scheduled tasks → Database sessions: queries through
zestra-backend/app/workers/tasks.py - Scheduled tasks → Inventory records: checks stock
zestra-backend/app/workers/tasks.py - Scheduled tasks → Connection manager: broadcasts alerts
zestra-backend/app/workers/tasks.py - WebSocket routes → Connection manager: manages connections
- Order tracking → Diner order state: tracks status
README.md - Diner order state → FastAPI application: opens WebSocket
zestra-frontend/src/store/public/useOrderStore.js - Order dashboard state → FastAPI application: opens WebSocket
zestra-frontend/src/store/dashboard/useRestaurantOrderStore.js - Order API → Order records: persists orders
README.md - Database sessions → PostgreSQL: connects
README.md - ARQ worker → Redis: uses queue
zestra-backend/app/workers/worker.py - Payments API → Razorpay: creates and verifies
README.md