# rammeobu/metu architecture

> Architecture diagram of the GitHub repository rammeobu/metu, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rammeobu/metu
- Repository: https://github.com/rammeobu/metu

## Overview

Met U is a Flutter travel-planning app for travelers working within a fixed budget. The documented main journey is login, four-step trip onboarding, AI-generated budget summary, and a home dashboard for ongoing trip tools. The README describes the AI pipeline as normalization, classification, retrieval, budget reasoning, and validation, but also notes that the current implementation enters through TripService.previewPlan() and OpenRouterService.summarizePlan(); the finer pipeline stages are documented design, not confirmed sampled implementations. Relationships below rely on README statements because Dart source was not excerpted.

Main entry points: [`lib/services/trip_service.dart`](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_service.dart) (Trip Service), [`lib/screens/home_screen.dart`](https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/home_screen.dart) (Home Dashboard), [`lib/providers/onboarding_provider.dart`](https://github.com/rammeobu/metu/blob/frontend-app/lib/providers/onboarding_provider.dart) (Trip Onboarding), [`lib/screens/api_settings_screen.dart`](https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/api_settings_screen.dart) (API Configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["Trip Planning"]
  node_login["Login UI<br/>[login_screen.dart]"]
  node_onboarding["Trip Onboarding"]
  node_tripdata["Trip Models<br/>[models.dart]"]
  node_summary["Trip Summary<br/>[models.dart]"]
  node_home["Home Dashboard<br/>[home_screen.dart]"]
end

subgraph group_ai["AI Planning"]
  node_tripservice["Trip Service<br/>[trip_service.dart]"]
  node_normalize["Input Normalization<br/>[trip_service.dart]"]
  node_classify["Trip Classification<br/>[trip_service.dart]"]
  node_retrieval["Travel Data Retrieval<br/>[trip_service.dart]"]
  node_budget["Budget Reasoning<br/>[trip_service.dart]"]
  node_ai_summary["AI Summary"]
  node_openrouter["OpenRouter"]
end

subgraph group_travel["Travel Tools"]
  node_docrules["Country Document Rules"]
  node_flight["Flight Search"]
  node_hotel["Hotel Search"]
  node_restaurant["Restaurant Search"]
  node_checklist["Travel Checklist"]
end

subgraph group_social["Community"]
  node_community["Community UI"]
  node_chat["Chat UI"]
end

subgraph group_platform["App Services"]
  node_auth["Authentication<br/>[auth_service.dart]"]
  node_tripstore[("Trip Store<br/>[trip_store.dart]")]
  node_checkstore[("Checklist Store")]
  node_community_store[("Community Store")]
  node_chatstore[("Chat Store<br/>[chat_store.dart]")]
  node_api["Backend API Client<br/>[api_service.dart]"]
  node_backend["Met U Backend"]
  node_config["API Configuration"]
  node_aikey[("AI Key Store")]
end

node_traveler(("Traveler"))

node_traveler -->|"signs in"| node_login
node_login -->|"starts login"| node_auth
node_traveler -->|"enters trip details"| node_onboarding
node_onboarding -->|"creates plan"| node_tripdata
node_onboarding -->|"requests preview"| node_tripservice
node_tripservice -->|"normalizes input"| node_normalize
node_tripservice -->|"classifies trip"| node_classify
node_tripservice -->|"retrieves context"| node_retrieval
node_retrieval -->|"reads rules"| node_docrules
node_tripservice -->|"calculates allocation"| node_budget
node_tripservice -->|"requests summary"| node_ai_summary
node_ai_summary -->|"calls model"| node_openrouter
node_tripservice -->|"assembles preview"| node_summary
node_tripservice -->|"saves confirmed trip"| node_tripstore
node_summary -->|"informs dashboard"| node_home
node_home -->|"offers flight search"| node_flight
node_home -->|"offers hotel search"| node_hotel
node_home -->|"offers dining search"| node_restaurant
node_home -->|"offers documents"| node_checklist
node_checklist -.->|"stores checklist"| node_checkstore
node_community -.->|"uses store"| node_community_store
node_chat -.->|"uses store"| node_chatstore
node_config -->|"configures endpoint"| node_api
node_api -->|"sends requests"| node_backend
node_config -->|"saves AI key"| node_aikey

click node_login "https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/login_screen.dart"
click node_auth "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/auth_service.dart"
click node_onboarding "https://github.com/rammeobu/metu/blob/frontend-app/lib/providers/onboarding_provider.dart"
click node_tripdata "https://github.com/rammeobu/metu/blob/frontend-app/lib/models/models.dart"
click node_tripservice "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_service.dart"
click node_normalize "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_service.dart"
click node_classify "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_service.dart"
click node_retrieval "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_service.dart"
click node_docrules "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/country_doc_rules.dart"
click node_budget "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_service.dart"
click node_ai_summary "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/openrouter_service.dart"
click node_tripstore "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_store.dart"
click node_summary "https://github.com/rammeobu/metu/blob/frontend-app/lib/models/models.dart"
click node_home "https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/home_screen.dart"
click node_flight "https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/flight_search_screen.dart"
click node_hotel "https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/hotel_search_screen.dart"
click node_restaurant "https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/restaurant_screen.dart"
click node_checklist "https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/documents_checklist_screen.dart"
click node_checkstore "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/checklist_store.dart"
click node_community "https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/community_screen.dart"
click node_community_store "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/community_store.dart"
click node_chat "https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/chat_list_screen.dart"
click node_chatstore "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/chat_store.dart"
click node_api "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/api_service.dart"
click node_config "https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/api_settings_screen.dart"
click node_aikey "https://github.com/rammeobu/metu/blob/frontend-app/lib/services/ai_config_store.dart"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_login,node_onboarding,node_tripdata,node_summary,node_home toneBlue
class node_tripservice,node_normalize,node_classify,node_retrieval,node_budget,node_ai_summary,node_openrouter toneAmber
class node_docrules,node_flight,node_hotel,node_restaurant,node_checklist toneMint
class node_community,node_chat toneRose
class node_auth,node_tripstore,node_checkstore,node_community_store,node_chatstore,node_api,node_backend,node_config,node_aikey,node_traveler toneIndigo
```

## Components

### Trip Planning

- [Login UI](https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/login_screen.dart): `lib/screens/login_screen.dart`
- [Trip Onboarding](https://github.com/rammeobu/metu/blob/frontend-app/lib/providers/onboarding_provider.dart): `lib/providers/onboarding_provider.dart`
- [Trip Models](https://github.com/rammeobu/metu/blob/frontend-app/lib/models/models.dart): `lib/models/models.dart`
- [Trip Summary](https://github.com/rammeobu/metu/blob/frontend-app/lib/models/models.dart): `lib/models/models.dart`
- [Home Dashboard](https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/home_screen.dart): `lib/screens/home_screen.dart`

### AI Planning

- [Trip Service](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_service.dart): `lib/services/trip_service.dart`
- [Input Normalization](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_service.dart): `lib/services/trip_service.dart`
- [Trip Classification](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_service.dart): `lib/services/trip_service.dart`
- [Travel Data Retrieval](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_service.dart): `lib/services/trip_service.dart`
- [Budget Reasoning](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_service.dart): `lib/services/trip_service.dart`
- [AI Summary](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/openrouter_service.dart): `lib/services/openrouter_service.dart`
- **OpenRouter**

### Travel Tools

- [Country Document Rules](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/country_doc_rules.dart): `lib/services/country_doc_rules.dart`
- [Flight Search](https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/flight_search_screen.dart): `lib/screens/flight_search_screen.dart`
- [Hotel Search](https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/hotel_search_screen.dart): `lib/screens/hotel_search_screen.dart`
- [Restaurant Search](https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/restaurant_screen.dart): `lib/screens/restaurant_screen.dart`
- [Travel Checklist](https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/documents_checklist_screen.dart): `lib/screens/documents_checklist_screen.dart`

### Community

- [Community UI](https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/community_screen.dart): `lib/screens/community_screen.dart`
- [Chat UI](https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/chat_list_screen.dart): `lib/screens/chat_list_screen.dart`

### App Services

- [Authentication](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/auth_service.dart): `lib/services/auth_service.dart`
- [Trip Store](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/trip_store.dart): `lib/services/trip_store.dart`
- [Checklist Store](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/checklist_store.dart): `lib/services/checklist_store.dart`
- [Community Store](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/community_store.dart): `lib/services/community_store.dart`
- [Chat Store](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/chat_store.dart): `lib/services/chat_store.dart`
- [Backend API Client](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/api_service.dart): `lib/services/api_service.dart`
- **Met U Backend**
- [API Configuration](https://github.com/rammeobu/metu/blob/frontend-app/lib/screens/api_settings_screen.dart): `lib/screens/api_settings_screen.dart`
- [AI Key Store](https://github.com/rammeobu/metu/blob/frontend-app/lib/services/ai_config_store.dart): `lib/services/ai_config_store.dart`

### Other components

- **Traveler**

## Connections

- Traveler → Login UI: signs in (evidence: `README.md`)
- Login UI → Authentication: starts login (evidence: `README.md`)
- Traveler → Trip Onboarding: enters trip details (evidence: `README.md`)
- Trip Onboarding → Trip Models: creates plan (evidence: `README.md`)
- Trip Onboarding → Trip Service: requests preview (evidence: `README.md`)
- Trip Service → Input Normalization: normalizes input (evidence: `README.md`)
- Trip Service → Trip Classification: classifies trip (evidence: `README.md`)
- Trip Service → Travel Data Retrieval: retrieves context (evidence: `README.md`)
- Travel Data Retrieval → Country Document Rules: reads rules (evidence: `README.md`)
- Trip Service → Budget Reasoning: calculates allocation (evidence: `README.md`)
- Trip Service → AI Summary: requests summary (evidence: `README.md`)
- AI Summary → OpenRouter: calls model (evidence: `README.md`)
- Trip Service → Trip Summary: assembles preview (evidence: `README.md`)
- Trip Service → Trip Store: saves confirmed trip (evidence: `README.md`)
- Trip Summary → Home Dashboard: informs dashboard (evidence: `README.md`)
- Home Dashboard → Flight Search: offers flight search (evidence: `README.md`)
- Home Dashboard → Hotel Search: offers hotel search (evidence: `README.md`)
- Home Dashboard → Restaurant Search: offers dining search (evidence: `README.md`)
- Home Dashboard → Travel Checklist: offers documents (evidence: `README.md`)
- Travel Checklist → Checklist Store: stores checklist
- Community UI → Community Store: uses store
- Chat UI → Chat Store: uses store
- API Configuration → Backend API Client: configures endpoint (evidence: `README.md`)
- Backend API Client → Met U Backend: sends requests (evidence: `README.md`)
- API Configuration → AI Key Store: saves AI key (evidence: `README.md`)
