# theemomo/miqat architecture

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

- Interactive diagram: https://gitdiagram.com/theemomo/miqat
- Repository: https://github.com/theemomo/miqat

## Overview

Miqat is a Flutter cross-platform app, but its README does not document product behavior and the sampled source is almost entirely native platform bootstrap code. The tree suggests user trip booking and company trip/resource management as the main workflows, plus account, payment, reporting, and security features; implementation-level links among these Dart modules are not evidenced here. The graph therefore shows the confirmed Windows launch path and treats product subsystems as distinct, unverified areas rather than inventing a workflow.

Main entry points: [`lib/core/cubit/company_cubits`](https://github.com/theemomo/miqat/tree/master/lib/core/cubit/company_cubits) (Company state), [`lib/core/services`](https://github.com/theemomo/miqat/tree/master/lib/core/services) (API services), [`lib/pages/user`](https://github.com/theemomo/miqat/tree/master/lib/pages/user) (Trip discovery and booking), [`lib/config/routes`](https://github.com/theemomo/miqat/tree/master/lib/config/routes) (App routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["Windows host"]
  node_win_entry["Windows entry<br/>[main.cpp]"]
  node_flutter_window["Flutter window<br/>[flutter_window.h]"]
  node_win_base["Win32 window<br/>[win32_window.h]"]
end

subgraph group_user["Traveler experience"]
  node_user_ui["Trip discovery and booking"]
  node_user_auth["Traveler accounts"]
  node_user_profile["Profile and favorites"]
  node_user_cubit["Traveler state"]
end

subgraph group_company["Company operations"]
  node_company_ui["Company trip operations"]
  node_company_booking["Booking management"]
  node_company_resources["Resource management"]
  node_company_jobs["Jobs and roles"]
  node_company_reports["Reports and dashboard"]
  node_company_cubit["Company state"]
end

subgraph group_shared["Shared services"]
  node_routing["App routing"]
  node_api["API services"]
  node_api_client["HTTP client<br/>[api_client.dart]"]
  node_security["Security services"]
  node_models["Domain models"]
end

node_user_actor(("Traveler"))

node_win_entry -->|"creates"| node_flutter_window
node_flutter_window -->|"inherits"| node_win_base
node_user_actor -.->|"uses"| node_user_ui
node_user_ui -.->|"dispatches"| node_user_cubit
node_user_ui -.->|"requests"| node_api
node_user_auth -.->|"authenticates"| node_api
node_user_profile -.->|"uses"| node_user_cubit
node_company_ui -.->|"dispatches"| node_company_cubit
node_company_booking -.->|"uses"| node_company_cubit
node_company_resources -.->|"uses"| node_company_cubit
node_company_jobs -.->|"uses"| node_company_cubit
node_company_reports -.->|"uses"| node_company_cubit
node_company_cubit -.->|"requests"| node_api
node_api -.->|"uses"| node_api_client
node_api -.->|"exchanges"| node_models
node_routing -.->|"routes"| node_user_ui
node_routing -.->|"routes"| node_company_ui
node_api_client -.->|"may apply"| node_security

click node_win_entry "https://github.com/theemomo/miqat/blob/master/windows/runner/main.cpp"
click node_flutter_window "https://github.com/theemomo/miqat/blob/master/windows/runner/flutter_window.h"
click node_win_base "https://github.com/theemomo/miqat/blob/master/windows/runner/win32_window.h"
click node_user_ui "https://github.com/theemomo/miqat/tree/master/lib/pages/user"
click node_user_auth "https://github.com/theemomo/miqat/tree/master/lib/pages/user/auth"
click node_user_profile "https://github.com/theemomo/miqat/tree/master/lib/pages/user/profile_and_settings"
click node_user_cubit "https://github.com/theemomo/miqat/tree/master/lib/core/cubit/user_cubits"
click node_company_ui "https://github.com/theemomo/miqat/tree/master/lib/pages/company/trip_management"
click node_company_booking "https://github.com/theemomo/miqat/tree/master/lib/pages/company/booking_managment"
click node_company_resources "https://github.com/theemomo/miqat/tree/master/lib/pages/company/resource_management"
click node_company_jobs "https://github.com/theemomo/miqat/tree/master/lib/pages/company/jobs_and_roles"
click node_company_reports "https://github.com/theemomo/miqat/tree/master/lib/pages/company/adds"
click node_company_cubit "https://github.com/theemomo/miqat/tree/master/lib/core/cubit/company_cubits"
click node_routing "https://github.com/theemomo/miqat/tree/master/lib/config/routes"
click node_api "https://github.com/theemomo/miqat/tree/master/lib/core/services"
click node_api_client "https://github.com/theemomo/miqat/blob/master/lib/core/services/token_handling/api_client.dart"
click node_security "https://github.com/theemomo/miqat/tree/master/lib/security"
click node_models "https://github.com/theemomo/miqat/tree/master/lib/core/models"

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_win_entry,node_flutter_window,node_win_base toneBlue
class node_user_ui,node_user_auth,node_user_profile,node_user_cubit toneAmber
class node_company_ui,node_company_booking,node_company_resources,node_company_jobs,node_company_reports,node_company_cubit toneMint
class node_routing,node_api,node_api_client,node_security,node_models toneRose
class node_user_actor toneIndigo
```

## Components

### Windows host

- [Windows entry](https://github.com/theemomo/miqat/blob/master/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window](https://github.com/theemomo/miqat/blob/master/windows/runner/flutter_window.h): `windows/runner/flutter_window.h`
- [Win32 window](https://github.com/theemomo/miqat/blob/master/windows/runner/win32_window.h): `windows/runner/win32_window.h`

### Traveler experience

- [Trip discovery and booking](https://github.com/theemomo/miqat/tree/master/lib/pages/user): `lib/pages/user`
- [Traveler accounts](https://github.com/theemomo/miqat/tree/master/lib/pages/user/auth): `lib/pages/user/auth`
- [Profile and favorites](https://github.com/theemomo/miqat/tree/master/lib/pages/user/profile_and_settings): `lib/pages/user/profile_and_settings`
- [Traveler state](https://github.com/theemomo/miqat/tree/master/lib/core/cubit/user_cubits): `lib/core/cubit/user_cubits`

### Company operations

- [Company trip operations](https://github.com/theemomo/miqat/tree/master/lib/pages/company/trip_management): `lib/pages/company/trip_management`
- [Booking management](https://github.com/theemomo/miqat/tree/master/lib/pages/company/booking_managment): `lib/pages/company/booking_managment`
- [Resource management](https://github.com/theemomo/miqat/tree/master/lib/pages/company/resource_management): `lib/pages/company/resource_management`
- [Jobs and roles](https://github.com/theemomo/miqat/tree/master/lib/pages/company/jobs_and_roles): `lib/pages/company/jobs_and_roles`
- [Reports and dashboard](https://github.com/theemomo/miqat/tree/master/lib/pages/company/adds): `lib/pages/company/adds`
- [Company state](https://github.com/theemomo/miqat/tree/master/lib/core/cubit/company_cubits): `lib/core/cubit/company_cubits`

### Shared services

- [App routing](https://github.com/theemomo/miqat/tree/master/lib/config/routes): `lib/config/routes`
- [API services](https://github.com/theemomo/miqat/tree/master/lib/core/services): `lib/core/services`
- [HTTP client](https://github.com/theemomo/miqat/blob/master/lib/core/services/token_handling/api_client.dart): `lib/core/services/token_handling/api_client.dart`
- [Security services](https://github.com/theemomo/miqat/tree/master/lib/security): `lib/security`
- [Domain models](https://github.com/theemomo/miqat/tree/master/lib/core/models): `lib/core/models`

### Other components

- **Traveler**

## Connections

- Windows entry → Flutter window: creates (evidence: `windows/runner/main.cpp`)
- Flutter window → Win32 window: inherits (evidence: `windows/runner/flutter_window.h`)
- Traveler → Trip discovery and booking: uses
- Trip discovery and booking → Traveler state: dispatches
- Trip discovery and booking → API services: requests
- Traveler accounts → API services: authenticates
- Profile and favorites → Traveler state: uses
- Company trip operations → Company state: dispatches
- Booking management → Company state: uses
- Resource management → Company state: uses
- Jobs and roles → Company state: uses
- Reports and dashboard → Company state: uses
- Company state → API services: requests
- API services → HTTP client: uses
- API services → Domain models: exchanges
- App routing → Trip discovery and booking: routes
- App routing → Company trip operations: routes
- HTTP client → Security services: may apply
