# awadanthony33-collab/siad-pest-control-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/awadanthony33-collab/siad-pest-control-portfolio
- Repository: https://github.com/awadanthony33-collab/siad-pest-control-portfolio

## Overview

SIAD Pest Control is an offline-first field-service app for technicians. Technicians review appointments, check in with visit and vehicle details, record job-order work and rodent-station changes, and check out; the app persists work locally and synchronizes it with the company API and SQL Server. The README documents the mobile layers and sync behavior, while sampled API controllers show appointment, job-order, and client-location operations. Mobile implementation files were not included in the supplied tree, so those nodes use README-listed paths; API relationships are limited to documented or excerpted behavior.

Main entry points: [`mobile-app/lib/data`](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/data) (Repositories), [`mobile-app/lib/data/sync_service.dart`](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/mobile-app/lib/data/sync_service.dart) (Sync service), [`mobile-app/lib/data/api_client.dart`](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/mobile-app/lib/data/api_client.dart) (HTTP client), [`api/Pestcontrolapi/Areas/HelpPage/Controllers/HelpController.cs`](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Areas/HelpPage/Controllers/HelpController.cs) (Help controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Technician app"]
  node_screens["Field screens"]
  node_appointments["Appointments"]
  node_checkin["Check-in"]
  node_jobui["Job order"]
  node_locationui["Client location"]
end

subgraph group_sync["Offline data"]
  node_repositories["Repositories"]
  node_localdb[("SQLite and outbox<br/>[local_db.dart]")]
  node_syncservice["Sync service<br/>[sync_service.dart]"]
  node_monitor["Connection monitor"]
  node_apiclient["HTTP client<br/>[api_client.dart]"]
end

subgraph group_api["Service API"]
  node_api["Web API"]
  node_auth["Authentication<br/>[AuthController.cs]"]
  node_apptapi["Appointments API"]
  node_carsapi["Cars API<br/>[CarsController.cs]"]
  node_ordersapi["Job orders API"]
  node_locationsapi["Client locations API"]
  node_lookupsapi["Lookup APIs"]
  node_dbsession["Transaction session<br/>[DbSession.cs]"]
end

subgraph group_help["API help"]
  node_helpcontroller["Help controller<br/>[HelpController.cs]"]
  node_modeldocs["Model descriptions"]
  node_samples["API samples"]
end

node_tech(("Technician"))
node_sql[("SQL Server")]
node_officesite["Office website"]

node_tech -->|"uses"| node_screens
node_screens -->|"invokes"| node_repositories
node_appointments -->|"loads appointments"| node_repositories
node_checkin -->|"saves visit"| node_repositories
node_jobui -->|"saves work"| node_repositories
node_locationui -->|"saves position"| node_repositories
node_repositories -->|"writes locally"| node_localdb
node_repositories -->|"calls"| node_apiclient
node_syncservice -->|"reads outbox"| node_localdb
node_monitor -->|"triggers sync"| node_syncservice
node_syncservice -->|"sends pending changes"| node_apiclient
node_apiclient -->|"HTTPS JSON"| node_api
node_api -->|"reads and writes"| node_sql
node_officesite -->|"uses shared database"| node_sql
node_apptapi -->|"queries appointments"| node_sql
node_carsapi -->|"queries vehicles"| node_sql
node_locationsapi -->|"reads and updates locations"| node_sql
node_ordersapi -->|"uses transaction"| node_dbsession
node_dbsession -->|"executes transaction"| node_sql
node_lookupsapi -->|"queries lookup data"| node_sql
node_helpcontroller -->|"gets descriptions"| node_modeldocs
node_helpcontroller -.->|"serves API help"| node_samples

click node_screens "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/screens"
click node_appointments "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/screens/Appointment"
click node_checkin "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/screens/check_in"
click node_jobui "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/screens/job_order"
click node_locationui "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/screens/client_location"
click node_repositories "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/data"
click node_localdb "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/mobile-app/lib/data/local_db.dart"
click node_syncservice "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/mobile-app/lib/data/sync_service.dart"
click node_monitor "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/mobile-app/lib/data/connection_monitor.dart"
click node_apiclient "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/mobile-app/lib/data/api_client.dart"
click node_api "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/api/Pestcontrolapi/Controllers"
click node_auth "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Controllers/AuthController.cs"
click node_apptapi "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Controllers/AppointmentsController.cs"
click node_carsapi "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Controllers/CarsController.cs"
click node_ordersapi "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Controllers/JobOrdersController.cs"
click node_locationsapi "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Controllers/ClientLocationsController.cs"
click node_lookupsapi "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Controllers/LookupController.cs"
click node_dbsession "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Data/DbSession.cs"
click node_helpcontroller "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Areas/HelpPage/Controllers/HelpController.cs"
click node_modeldocs "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Areas/HelpPage/ModelDescriptions/ModelDescriptionGenerator.cs"
click node_samples "https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs"

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_screens,node_appointments,node_checkin,node_jobui,node_locationui toneBlue
class node_repositories,node_localdb,node_syncservice,node_monitor,node_apiclient,node_sql toneAmber
class node_api,node_auth,node_apptapi,node_carsapi,node_ordersapi,node_locationsapi,node_lookupsapi,node_dbsession toneMint
class node_helpcontroller,node_modeldocs,node_samples toneRose
class node_tech,node_officesite toneIndigo
```

## Components

### Technician app

- [Field screens](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/screens): `mobile-app/lib/screens`
- [Appointments](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/screens/Appointment): `mobile-app/lib/screens/Appointment`
- [Check-in](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/screens/check_in): `mobile-app/lib/screens/check_in`
- [Job order](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/screens/job_order): `mobile-app/lib/screens/job_order`
- [Client location](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/screens/client_location): `mobile-app/lib/screens/client_location`

### Offline data

- [Repositories](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/mobile-app/lib/data): `mobile-app/lib/data`
- [SQLite and outbox](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/mobile-app/lib/data/local_db.dart): `mobile-app/lib/data/local_db.dart`
- [Sync service](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/mobile-app/lib/data/sync_service.dart): `mobile-app/lib/data/sync_service.dart`
- [Connection monitor](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/mobile-app/lib/data/connection_monitor.dart): `mobile-app/lib/data/connection_monitor.dart`
- [HTTP client](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/mobile-app/lib/data/api_client.dart): `mobile-app/lib/data/api_client.dart`

### Service API

- [Web API](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/tree/main/api/Pestcontrolapi/Controllers): `api/Pestcontrolapi/Controllers`
- [Authentication](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Controllers/AuthController.cs): `api/Pestcontrolapi/Controllers/AuthController.cs`
- [Appointments API](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Controllers/AppointmentsController.cs): `api/Pestcontrolapi/Controllers/AppointmentsController.cs`
- [Cars API](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Controllers/CarsController.cs): `api/Pestcontrolapi/Controllers/CarsController.cs`
- [Job orders API](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Controllers/JobOrdersController.cs): `api/Pestcontrolapi/Controllers/JobOrdersController.cs`
- [Client locations API](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Controllers/ClientLocationsController.cs): `api/Pestcontrolapi/Controllers/ClientLocationsController.cs`
- [Lookup APIs](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Controllers/LookupController.cs): `api/Pestcontrolapi/Controllers/LookupController.cs`
- [Transaction session](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Data/DbSession.cs): `api/Pestcontrolapi/Data/DbSession.cs`

### API help

- [Help controller](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Areas/HelpPage/Controllers/HelpController.cs): `api/Pestcontrolapi/Areas/HelpPage/Controllers/HelpController.cs`
- [Model descriptions](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Areas/HelpPage/ModelDescriptions/ModelDescriptionGenerator.cs): `api/Pestcontrolapi/Areas/HelpPage/ModelDescriptions/ModelDescriptionGenerator.cs`
- [API samples](https://github.com/awadanthony33-collab/siad-pest-control-portfolio/blob/main/api/Pestcontrolapi/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs): `api/Pestcontrolapi/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs`

### Other components

- **Technician**
- **SQL Server**
- **Office website**

## Connections

- Technician → Field screens: uses
- Field screens → Repositories: invokes
- Appointments → Repositories: loads appointments
- Check-in → Repositories: saves visit
- Job order → Repositories: saves work
- Client location → Repositories: saves position
- Repositories → SQLite and outbox: writes locally
- Repositories → HTTP client: calls
- Sync service → SQLite and outbox: reads outbox
- Connection monitor → Sync service: triggers sync
- Sync service → HTTP client: sends pending changes
- HTTP client → Web API: HTTPS JSON
- Web API → SQL Server: reads and writes
- Office website → SQL Server: uses shared database
- Appointments API → SQL Server: queries appointments (evidence: `api/Pestcontrolapi/Controllers/AppointmentsController.cs`)
- Cars API → SQL Server: queries vehicles (evidence: `api/Pestcontrolapi/Controllers/CarsController.cs`)
- Client locations API → SQL Server: reads and updates locations (evidence: `api/Pestcontrolapi/Controllers/ClientLocationsController.cs`)
- Job orders API → Transaction session: uses transaction (evidence: `api/Pestcontrolapi/Controllers/JobOrdersController.cs`)
- Transaction session → SQL Server: executes transaction (evidence: `api/Pestcontrolapi/Data/DbSession.cs`)
- Lookup APIs → SQL Server: queries lookup data
- Help controller → Model descriptions: gets descriptions (evidence: `api/Pestcontrolapi/Areas/HelpPage/Controllers/HelpController.cs`)
- Help controller → API samples: serves API help
