Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Pakistan → Shanghai Trip Assistant

Offline-first Flutter MVP that helps a Pakistani traveler survive Shanghai — language, taxi, money, shopping, suppliers, documents, emergencies — all in one app, all reachable in one or two taps.

┌──────────────────────────────────────────────────────────────────┐
│  Translator · Show-to-Local · Hotel/Taxi · Expense · Shopping   │
│  Suppliers · Places · Itinerary · Documents · Emergency          │
│                                                                  │
│        Offline-first · Local storage · PIN/biometric vault       │
└──────────────────────────────────────────────────────────────────┘

Quick start

flutter pub get        # already run once during scaffolding
flutter run            # picks up the connected device

Platform folders (android/, ios/, web/, macos/, linux/, windows/) are already scaffolded with flutter create and patched for ML Kit + STT + permissions. See docs/12-platform-configs.md for what was changed and why.

First launch:

  1. Splash → Trip setup (name, hotel, Chinese hotel address, budget).
  2. Dashboard appears with quick actions, today's plan, and readiness checks.
  3. Document vault prompts for a 4–6 digit PIN on first access.
  4. Open Translator → tap Download in the status banner to fetch the on-device EN ↔ ZH models (one-time, ~30 MB, Wi-Fi recommended).

Run a single device by id

flutter devices
flutter run -d <deviceId>

iOS extras

cd ios && pod install && cd ..
open ios/Runner.xcworkspace   # to set your signing team in Xcode

Regenerating the brand icon / splash

If you want to tweak the compass mark or splash colours:

# 1. Edit colours / glyph in tool/generate_brand_assets.py
python3 tool/generate_brand_assets.py        # writes assets/images/*.png

# 2. Rebuild platform launcher icons & native splash from the new PNGs
flutter pub run flutter_launcher_icons
flutter pub run flutter_native_splash:create

What's in the box

Layer Files
Design system lib/core/theme/ — colors, typography, spacing, theme
Reusable UI lib/core/widgets/ — cards, badges, tiles, empty state, full-screen Chinese card
Data models lib/data/models/ — 9 Hive types with manual TypeAdapters (no codegen needed)
Services lib/data/services/ — storage, translation+TTS, currency, PIN/biometric security
Seed data lib/data/seed/ — ~100 phrase cards · 14 Shanghai places · ~45 default checklist
Features lib/features/ — one folder per feature, screens inside
Docs docs/ — MVP scope, flows, IA, design system, screen plan, roadmap, risks

Tech stack

  • Flutter (Material 3)
  • Hive + path_provider — offline-first local storage
  • flutter_riverpod — state primitives (used lightly; mostly ValueListenableBuilder against Hive)
  • flutter_secure_storage + local_auth — vault PIN + biometric
  • flutter_tts — speak Chinese / English (works offline on most devices)
  • google_mlkit_translation — free on-device EN ↔ ZH translation (no API key, no backend)
  • speech_to_text — native zh-CN speech recognition for Voice translator beta
  • permission_handler — mic permission for STT
  • google_fonts — Inter + Noto Sans SC
  • url_launcher — tel: / map deep links
  • image_picker + path_provider — vault documents

Code conventions

  • One screen per file under lib/features/<feature>/.
  • Reusable widgets live in lib/core/widgets/.
  • Manual Hive TypeAdapters so the app runs without build_runner on first clone. If you add many fields, switch to codegen with flutter pub run build_runner build.
  • No prints; debugPrint behind kDebugMode.

Docs

Doc Purpose
docs/01-mvp-scope.md What's in / out of MVP, with rationale
docs/02-user-flows.md Step-by-step flows for every critical journey
docs/03-information-architecture.md Nav model, screen tree, module relationships
docs/04-design-system.md Tokens, components, full-screen Chinese card spec
docs/05-screen-ux-plan.md Screen-by-screen layout, copy, and interaction notes
docs/06-data-models.md Hive schemas + relationships
docs/07-local-storage-plan.md Boxes, sizing, encryption, migration plan
docs/08-translator-strategy.md Offline phrase library, online fallback, TTS, future ASR/MT
docs/09-development-roadmap.md P0 → P1 → P2 build order, sprint plan, deps
docs/10-risks-and-limitations.md Known gaps, mitigations, what to validate during the trip
docs/11-translation-integration.md Free / offline translation integration (ML Kit + STT + Roman Urdu)
docs/12-platform-configs.md Android + iOS native config (permissions, ML Kit metadata, SDK targets)

License

Private — personal travel tool.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages