How rotiehzk/ept-cantina works
EPT Cantina is a responsive school-lunch planning demo. Students browse weekly menus, select and confirm a meal choice, and review their choices; cantina staff view per-day counts and missing responses and can edit demo menus. The README also describes CSV export, fictitious test profiles, server persistence in Cloudflare D1, and offline support. The sampled UI imports the domain week helper and registers the service worker. The documented demo API route is absent from the supplied tree, so its implementation is not mapped; its connection to D1 is documented only at a high level.
Main entry points: cantina.tsx Cantina interface · index.ts D1 access · page.tsx App entry · app Demo data API
Components 18
Meal experience
- App entry
app/page.tsx - Cantina interface
app/cantina.tsx - Meal choices
app/cantina.tsx - Cantina panel
app/cantina.tsx - Menu editor
app/cantina.tsx - Choice summary
app/cantina.tsx - CSV export
app/cantina.tsx
Menu domain
- Demo profiles
app/domain.ts - Weekly menus
app/domain.ts
Persistence and access
- Demo sign-in
app/chatgpt-auth.ts - Demo data API
app - D1 access
db/index.ts - Data schema
db/schema.ts
Offline support
- Service worker
public/sw.js
Other components
- Student
- Cantina staff
- Browser
- Cloudflare D1
Connections 19
- Student → App entry: opens app
- Cantina staff → App entry: opens app
- App entry → Cantina interface: renders
app/page.tsx - Cantina interface → Weekly menus: uses dates
app/cantina.tsx - Cantina interface → Demo profiles: selects profile
app/cantina.tsx - Cantina interface → Meal choices: presents
app/cantina.tsx - Cantina interface → Cantina panel: presents
app/cantina.tsx - Cantina interface → Menu editor: opens editor
app/cantina.tsx - Cantina interface → Choice summary: shows choices
app/cantina.tsx - Cantina interface → CSV export: exports
app/cantina.tsx - Student → Meal choices: chooses meals
- Cantina staff → Cantina panel: reviews counts
- Cantina staff → Menu editor: edits menu
- Cantina interface → Demo data API: loads and saves
app/cantina.tsx - Demo data API → D1 access: uses database
- D1 access → Data schema: configures schema
db/index.ts - D1 access → Cloudflare D1: accesses
db/index.ts - Browser → Service worker: registers
- Student → Demo sign-in: starts demo access