# poovarasanace39-lab/buildmove architecture

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

- Interactive diagram: https://gitdiagram.com/poovarasanace39-lab/buildmove
- Repository: https://github.com/poovarasanace39-lab/buildmove

## Overview

BuildMove is a heavy-material logistics API with Flutter platform shells. The clearest workflow shown is a driver or other client sending booking GPS updates over a WebSocket, which the API relays to clients in that booking room. The backend also defines persistence models for bookings, trips, users, drivers, vehicles, payments, reviews, and notifications. The tree contains no Flutter application source, and the excerpts do not show booking or payment handlers, so those capabilities are represented only by their model layer.

Main entry points: [`backend/app/core/database.py`](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/core/database.py) (Database Session), [`backend/app/main.py`](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/main.py) (FastAPI App), [`backend/app/websocket/connection_manager.py`](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/websocket/connection_manager.py) (Room Broadcaster), [`backend/app/models/booking.py`](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/booking.py) (Bookings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and Tracking"]
  node_api["FastAPI App<br/>[main.py]"]
  node_manager["Room Broadcaster"]
  node_config["API Configuration<br/>[config.py]"]
end

subgraph group_records["Logistics Records"]
  node_database[("Database Session<br/>[database.py]")]
  node_booking["Bookings<br/>[booking.py]"]
  node_trip["Trips<br/>[trip.py]"]
  node_user["Users<br/>[user.py]"]
  node_driver["Driver Profiles<br/>[driver_profile.py]"]
  node_vehicle["Vehicles<br/>[vehicle.py]"]
  node_payment["Payments<br/>[payment.py]"]
  node_review["Reviews and Notices<br/>[review.py]"]
end

subgraph group_shells["Flutter Platform Shells"]
  node_ios["iOS Runner<br/>[AppDelegate.swift]"]
  node_macos["macOS Runner<br/>[AppDelegate.swift]"]
  node_linux["Linux Runner<br/>[main.cc]"]
  node_windows["Windows Runner<br/>[main.cpp]"]
  node_flutterwindow["Flutter Window Host<br/>[flutter_window.h]"]
end

node_clients(("Tracking Clients"))

node_clients -->|"connects to"| node_api
node_api -->|"reads settings"| node_config
node_api -->|"routes tracking"| node_manager
node_manager -->|"broadcasts updates"| node_clients
node_booking -->|"uses base"| node_database
node_trip -->|"uses base"| node_database
node_user -->|"uses base"| node_database
node_driver -->|"uses base"| node_database
node_vehicle -->|"uses base"| node_database
node_payment -->|"uses base"| node_database
node_review -->|"uses base"| node_database
node_windows -->|"creates host"| node_flutterwindow

click node_api "https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/main.py"
click node_manager "https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/websocket/connection_manager.py"
click node_config "https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/core/config.py"
click node_database "https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/core/database.py"
click node_booking "https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/booking.py"
click node_trip "https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/trip.py"
click node_user "https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/user.py"
click node_driver "https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/driver_profile.py"
click node_vehicle "https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/vehicle.py"
click node_payment "https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/payment.py"
click node_review "https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/review.py"
click node_ios "https://github.com/poovarasanace39-lab/buildmove/blob/main/ios/Runner/AppDelegate.swift"
click node_macos "https://github.com/poovarasanace39-lab/buildmove/blob/main/macos/Runner/AppDelegate.swift"
click node_linux "https://github.com/poovarasanace39-lab/buildmove/blob/main/linux/runner/main.cc"
click node_windows "https://github.com/poovarasanace39-lab/buildmove/blob/main/windows/runner/main.cpp"
click node_flutterwindow "https://github.com/poovarasanace39-lab/buildmove/blob/main/windows/runner/flutter_window.h"

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_api,node_manager,node_config,node_clients toneBlue
class node_database,node_booking,node_trip,node_user,node_driver,node_vehicle,node_payment,node_review toneAmber
class node_ios,node_macos,node_linux,node_windows,node_flutterwindow toneMint
```

## Components

### API and Tracking

- [FastAPI App](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/main.py): `backend/app/main.py`
- [Room Broadcaster](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/websocket/connection_manager.py): `backend/app/websocket/connection_manager.py`
- [API Configuration](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/core/config.py): `backend/app/core/config.py`

### Logistics Records

- [Database Session](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/core/database.py): `backend/app/core/database.py`
- [Bookings](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/booking.py): `backend/app/models/booking.py`
- [Trips](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/trip.py): `backend/app/models/trip.py`
- [Users](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/user.py): `backend/app/models/user.py`
- [Driver Profiles](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/driver_profile.py): `backend/app/models/driver_profile.py`
- [Vehicles](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/vehicle.py): `backend/app/models/vehicle.py`
- [Payments](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/payment.py): `backend/app/models/payment.py`
- [Reviews and Notices](https://github.com/poovarasanace39-lab/buildmove/blob/main/backend/app/models/review.py): `backend/app/models/review.py`

### Flutter Platform Shells

- [iOS Runner](https://github.com/poovarasanace39-lab/buildmove/blob/main/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`
- [macOS Runner](https://github.com/poovarasanace39-lab/buildmove/blob/main/macos/Runner/AppDelegate.swift): `macos/Runner/AppDelegate.swift`
- [Linux Runner](https://github.com/poovarasanace39-lab/buildmove/blob/main/linux/runner/main.cc): `linux/runner/main.cc`
- [Windows Runner](https://github.com/poovarasanace39-lab/buildmove/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter Window Host](https://github.com/poovarasanace39-lab/buildmove/blob/main/windows/runner/flutter_window.h): `windows/runner/flutter_window.h`

### Other components

- **Tracking Clients**

## Connections

- Tracking Clients → FastAPI App: connects to (evidence: `backend/app/main.py`)
- FastAPI App → API Configuration: reads settings (evidence: `backend/app/main.py`)
- FastAPI App → Room Broadcaster: routes tracking (evidence: `backend/app/main.py`)
- Room Broadcaster → Tracking Clients: broadcasts updates (evidence: `backend/app/websocket/connection_manager.py`)
- Bookings → Database Session: uses base (evidence: `backend/app/models/booking.py`)
- Trips → Database Session: uses base (evidence: `backend/app/models/trip.py`)
- Users → Database Session: uses base (evidence: `backend/app/models/user.py`)
- Driver Profiles → Database Session: uses base (evidence: `backend/app/models/driver_profile.py`)
- Vehicles → Database Session: uses base (evidence: `backend/app/models/vehicle.py`)
- Payments → Database Session: uses base (evidence: `backend/app/models/payment.py`)
- Reviews and Notices → Database Session: uses base (evidence: `backend/app/models/review.py`)
- Windows Runner → Flutter Window Host: creates host (evidence: `windows/runner/main.cpp`)
