How michadasis/generic-restaurant-app works
UoWM Restaurant Menu App is a mobile menu viewer: students open today’s lunch and dinner, browse adjacent days or jump to a calendar date, and can also submit and vote on suggestions. The menu is fetched from Supabase with an on-device cache fallback; Android widgets independently refresh and display today’s meal. Other documented capabilities include bilingual/theme preferences, seasonal closure notices, and GitHub release checks. The README supports the major unsampled screens and services; their detailed call wiring is therefore shown only where documented.
Main entry points: index.tsx Today menu · widget-task-handler.ts Widget refresh · menuService.ts Menu service · Calendar.tsx Date calendar
Components 23
Menu browsing
- Today menu
app/(tabs)/index.tsx - Date calendar
app/(tabs)/Calendar.tsx - Menu hook
data/menu.ts - Menu service
data/menuService.ts - Cycle week
utils/getWeek.ts - Today lookup
utils/getToday.ts
Student suggestions
- Suggestions screen
app/(tabs)/Suggestions.tsx - Suggestion actions
data/suggestions.ts - Suggestions service
data/suggestionsService.ts - Local vote state
App experience
- Tab navigation
app/(tabs)/_layout.tsx - App layout
app/_layout.tsx - Language and theme
constants/i18n.ts
Home widgets
- Widget refresh
widget/widget-task-handler.ts - Compact widget
widget/TodayMenuCompactWidget.tsx - Full widget
widget/TodayMenuFullWidget.tsx
Updates and notices
- Release checker
hooks/useUpdateChecker.ts - Closure notice
utils/getClosureNotice.ts
Other components
- Student
- Menu database
- Menu cache
- Suggestions database
- GitHub releases
Connections 26
- Student → Today menu: opens
- Student → Date calendar: chooses date
- Student → Suggestions screen: browses or posts
- Today menu → Menu hook: loads menu
- Date calendar → Menu hook: loads menu
- Menu hook → Menu service: loads raw menu
- Menu service → Menu database: fetches rows
- Menu service → Menu cache: reads or writes
- Today menu → Cycle week: finds cycle week
- Date calendar → Cycle week: maps date to week
- Today menu → Today lookup: finds today
- Suggestions screen → Suggestion actions: uses actions
- Suggestion actions → Suggestions service: fetches and submits
- Suggestions service → Suggestions database: reads and writes
- Suggestion actions → Local vote state: stores vote choice
- Student → Tab navigation: navigates
- App layout → Tab navigation: sets up
- Today menu → Language and theme: uses translations
- Widget refresh → Menu service: loads menu
- Widget refresh → Cycle week: finds cycle week
- Widget refresh → Today lookup: finds today
- Widget refresh → Compact widget: renders compact
- Widget refresh → Full widget: renders full
- Today menu → Closure notice: gets notice
- Today menu → Release checker: checks release
- Release checker → GitHub releases: queries releases