- Flutter Web ordering app.
- Menu/recommendation are data-driven from markdown-like sources.
- Recommendation can be generated by Python script with OpenAI-compatible API.
- App entry:
lib/main.dartlib/app.dart
- Main UI:
lib/views/ordering_view.dart
- Data loading/parsing:
lib/services/menu_repository.dartlib/services/markdown_menu_parser.dartlib/services/runtime_config.dartlib/services/trillium_menu_parser.dart
- Script:
scripts/generate_recommendation.py
- Tooling:
tools/branding/generate_logo_candidates_v4.py
- Runtime/deploy:
docker/entrypoint.shdocker-compose.yamldeploy/docker-compose.example.yaml
site_nameMENU_SOURCE:localortrilliumTRILLIUM_URLTRILLIUM_TITLE
Lowercase compatibility keys still parsed:
menu_source,trillium_url,trillium_title
MENU_SOURCE=local- Read menu from local public markdown (
public/menu.mdpath candidates).
- Read menu from local public markdown (
MENU_SOURCE=trillium- Fetch HTML from
TRILLIUM_URL - Extract article section by
TRILLIUM_TITLE - Parse table rows -> convert to markdown table -> reuse parser.
- Fetch HTML from
lib/services/markdown_menu_parser.dart supports both:
- List rows (
- 名称 | 描述 | 口味 | 小料) - Table rows (
| 名称 | 描述 | 口味 | 小料 |)
Mixed format in one category is supported.
- Any UI text change must keep the same semantic meaning across all supported locales.
- When updating user-facing copy, update
app_zh.arb,app_en.arb,app_ja.arb,app_ko.arb, and the generated localization Dart files in the same change.
scripts/generate_recommendation.py:
- Inputs:
OPENAI_BASE_URL/BASE_URLOPENAI_API_KEY/API_KEYOPENAI_MODEL/MODEL
- Path defaults:
- base dir from
PUBLIC_DIR(defaultweb/public) - output from
RECOMMEND_FILEor${PUBLIC_DIR}/recommend.md
- base dir from
- Writes via temp file then atomic replace.
tools/branding/generate_logo_candidates_v4.py:
- Generates batch SVG logo candidates for design exploration.
- Not used by app runtime, Docker startup, or deploy flow.
SITE_NAMEOPENAI_BASE_URLOPENAI_API_KEYOPENAI_MODELMENU_SOURCETRILLIUM_URLTRILLIUM_TITLERECOMMEND_CRON_SCHEDULE
flutter analyzeflutter testflutter build web --wasm --no-source-maps --no-web-resources-cdn --no-wasm-dry-runpython3 scripts/generate_recommendation.py
- Bottom bar is floating and blurred.
- Selected dishes popup and order summary list include category grouping headers.