# snyperryfle/unicureplus architecture

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

- Interactive diagram: https://gitdiagram.com/snyperryfle/unicureplus
- Repository: https://github.com/snyperryfle/unicureplus

## Overview

UniCurePlus is a Flutter supplier-facing UiTM e-procurement prototype backed by PHP/MySQL. Suppliers sign in, then use screens for invitations and tender submissions, purchase orders and delivery status, invoices, notifications, and company profiles. Authentication, order, and invoice operations are API-backed; README notes that some screens still use static demo data. The graph preserves those documented capabilities, but the UI-to-service wiring for individual screens is not established by the excerpts, so those connections are omitted. Windows runner nodes represent the platform host, not procurement logic.

Main entry points: [`backend/uitm_api/api_bootstrap.php`](https://github.com/snyperryfle/unicureplus/blob/main/backend/uitm_api/api_bootstrap.php) (API bootstrap), [`lib/screens/login_screen.dart`](https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/login_screen.dart) (Supplier login), [`lib/screens/pesanan_list_screen.dart`](https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/pesanan_list_screen.dart) (Purchase orders), [`lib/screens/invoice`](https://github.com/snyperryfle/unicureplus/tree/main/lib/screens/invoice) (Invoice workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Flutter client"]
  node_app["Application entry<br/>[main.dart]"]
  node_router["Route configuration<br/>[app_router.dart]"]
  node_models["App models<br/>[app_models.dart]"]
  node_demo["Prototype data<br/>[dummy_data.dart]"]
end

subgraph group_procurement["Procurement workflows"]
  node_login["Supplier login<br/>[login_screen.dart]"]
  node_dashboard["Dashboard<br/>[home_screen.dart]"]
  node_invitations["Invitations"]
  node_tender["Tender submission"]
  node_orders["Purchase orders"]
  node_delivery["Delivery status"]
  node_invoices["Invoice workflow"]
  node_notifications["Notifications"]
  node_profile["Company profile"]
end

subgraph group_services["Client services"]
  node_session["Auth session<br/>[auth_session.dart]"]
  node_auth_client["Auth API client<br/>[auth_api.dart]"]
  node_orders_client["Orders API client<br/>[orders_api.dart]"]
  node_invoices_client["Invoices API client<br/>[invoices_api.dart]"]
  node_invoice_store[("Invoice store<br/>[invoice_store.dart]")]
end

subgraph group_backend["PHP and data"]
  node_auth_endpoint["Auth endpoint<br/>[auth.php]"]
  node_orders_endpoint["Orders endpoint<br/>[orders.php]"]
  node_invoices_endpoint["Invoices endpoint<br/>[invoices.php]"]
  node_bootstrap["API bootstrap<br/>[api_bootstrap.php]"]
  node_database[("MySQL schema<br/>[schema.sql]")]
end

subgraph group_windows["Windows host"]
  node_win_entry["Windows entry point<br/>[main.cpp]"]
  node_flutter_window["Flutter window host<br/>[flutter_window.cpp]"]
  node_win_window["Win32 window<br/>[win32_window.cpp]"]
end

node_supplier(("Supplier"))

node_supplier -->|"signs in"| node_login
node_supplier -->|"uses"| node_dashboard
node_supplier -->|"reviews"| node_invitations
node_supplier -->|"submits tender"| node_tender
node_supplier -->|"reviews orders"| node_orders
node_supplier -->|"checks delivery"| node_delivery
node_supplier -->|"manages invoices"| node_invoices
node_supplier -->|"views"| node_notifications
node_supplier -->|"manages profile"| node_profile
node_app -.->|"configures navigation"| node_router
node_login -.->|"authenticates"| node_auth_client
node_orders -.->|"requests orders"| node_orders_client
node_invoices -.->|"requests invoices"| node_invoices_client
node_auth_client -->|"calls API"| node_auth_endpoint
node_orders_client -->|"calls API"| node_orders_endpoint
node_invoices_client -->|"calls API"| node_invoices_endpoint
node_auth_endpoint -->|"loads helpers"| node_bootstrap
node_invoices_endpoint -->|"loads helpers"| node_bootstrap
node_orders_endpoint -->|"loads helpers"| node_bootstrap
node_bootstrap -.->|"connects to"| node_database
node_win_entry -->|"creates host"| node_flutter_window
node_flutter_window -->|"extends window"| node_win_window

click node_app "https://github.com/snyperryfle/unicureplus/blob/main/lib/main.dart"
click node_router "https://github.com/snyperryfle/unicureplus/blob/main/lib/router/app_router.dart"
click node_models "https://github.com/snyperryfle/unicureplus/blob/main/lib/models/app_models.dart"
click node_demo "https://github.com/snyperryfle/unicureplus/blob/main/lib/data/dummy_data.dart"
click node_login "https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/login_screen.dart"
click node_dashboard "https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/home_screen.dart"
click node_invitations "https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/pelawaan_list_screen.dart"
click node_tender "https://github.com/snyperryfle/unicureplus/tree/main/lib/screens/tender"
click node_orders "https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/pesanan_list_screen.dart"
click node_delivery "https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/tender/tender_delivery_record_screen.dart"
click node_invoices "https://github.com/snyperryfle/unicureplus/tree/main/lib/screens/invoice"
click node_notifications "https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/notifications_screen.dart"
click node_profile "https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/profile_screen.dart"
click node_session "https://github.com/snyperryfle/unicureplus/blob/main/lib/services/auth_session.dart"
click node_auth_client "https://github.com/snyperryfle/unicureplus/blob/main/lib/services/auth_api.dart"
click node_orders_client "https://github.com/snyperryfle/unicureplus/blob/main/lib/services/orders_api.dart"
click node_invoices_client "https://github.com/snyperryfle/unicureplus/blob/main/lib/services/invoices_api.dart"
click node_invoice_store "https://github.com/snyperryfle/unicureplus/blob/main/lib/data/invoice_store.dart"
click node_auth_endpoint "https://github.com/snyperryfle/unicureplus/blob/main/backend/uitm_api/auth.php"
click node_orders_endpoint "https://github.com/snyperryfle/unicureplus/blob/main/backend/uitm_api/orders.php"
click node_invoices_endpoint "https://github.com/snyperryfle/unicureplus/blob/main/backend/uitm_api/invoices.php"
click node_bootstrap "https://github.com/snyperryfle/unicureplus/blob/main/backend/uitm_api/api_bootstrap.php"
click node_database "https://github.com/snyperryfle/unicureplus/blob/main/database/schema.sql"
click node_win_entry "https://github.com/snyperryfle/unicureplus/blob/main/windows/runner/main.cpp"
click node_flutter_window "https://github.com/snyperryfle/unicureplus/blob/main/windows/runner/flutter_window.cpp"
click node_win_window "https://github.com/snyperryfle/unicureplus/blob/main/windows/runner/win32_window.cpp"

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_app,node_router,node_models,node_demo toneBlue
class node_login,node_dashboard,node_invitations,node_tender,node_orders,node_delivery,node_invoices,node_notifications,node_profile toneAmber
class node_session,node_auth_client,node_orders_client,node_invoices_client,node_invoice_store toneMint
class node_auth_endpoint,node_orders_endpoint,node_invoices_endpoint,node_bootstrap,node_database toneRose
class node_win_entry,node_flutter_window,node_win_window,node_supplier toneIndigo
```

## Components

### Flutter client

- [Application entry](https://github.com/snyperryfle/unicureplus/blob/main/lib/main.dart): `lib/main.dart`
- [Route configuration](https://github.com/snyperryfle/unicureplus/blob/main/lib/router/app_router.dart): `lib/router/app_router.dart`
- [App models](https://github.com/snyperryfle/unicureplus/blob/main/lib/models/app_models.dart): `lib/models/app_models.dart`
- [Prototype data](https://github.com/snyperryfle/unicureplus/blob/main/lib/data/dummy_data.dart): `lib/data/dummy_data.dart`

### Procurement workflows

- [Supplier login](https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/login_screen.dart): `lib/screens/login_screen.dart`
- [Dashboard](https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/home_screen.dart): `lib/screens/home_screen.dart`
- [Invitations](https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/pelawaan_list_screen.dart): `lib/screens/pelawaan_list_screen.dart`
- [Tender submission](https://github.com/snyperryfle/unicureplus/tree/main/lib/screens/tender): `lib/screens/tender`
- [Purchase orders](https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/pesanan_list_screen.dart): `lib/screens/pesanan_list_screen.dart`
- [Delivery status](https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/tender/tender_delivery_record_screen.dart): `lib/screens/tender/tender_delivery_record_screen.dart`
- [Invoice workflow](https://github.com/snyperryfle/unicureplus/tree/main/lib/screens/invoice): `lib/screens/invoice`
- [Notifications](https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/notifications_screen.dart): `lib/screens/notifications_screen.dart`
- [Company profile](https://github.com/snyperryfle/unicureplus/blob/main/lib/screens/profile_screen.dart): `lib/screens/profile_screen.dart`

### Client services

- [Auth session](https://github.com/snyperryfle/unicureplus/blob/main/lib/services/auth_session.dart): `lib/services/auth_session.dart`
- [Auth API client](https://github.com/snyperryfle/unicureplus/blob/main/lib/services/auth_api.dart): `lib/services/auth_api.dart`
- [Orders API client](https://github.com/snyperryfle/unicureplus/blob/main/lib/services/orders_api.dart): `lib/services/orders_api.dart`
- [Invoices API client](https://github.com/snyperryfle/unicureplus/blob/main/lib/services/invoices_api.dart): `lib/services/invoices_api.dart`
- [Invoice store](https://github.com/snyperryfle/unicureplus/blob/main/lib/data/invoice_store.dart): `lib/data/invoice_store.dart`

### PHP and data

- [Auth endpoint](https://github.com/snyperryfle/unicureplus/blob/main/backend/uitm_api/auth.php): `backend/uitm_api/auth.php`
- [Orders endpoint](https://github.com/snyperryfle/unicureplus/blob/main/backend/uitm_api/orders.php): `backend/uitm_api/orders.php`
- [Invoices endpoint](https://github.com/snyperryfle/unicureplus/blob/main/backend/uitm_api/invoices.php): `backend/uitm_api/invoices.php`
- [API bootstrap](https://github.com/snyperryfle/unicureplus/blob/main/backend/uitm_api/api_bootstrap.php): `backend/uitm_api/api_bootstrap.php`
- [MySQL schema](https://github.com/snyperryfle/unicureplus/blob/main/database/schema.sql): `database/schema.sql`

### Windows host

- [Windows entry point](https://github.com/snyperryfle/unicureplus/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window host](https://github.com/snyperryfle/unicureplus/blob/main/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Win32 window](https://github.com/snyperryfle/unicureplus/blob/main/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`

### Other components

- **Supplier**

## Connections

- Supplier → Supplier login: signs in (evidence: `README.md`)
- Supplier → Dashboard: uses (evidence: `README.md`)
- Supplier → Invitations: reviews (evidence: `README.md`)
- Supplier → Tender submission: submits tender (evidence: `README.md`)
- Supplier → Purchase orders: reviews orders (evidence: `README.md`)
- Supplier → Delivery status: checks delivery (evidence: `README.md`)
- Supplier → Invoice workflow: manages invoices (evidence: `README.md`)
- Supplier → Notifications: views (evidence: `README.md`)
- Supplier → Company profile: manages profile (evidence: `README.md`)
- Application entry → Route configuration: configures navigation
- Supplier login → Auth API client: authenticates
- Purchase orders → Orders API client: requests orders
- Invoice workflow → Invoices API client: requests invoices
- Auth API client → Auth endpoint: calls API (evidence: `README.md`)
- Orders API client → Orders endpoint: calls API (evidence: `README.md`)
- Invoices API client → Invoices endpoint: calls API (evidence: `README.md`)
- Auth endpoint → API bootstrap: loads helpers (evidence: `backend/uitm_api/auth.php`)
- Invoices endpoint → API bootstrap: loads helpers (evidence: `backend/uitm_api/invoices.php`)
- Orders endpoint → API bootstrap: loads helpers (evidence: `backend/uitm_api/orders.php`)
- API bootstrap → MySQL schema: connects to
- Windows entry point → Flutter window host: creates host (evidence: `windows/runner/main.cpp`)
- Flutter window host → Win32 window: extends window
