How laksanac61-oss/village-food-app works
Village Food is a Flutter food-ordering app for Android, web, and iOS, backed by Supabase. Its main workflow spans customer shop discovery and checkout, shop order acceptance and payment-slip review, and rider delivery; admin approval and delivery-zone configuration support operations. The README documents real-time updates, direct PromptPay transfers, and role-specific database rules. Most Flutter implementation files are listed in the tree but were not excerpted, so feature-level relationships below rely on README statements rather than inspected call sites.
Main entry points: api.dart Supabase client · main.dart App entry · 0001_init.sql Supabase data and policies · customer_home.dart Shop discovery
Components 27
Flutter app
- App entry
lib/main.dart - Home routing
lib/screens/home_router.dart - Sign-in
lib/screens/auth_screen.dart
Customer ordering
- Shop discovery
lib/screens/customer/customer_home.dart - Shop menu
lib/screens/customer/shop_menu_screen.dart - Checkout
lib/screens/customer/checkout_screen.dart - Order tracking
lib/screens/customer/order_detail_screen.dart
Shop and delivery
- Shop operations
lib/screens/shop/shop_home.dart - Order handling
lib/screens/shop/shop_orders.dart - Menu management
lib/screens/shop/shop_menu_admin.dart - Shop settings
lib/screens/shop/shop_settings.dart - Shop income
lib/screens/shop/shop_income.dart - Rider delivery
lib/screens/rider/rider_screen.dart - Admin controls
lib/screens/admin/admin_screen.dart - Shop review
lib/screens/admin/shop_review.dart
Backend and integrations
- Supabase client
lib/core/api.dart - Supabase data and policies
supabase/migrations/0001_init.sql - Order updates
lib/core/order_watch.dart - PromptPay QR
lib/core/promptpay.dart - LINE alerts
supabase/functions/line-bot/index.ts - Push notifications
supabase/functions/notify-shop/index.ts
Other components
- Customer
- Shop owner
- Rider
- Administrator
- LINE Messaging API
- Firebase Cloud Messaging
Connections 29
- Customer → App entry: uses app
README.md - Shop owner → App entry: uses app
README.md - Rider → App entry: uses app
README.md - Administrator → App entry: uses app
README.md - App entry → Home routing: routes through
- Customer → Shop discovery: browses shops
README.md - Shop discovery → Shop menu: opens menu
README.md - Customer → Checkout: places order
README.md - Checkout → PromptPay QR: creates payment QR
README.md - Customer → Order tracking: tracks order
README.md - Shop owner → Shop operations: manages shop
README.md - Shop owner → Menu management: manages menu
README.md - Shop owner → Order handling: handles orders
README.md - Shop owner → Shop settings: sets availability
README.md - Shop owner → Shop income: views income
- Rider → Rider delivery: accepts delivery
README.md - Administrator → Admin controls: configures service
README.md - Administrator → Shop review: reviews shops
README.md - Shop discovery → Supabase client: loads shop data
- Checkout → Supabase client: submits order
- Order handling → Supabase client: updates status
- Rider delivery → Supabase client: updates delivery
- Admin controls → Supabase client: sets delivery zones
- Supabase client → Supabase data and policies: accesses data
README.md - Supabase data and policies → Order updates: streams changes
- LINE alerts → Supabase data and policies: claims alert work
supabase/functions/line-bot/index.ts - LINE alerts → LINE Messaging API: sends messages
supabase/functions/line-bot/index.ts - Push notifications → Supabase data and policies: claims push events
supabase/functions/notify-shop/index.ts - Push notifications → Firebase Cloud Messaging: sends notifications
supabase/functions/notify-shop/index.ts