Skip to content

Latest commit

 

History

History
103 lines (76 loc) · 2.76 KB

File metadata and controls

103 lines (76 loc) · 2.76 KB

UniqueDingKitchen Agent Notes

Project Scope

  • Flutter Web ordering app.
  • Menu/recommendation are data-driven from markdown-like sources.
  • Recommendation can be generated by Python script with OpenAI-compatible API.

Key Files

  • App entry:
    • lib/main.dart
    • lib/app.dart
  • Main UI:
    • lib/views/ordering_view.dart
  • Data loading/parsing:
    • lib/services/menu_repository.dart
    • lib/services/markdown_menu_parser.dart
    • lib/services/runtime_config.dart
    • lib/services/trillium_menu_parser.dart
  • Script:
    • scripts/generate_recommendation.py
  • Tooling:
    • tools/branding/generate_logo_candidates_v4.py
  • Runtime/deploy:
    • docker/entrypoint.sh
    • docker-compose.yaml
    • deploy/docker-compose.example.yaml

Runtime Config (from public/runtime_config.json)

  • site_name
  • MENU_SOURCE: local or trillium
  • TRILLIUM_URL
  • TRILLIUM_TITLE

Lowercase compatibility keys still parsed:

  • menu_source, trillium_url, trillium_title

Menu Source Modes

  • MENU_SOURCE=local
    • Read menu from local public markdown (public/menu.md path candidates).
  • MENU_SOURCE=trillium
    • Fetch HTML from TRILLIUM_URL
    • Extract article section by TRILLIUM_TITLE
    • Parse table rows -> convert to markdown table -> reuse parser.

Markdown Parser

lib/services/markdown_menu_parser.dart supports both:

  • List rows (- 名称 | 描述 | 口味 | 小料)
  • Table rows (| 名称 | 描述 | 口味 | 小料 |)

Mixed format in one category is supported.

Localization Rule

  • 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.

Recommendation Script

scripts/generate_recommendation.py:

  • Inputs:
    • OPENAI_BASE_URL / BASE_URL
    • OPENAI_API_KEY / API_KEY
    • OPENAI_MODEL / MODEL
  • Path defaults:
    • base dir from PUBLIC_DIR (default web/public)
    • output from RECOMMEND_FILE or ${PUBLIC_DIR}/recommend.md
  • 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.

Docker Env Highlights

  • SITE_NAME
  • OPENAI_BASE_URL
  • OPENAI_API_KEY
  • OPENAI_MODEL
  • MENU_SOURCE
  • TRILLIUM_URL
  • TRILLIUM_TITLE
  • RECOMMEND_CRON_SCHEDULE

Common Commands

  • flutter analyze
  • flutter test
  • flutter build web --wasm --no-source-maps --no-web-resources-cdn --no-wasm-dry-run
  • python3 scripts/generate_recommendation.py

Current UI Notes

  • Bottom bar is floating and blurred.
  • Selected dishes popup and order summary list include category grouping headers.