# spectator-code/umakonekta architecture

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

- Interactive diagram: https://gitdiagram.com/spectator-code/umakonekta
- Repository: https://github.com/spectator-code/umakonekta

## Overview

UMAKONEKTA is a Philippine agricultural machinery exchange and agrarian operations suite. Its core workflow is farmers discovering cooperative equipment, submitting field or repair requests, and operators/providers managing dispatches; related pages support field-ticket verification, farmer records, grain settlement, and community notices. The API excerpts establish request, dashboard, provider, mechanic, dispatch-slip, authentication, and security behavior. Page-to-API wiring and implementations of several documented screens were not sampled, so those connections are shown only where supported by the route purpose or README.

Main entry points: [`src/lib/prisma.js`](https://github.com/spectator-code/umakonekta/blob/main/src/lib/prisma.js) (Application database), [`src/app/api/auth/[...nextauth]/route.js`](https://github.com/spectator-code/umakonekta/blob/main/src/app/api/auth/%5B...nextauth%5D/route.js) (Authentication API), [`src/app/api/dashboard/route.js`](https://github.com/spectator-code/umakonekta/blob/main/src/app/api/dashboard/route.js) (Dashboard aggregates), [`src/app/admin/page.js`](https://github.com/spectator-code/umakonekta/blob/main/src/app/admin/page.js) (Administration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_exchange["Equipment exchange"]
  node_home["Agrarian home<br/>[page.js]"]
  node_marketplace["Equipment marketplace<br/>[page.js]"]
  node_providers["Provider directory API<br/>[route.js]"]
  node_requests["Request management API<br/>[route.js]"]
  node_farmerdash["Farmer dashboard<br/>[page.js]"]
  node_providerdash["Provider dashboard<br/>[page.js]"]
  node_dashboardapi["Dashboard aggregates<br/>[route.js]"]
end

subgraph group_operations["Field operations"]
  node_mechanicspage["Mechanic dashboard<br/>[page.js]"]
  node_mechanicsapi["Repair work orders<br/>[route.js]"]
  node_dispatchpage["Dispatch slip<br/>[page.js]"]
  node_dispatchapi["Ticket verification<br/>[route.js]"]
  node_calendar["Operations calendar API<br/>[route.js]"]
end

subgraph group_settlement["Agrarian records"]
  node_sacco["SACCO receipt<br/>[page.js]"]
  node_bulletin["Barangay bulletin<br/>[page.js]"]
end

subgraph group_identity["Identity and security"]
  node_adminpage["Administration<br/>[page.js]"]
  node_adminfarmers["Farmer administration API<br/>[route.js]"]
  node_login["Authentication API<br/>[route.js]"]
  node_register["Registration API<br/>[route.js]"]
  node_secopsapi["Security operations APIs"]
  node_siem["Security event logging<br/>[siem.js]"]
end

subgraph group_platform["Offline platform"]
  node_database[("Application database<br/>[prisma.js]")]
  node_serviceworker["Offline service worker<br/>[sw.js]"]
end

node_farmer(("Farmer"))
node_provider(("Provider"))
node_mechanic(("Mechanic"))
node_admin(("Administrator"))
node_secops(("SecOps"))
node_geo["IP geolocation service"]

node_farmer -->|"opens"| node_home
node_farmer -->|"searches equipment"| node_marketplace
node_marketplace -->|"loads providers"| node_providers
node_farmer -->|"submits request"| node_requests
node_provider -->|"updates request"| node_requests
node_farmer -->|"views ledger"| node_farmerdash
node_provider -->|"views workload"| node_providerdash
node_farmerdash -->|"loads aggregates"| node_dashboardapi
node_providerdash -->|"loads aggregates"| node_dashboardapi
node_adminpage -->|"loads aggregates"| node_dashboardapi
node_mechanic -->|"manages repairs"| node_mechanicspage
node_mechanicspage -->|"claims and closes"| node_mechanicsapi
node_farmer -->|"views field ticket"| node_dispatchpage
node_dispatchpage -->|"verifies ticket"| node_dispatchapi
node_provider -->|"views fleet schedule"| node_calendar
node_farmer -->|"records grain settlement"| node_sacco
node_farmer -->|"reads notices"| node_bulletin
node_admin -->|"manages platform"| node_adminpage
node_adminpage -->|"manages farmers"| node_adminfarmers
node_farmer -->|"registers"| node_register
node_farmer -->|"authenticates"| node_login
node_provider -->|"authenticates"| node_login
node_mechanic -->|"authenticates"| node_login
node_login -->|"reads users"| node_database
node_register -->|"creates user"| node_database
node_requests -->|"reads and writes"| node_database
node_providers -->|"reads directory"| node_database
node_dashboardapi -->|"aggregates records"| node_database
node_mechanicsapi -->|"updates work orders"| node_database
node_dispatchapi -->|"reads ticket"| node_database
node_calendar -->|"reads fleet schedule"| node_database
node_adminfarmers -->|"manages accounts"| node_database
node_secops -->|"investigates threats"| node_secopsapi
node_secopsapi -->|"reads and updates security data"| node_database
node_login -->|"logs security events"| node_siem
node_adminfarmers -->|"logs security events"| node_siem
node_secopsapi -->|"records firewall changes"| node_siem
node_register -.->|"checks IP location"| node_geo
node_farmer -.->|"uses offline experience"| node_serviceworker

click node_home "https://github.com/spectator-code/umakonekta/blob/main/src/app/page.js"
click node_marketplace "https://github.com/spectator-code/umakonekta/blob/main/src/app/marketplace/page.js"
click node_providers "https://github.com/spectator-code/umakonekta/blob/main/src/app/api/providers/route.js"
click node_requests "https://github.com/spectator-code/umakonekta/blob/main/src/app/api/requests/route.js"
click node_farmerdash "https://github.com/spectator-code/umakonekta/blob/main/src/app/farmer-dashboard/page.js"
click node_providerdash "https://github.com/spectator-code/umakonekta/blob/main/src/app/provider-dashboard/page.js"
click node_dashboardapi "https://github.com/spectator-code/umakonekta/blob/main/src/app/api/dashboard/route.js"
click node_mechanicspage "https://github.com/spectator-code/umakonekta/blob/main/src/app/mechanic-dashboard/page.js"
click node_mechanicsapi "https://github.com/spectator-code/umakonekta/blob/main/src/app/api/mechanics/route.js"
click node_dispatchpage "https://github.com/spectator-code/umakonekta/blob/main/src/app/dispatch-slip/page.js"
click node_dispatchapi "https://github.com/spectator-code/umakonekta/blob/main/src/app/api/dispatch-slip/route.js"
click node_calendar "https://github.com/spectator-code/umakonekta/blob/main/src/app/api/operations/calendar/route.js"
click node_sacco "https://github.com/spectator-code/umakonekta/blob/main/src/app/sacco-receipt/page.js"
click node_bulletin "https://github.com/spectator-code/umakonekta/blob/main/src/app/bulletin-notice/page.js"
click node_adminpage "https://github.com/spectator-code/umakonekta/blob/main/src/app/admin/page.js"
click node_adminfarmers "https://github.com/spectator-code/umakonekta/blob/main/src/app/api/admin/farmers/route.js"
click node_login "https://github.com/spectator-code/umakonekta/blob/main/src/app/api/auth/%5B...nextauth%5D/route.js"
click node_register "https://github.com/spectator-code/umakonekta/blob/main/src/app/api/auth/register/route.js"
click node_secopsapi "https://github.com/spectator-code/umakonekta/tree/main/src/app/api/x9f-ops"
click node_siem "https://github.com/spectator-code/umakonekta/blob/main/src/lib/siem.js"
click node_database "https://github.com/spectator-code/umakonekta/blob/main/src/lib/prisma.js"
click node_serviceworker "https://github.com/spectator-code/umakonekta/blob/main/public/sw.js"

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_home,node_marketplace,node_providers,node_requests,node_farmerdash,node_providerdash,node_dashboardapi toneBlue
class node_mechanicspage,node_mechanicsapi,node_dispatchpage,node_dispatchapi,node_calendar toneAmber
class node_sacco,node_bulletin toneMint
class node_adminpage,node_adminfarmers,node_login,node_register,node_secopsapi,node_siem toneRose
class node_database,node_serviceworker,node_farmer,node_provider,node_mechanic,node_admin,node_secops,node_geo toneIndigo
```

## Components

### Equipment exchange

- [Agrarian home](https://github.com/spectator-code/umakonekta/blob/main/src/app/page.js): `src/app/page.js`
- [Equipment marketplace](https://github.com/spectator-code/umakonekta/blob/main/src/app/marketplace/page.js): `src/app/marketplace/page.js`
- [Provider directory API](https://github.com/spectator-code/umakonekta/blob/main/src/app/api/providers/route.js): `src/app/api/providers/route.js`
- [Request management API](https://github.com/spectator-code/umakonekta/blob/main/src/app/api/requests/route.js): `src/app/api/requests/route.js`
- [Farmer dashboard](https://github.com/spectator-code/umakonekta/blob/main/src/app/farmer-dashboard/page.js): `src/app/farmer-dashboard/page.js`
- [Provider dashboard](https://github.com/spectator-code/umakonekta/blob/main/src/app/provider-dashboard/page.js): `src/app/provider-dashboard/page.js`
- [Dashboard aggregates](https://github.com/spectator-code/umakonekta/blob/main/src/app/api/dashboard/route.js): `src/app/api/dashboard/route.js`

### Field operations

- [Mechanic dashboard](https://github.com/spectator-code/umakonekta/blob/main/src/app/mechanic-dashboard/page.js): `src/app/mechanic-dashboard/page.js`
- [Repair work orders](https://github.com/spectator-code/umakonekta/blob/main/src/app/api/mechanics/route.js): `src/app/api/mechanics/route.js`
- [Dispatch slip](https://github.com/spectator-code/umakonekta/blob/main/src/app/dispatch-slip/page.js): `src/app/dispatch-slip/page.js`
- [Ticket verification](https://github.com/spectator-code/umakonekta/blob/main/src/app/api/dispatch-slip/route.js): `src/app/api/dispatch-slip/route.js`
- [Operations calendar API](https://github.com/spectator-code/umakonekta/blob/main/src/app/api/operations/calendar/route.js): `src/app/api/operations/calendar/route.js`

### Agrarian records

- [SACCO receipt](https://github.com/spectator-code/umakonekta/blob/main/src/app/sacco-receipt/page.js): `src/app/sacco-receipt/page.js`
- [Barangay bulletin](https://github.com/spectator-code/umakonekta/blob/main/src/app/bulletin-notice/page.js): `src/app/bulletin-notice/page.js`

### Identity and security

- [Administration](https://github.com/spectator-code/umakonekta/blob/main/src/app/admin/page.js): `src/app/admin/page.js`
- [Farmer administration API](https://github.com/spectator-code/umakonekta/blob/main/src/app/api/admin/farmers/route.js): `src/app/api/admin/farmers/route.js`
- [Authentication API](https://github.com/spectator-code/umakonekta/blob/main/src/app/api/auth/%5B...nextauth%5D/route.js): `src/app/api/auth/[...nextauth]/route.js`
- [Registration API](https://github.com/spectator-code/umakonekta/blob/main/src/app/api/auth/register/route.js): `src/app/api/auth/register/route.js`
- [Security operations APIs](https://github.com/spectator-code/umakonekta/tree/main/src/app/api/x9f-ops): `src/app/api/x9f-ops`
- [Security event logging](https://github.com/spectator-code/umakonekta/blob/main/src/lib/siem.js): `src/lib/siem.js`

### Offline platform

- [Application database](https://github.com/spectator-code/umakonekta/blob/main/src/lib/prisma.js): `src/lib/prisma.js`
- [Offline service worker](https://github.com/spectator-code/umakonekta/blob/main/public/sw.js): `public/sw.js`

### Other components

- **Farmer**
- **Provider**
- **Mechanic**
- **Administrator**
- **SecOps**
- **IP geolocation service**

## Connections

- Farmer → Agrarian home: opens
- Farmer → Equipment marketplace: searches equipment
- Equipment marketplace → Provider directory API: loads providers
- Farmer → Request management API: submits request
- Provider → Request management API: updates request
- Farmer → Farmer dashboard: views ledger
- Provider → Provider dashboard: views workload
- Farmer dashboard → Dashboard aggregates: loads aggregates
- Provider dashboard → Dashboard aggregates: loads aggregates
- Administration → Dashboard aggregates: loads aggregates
- Mechanic → Mechanic dashboard: manages repairs
- Mechanic dashboard → Repair work orders: claims and closes
- Farmer → Dispatch slip: views field ticket
- Dispatch slip → Ticket verification: verifies ticket
- Provider → Operations calendar API: views fleet schedule
- Farmer → SACCO receipt: records grain settlement
- Farmer → Barangay bulletin: reads notices
- Administrator → Administration: manages platform
- Administration → Farmer administration API: manages farmers
- Farmer → Registration API: registers
- Farmer → Authentication API: authenticates
- Provider → Authentication API: authenticates
- Mechanic → Authentication API: authenticates
- Authentication API → Application database: reads users
- Registration API → Application database: creates user
- Request management API → Application database: reads and writes
- Provider directory API → Application database: reads directory
- Dashboard aggregates → Application database: aggregates records
- Repair work orders → Application database: updates work orders
- Ticket verification → Application database: reads ticket
- Operations calendar API → Application database: reads fleet schedule
- Farmer administration API → Application database: manages accounts
- SecOps → Security operations APIs: investigates threats
- Security operations APIs → Application database: reads and updates security data
- Authentication API → Security event logging: logs security events
- Farmer administration API → Security event logging: logs security events
- Security operations APIs → Security event logging: records firewall changes
- Registration API → IP geolocation service: checks IP location
- Farmer → Offline service worker: uses offline experience
