# gwynnleepogi/capstone architecture

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

- Interactive diagram: https://gitdiagram.com/gwynnleepogi/capstone
- Repository: https://github.com/gwynnleepogi/capstone

## Overview

Property Inventory is a role-based inventory management application. Users sign in and, according to their role, manage inventory, offices, personnel, suppliers, requests, receipts, returns, incidents, and audit records. The Vue client routes users to feature views; the Express API applies authentication and role checks before route handlers access Supabase. Receipt creation visibly updates inventory and request status. Frontend-to-API calls are not mapped because the sampled excerpts do not show them; several backend route relationships are supported by the SOURCE INDEX rather than excerpts.

Main entry points: [`frontend/src/router/index.js`](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/router/index.js) (Route access), [`backend/supabase.js`](https://github.com/gwynnleepogi/capstone/blob/main/backend/supabase.js) (Supabase client), [`backend/server.js`](https://github.com/gwynnleepogi/capstone/blob/main/backend/server.js) (HTTP server), [`backend/routes/receipts.js`](https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/receipts.js) (Receipt API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Vue application"]
  node_main["App bootstrap<br/>[main.js]"]
  node_shell["Role-based shell<br/>[App.vue]"]
  node_router["Route access<br/>[index.js]"]
  node_login["Sign in<br/>[Login.vue]"]
  node_dashboard["Dashboard<br/>[Dashboard.vue]"]
  node_itemsview["Items view<br/>[Items.vue]"]
  node_officesview["Offices view<br/>[Offices.vue]"]
  node_suppliersview["Suppliers view<br/>[Suppliers.vue]"]
  node_personnelview["Personnel view<br/>[Personnel.vue]"]
  node_requestsview["Requests view<br/>[ItemRequests.vue]"]
  node_receiptsview["Receipts view"]
  node_returnsview["Returns view<br/>[Returns.vue]"]
  node_incidentsview["Incidents view<br/>[Incidents.vue]"]
  node_auditview["Audit view<br/>[AuditLogs.vue]"]
end

subgraph group_api["Express API"]
  node_server["HTTP server<br/>[server.js]"]
  node_authroutes["Sign-in API<br/>[auth.js]"]
  node_authmw["Authentication<br/>[auth.js]"]
end

subgraph group_operations["Inventory operations"]
  node_items["Inventory API<br/>[items.js]"]
  node_offices["Office API<br/>[offices.js]"]
  node_suppliers["Supplier API<br/>[suppliers.js]"]
  node_personnel["Personnel API<br/>[personnel.js]"]
  node_requests["Request API<br/>[itemRequests.js]"]
  node_receipts["Receipt API<br/>[receipts.js]"]
  node_returns["Return API<br/>[returns.js]"]
  node_incidents["Incident API<br/>[incidents.js]"]
  node_auditroute["Audit API<br/>[auditLogs.js]"]
  node_auditmw["Audit logging<br/>[auditLog.js]"]
end

subgraph group_platform["Data and identity"]
  node_supabaseclient["Supabase client<br/>[supabase.js]"]
  node_supabase[("Supabase platform")]
end

node_user(("User"))

node_user -->|"uses"| node_main
node_main -->|"mounts"| node_shell
node_main -->|"installs"| node_router
node_router -->|"routes"| node_login
node_router -->|"routes"| node_dashboard
node_router -->|"routes"| node_itemsview
node_router -->|"routes"| node_officesview
node_router -->|"routes"| node_suppliersview
node_router -->|"routes"| node_personnelview
node_router -->|"routes"| node_requestsview
node_router -->|"routes"| node_receiptsview
node_router -->|"routes"| node_returnsview
node_router -->|"routes"| node_incidentsview
node_router -->|"routes"| node_auditview
node_server -->|"mounts"| node_authroutes
node_server -->|"uses guards"| node_authmw
node_server -->|"mounts"| node_items
node_server -->|"mounts"| node_offices
node_server -->|"mounts"| node_suppliers
node_server -->|"mounts"| node_personnel
node_server -->|"mounts"| node_requests
node_server -->|"mounts"| node_receipts
node_server -->|"mounts"| node_returns
node_server -->|"mounts"| node_incidents
node_server -->|"mounts"| node_auditroute
node_authroutes -->|"uses"| node_supabaseclient
node_authmw -->|"validates with"| node_supabaseclient
node_items -->|"reads/writes"| node_supabaseclient
node_offices -->|"reads/writes"| node_supabaseclient
node_suppliers -->|"reads/writes"| node_supabaseclient
node_personnel -->|"reads/writes"| node_supabaseclient
node_requests -->|"reads/writes"| node_supabaseclient
node_receipts -->|"reads/writes"| node_supabaseclient
node_returns -->|"reads/writes"| node_supabaseclient
node_incidents -->|"reads/writes"| node_supabaseclient
node_auditroute -->|"reads"| node_supabaseclient
node_auditmw -->|"writes"| node_supabaseclient
node_items -->|"records changes"| node_auditmw
node_personnel -->|"records changes"| node_auditmw
node_requests -->|"records changes"| node_auditmw
node_receipts -->|"records changes"| node_auditmw
node_supabaseclient -->|"connects"| node_supabase
node_receipts -->|"updates item"| node_items
node_receipts -->|"updates request"| node_requests

click node_main "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/main.js"
click node_shell "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/App.vue"
click node_router "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/router/index.js"
click node_login "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Login.vue"
click node_dashboard "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Dashboard.vue"
click node_itemsview "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Items.vue"
click node_officesview "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Offices.vue"
click node_suppliersview "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Suppliers.vue"
click node_personnelview "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Personnel.vue"
click node_requestsview "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/ItemRequests.vue"
click node_receiptsview "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/PropertyReceipts.vue"
click node_returnsview "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Returns.vue"
click node_incidentsview "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Incidents.vue"
click node_auditview "https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/AuditLogs.vue"
click node_server "https://github.com/gwynnleepogi/capstone/blob/main/backend/server.js"
click node_authroutes "https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/auth.js"
click node_authmw "https://github.com/gwynnleepogi/capstone/blob/main/backend/middleware/auth.js"
click node_items "https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/items.js"
click node_offices "https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/offices.js"
click node_suppliers "https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/suppliers.js"
click node_personnel "https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/personnel.js"
click node_requests "https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/itemRequests.js"
click node_receipts "https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/receipts.js"
click node_returns "https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/returns.js"
click node_incidents "https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/incidents.js"
click node_auditroute "https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/auditLogs.js"
click node_auditmw "https://github.com/gwynnleepogi/capstone/blob/main/backend/middleware/auditLog.js"
click node_supabaseclient "https://github.com/gwynnleepogi/capstone/blob/main/backend/supabase.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_main,node_shell,node_router,node_login,node_dashboard,node_itemsview,node_officesview,node_suppliersview,node_personnelview,node_requestsview,node_receiptsview,node_returnsview,node_incidentsview,node_auditview,node_user toneBlue
class node_server,node_authroutes,node_authmw toneAmber
class node_items,node_offices,node_suppliers,node_personnel,node_requests,node_receipts,node_returns,node_incidents,node_auditroute,node_auditmw toneMint
class node_supabaseclient,node_supabase toneRose
```

## Components

### Vue application

- [App bootstrap](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/main.js): `frontend/src/main.js`
- [Role-based shell](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Route access](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/router/index.js): `frontend/src/router/index.js`
- [Sign in](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Login.vue): `frontend/src/views/Login.vue`
- [Dashboard](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Dashboard.vue): `frontend/src/views/Dashboard.vue`
- [Items view](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Items.vue): `frontend/src/views/Items.vue`
- [Offices view](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Offices.vue): `frontend/src/views/Offices.vue`
- [Suppliers view](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Suppliers.vue): `frontend/src/views/Suppliers.vue`
- [Personnel view](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Personnel.vue): `frontend/src/views/Personnel.vue`
- [Requests view](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/ItemRequests.vue): `frontend/src/views/ItemRequests.vue`
- [Receipts view](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/PropertyReceipts.vue): `frontend/src/views/PropertyReceipts.vue`
- [Returns view](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Returns.vue): `frontend/src/views/Returns.vue`
- [Incidents view](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/Incidents.vue): `frontend/src/views/Incidents.vue`
- [Audit view](https://github.com/gwynnleepogi/capstone/blob/main/frontend/src/views/AuditLogs.vue): `frontend/src/views/AuditLogs.vue`

### Express API

- [HTTP server](https://github.com/gwynnleepogi/capstone/blob/main/backend/server.js): `backend/server.js`
- [Sign-in API](https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [Authentication](https://github.com/gwynnleepogi/capstone/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`

### Inventory operations

- [Inventory API](https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/items.js): `backend/routes/items.js`
- [Office API](https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/offices.js): `backend/routes/offices.js`
- [Supplier API](https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/suppliers.js): `backend/routes/suppliers.js`
- [Personnel API](https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/personnel.js): `backend/routes/personnel.js`
- [Request API](https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/itemRequests.js): `backend/routes/itemRequests.js`
- [Receipt API](https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/receipts.js): `backend/routes/receipts.js`
- [Return API](https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/returns.js): `backend/routes/returns.js`
- [Incident API](https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/incidents.js): `backend/routes/incidents.js`
- [Audit API](https://github.com/gwynnleepogi/capstone/blob/main/backend/routes/auditLogs.js): `backend/routes/auditLogs.js`
- [Audit logging](https://github.com/gwynnleepogi/capstone/blob/main/backend/middleware/auditLog.js): `backend/middleware/auditLog.js`

### Data and identity

- [Supabase client](https://github.com/gwynnleepogi/capstone/blob/main/backend/supabase.js): `backend/supabase.js`
- **Supabase platform**

### Other components

- **User**

## Connections

- User → App bootstrap: uses (evidence: `frontend/src/main.js`)
- App bootstrap → Role-based shell: mounts (evidence: `frontend/src/main.js`)
- App bootstrap → Route access: installs (evidence: `frontend/src/main.js`)
- Route access → Sign in: routes (evidence: `frontend/src/router/index.js`)
- Route access → Dashboard: routes (evidence: `frontend/src/router/index.js`)
- Route access → Items view: routes (evidence: `frontend/src/router/index.js`)
- Route access → Offices view: routes (evidence: `frontend/src/router/index.js`)
- Route access → Suppliers view: routes (evidence: `frontend/src/router/index.js`)
- Route access → Personnel view: routes (evidence: `frontend/src/router/index.js`)
- Route access → Requests view: routes (evidence: `frontend/src/router/index.js`)
- Route access → Receipts view: routes (evidence: `frontend/src/router/index.js`)
- Route access → Returns view: routes (evidence: `frontend/src/router/index.js`)
- Route access → Incidents view: routes (evidence: `frontend/src/router/index.js`)
- Route access → Audit view: routes (evidence: `frontend/src/router/index.js`)
- HTTP server → Sign-in API: mounts (evidence: `backend/server.js`)
- HTTP server → Authentication: uses guards (evidence: `backend/server.js`)
- HTTP server → Inventory API: mounts (evidence: `backend/server.js`)
- HTTP server → Office API: mounts (evidence: `backend/server.js`)
- HTTP server → Supplier API: mounts (evidence: `backend/server.js`)
- HTTP server → Personnel API: mounts (evidence: `backend/server.js`)
- HTTP server → Request API: mounts (evidence: `backend/server.js`)
- HTTP server → Receipt API: mounts (evidence: `backend/server.js`)
- HTTP server → Return API: mounts (evidence: `backend/server.js`)
- HTTP server → Incident API: mounts (evidence: `backend/server.js`)
- HTTP server → Audit API: mounts (evidence: `backend/server.js`)
- Sign-in API → Supabase client: uses (evidence: `backend/routes/auth.js`)
- Authentication → Supabase client: validates with (evidence: `backend/middleware/auth.js`)
- Inventory API → Supabase client: reads/writes (evidence: `backend/routes/items.js`)
- Office API → Supabase client: reads/writes (evidence: `backend/routes/offices.js`)
- Supplier API → Supabase client: reads/writes (evidence: `backend/routes/suppliers.js`)
- Personnel API → Supabase client: reads/writes (evidence: `backend/routes/personnel.js`)
- Request API → Supabase client: reads/writes (evidence: `backend/routes/itemRequests.js`)
- Receipt API → Supabase client: reads/writes (evidence: `backend/routes/receipts.js`)
- Return API → Supabase client: reads/writes (evidence: `backend/routes/returns.js`)
- Incident API → Supabase client: reads/writes (evidence: `backend/routes/incidents.js`)
- Audit API → Supabase client: reads (evidence: `backend/routes/auditLogs.js`)
- Audit logging → Supabase client: writes (evidence: `backend/middleware/auditLog.js`)
- Inventory API → Audit logging: records changes (evidence: `backend/routes/items.js`)
- Personnel API → Audit logging: records changes (evidence: `backend/routes/personnel.js`)
- Request API → Audit logging: records changes (evidence: `backend/routes/itemRequests.js`)
- Receipt API → Audit logging: records changes (evidence: `backend/routes/receipts.js`)
- Supabase client → Supabase platform: connects (evidence: `backend/supabase.js`)
- Receipt API → Inventory API: updates item (evidence: `backend/routes/receipts.js`)
- Receipt API → Request API: updates request (evidence: `backend/routes/receipts.js`)
