# vedant27-lab/stockpilot architecture

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

- Interactive diagram: https://gitdiagram.com/vedant27-lab/stockpilot
- Repository: https://github.com/vedant27-lab/stockpilot

## Overview

1. **Repository shape**
   - StockPilot is a full-stack inventory system with three visible delivery surfaces: a Node/Express backend, a static web frontend, and an Android wrapper built with Capacitor.
   - The codebase is organized around backend domain modules in `lib/`, browser assets in `public/`, and the mobile shell in `android-app/`.

2. **Backend application boundary**
   - `server.js` is the main runtime entrypoint for the Node.js app.
   - `api/index.js` appears to expose the backend as a serverless/API entry when deployed on Vercel.
   - `vercel.json` indicates the repository is configured for cloud deployment as well as local execution.

3. **HTTP/API layer**
   - Request handling is split into route modules under `lib/routes/`.
   - The API is organized by concern: authentication, personal inventory, invites, and group-scoped operations.
   - The group area is further decomposed into dedicated route files for CRUD, members, products, movements, requests, invitations, and logs, which suggests a workflow-heavy domain rather than a single generic CRUD API.

4. **Domain model layer**
   - `lib/models/` contains the persistent business entities: `User`, `Product`, `Movement`, `Request`, `ActivityLog`, `Group`, `GroupMember`, and `GroupInvite`.
   - This model set shows two major concepts:
     - a personal inventory/request workflow
     - a collaborative group-sharing/workspace model with membership and invites
   - `ActivityLog` provides an audit trail for operations, likely used by the admin dashboard.

5. **Authorization and access control**
   - `lib/middleware/auth.js` and `lib/middleware/groupAuth.js` define the main security boundary.
   - The app uses role-aware access control: authenticated user access, and additional group-scoped checks for shared resources.
   - The README describes admin/customer separation, and the code structure supports that via server-side route protection rather than only frontend hiding.

6. **Validation and service helpers**
   - `lib/helpers/validation.js` centralizes input checking before writes reach the database.
   - `lib/helpers/logger.js` suggests server-side operational or application logging is standardized rather than ad hoc.
   - This indicates a layered flow: request → auth → validation → route logic → model persistence.

7. **Primary data flows**
   - A typical inventory mutation likely flows from the browser dashboard to an Express route, through authentication and validation, then into a Mongoose model write.
   - Read flows for dashboards likely aggregate products, movements, requests, and logs into the frontend’s dashboard views.
   - Request approval appears to be a distinct workflow: customer submits a request, admin reviews it, then the system executes the inventory change and records it.

8. **Web frontend**
   - The browser UI is mostly static and framework-free: `public/login.html`, `public/dashboard.html`, and JavaScript in `public/js/`.
   - `public/js/login.js` likely handles auth form submission and session establishment.
   - `public/js/dashboard-core.js` and `public/js/dashboard-views.js` split dashboard behavior from rendering, suggesting a client-side MVC-like separation without a framework.
   - `public/css/style.css` is the shared visual layer for the web app.

9. **Mobile packaging**
   - `android-app/` contains a Capacitor-generated Android project that wraps the web app into a native shell.
   - `android-app/www/index.html` is the web entrypoint used by the mobile container.
   - The Android source in `android-app/android/app/src/main/java/com/stockpilot/app/MainActivity.java` is minimal, which implies the app delegates most behavior to the embedded web UI.
   - `file_paths.xml` and the resource set confirm standard Android packaging rather than custom native business logic.

10. **Persistence and local state**
   - `data/store.json` and `runs.json` suggest some local file-backed data or runtime tracking exists alongside the database-oriented code.
   - However, the README and model structure point to MongoDB/Mongoose as the primary application datastore.
   - For an architecture diagram, treat MongoDB as the system of record and these JSON files as auxiliary or development/runtime artifacts unless proven otherwise.

11. **Operational/admin utilities**
   - `createAdmin.js` is a bootstrap script for provisioning an admin account.
   - This is an important architectural boundary because it separates one-time setup from the normal authenticated application flow.

12. **Testing and quality gates**
   - The Android project includes both unit and instrumented tests under `android-app/android/app/src/test` and `src/androidTest`.
   - The Node.js side does not show a dedicated test tree in the file listing, so the strongest explicit test coverage visible here is on the mobile wrapper side.

13. **Build and deployment pipeline**
   - `.github/workflows/build-android.yml` automates Android builds in CI.
   - `android-app/package.json` and the Gradle wrapper files indicate the mobile build is reproducible from source.
   - Combined with `vercel.json`, the repo is set up for separate web/API deployment and Android artifact generation.

14. **What to draw as the main system boundaries**
   - Client boundary: static web dashboard/login pages and the Capacitor Android shell.
   - Application boundary: Express routes, middleware, and domain logic in `lib/`.
   - Data boundary: MongoDB-backed models plus audit/logging entities.
   - Admin/customer and personal/group access should be shown as authorization boundaries crossing the API, not as separate frontends.

Main entry points: [`lib/routes/groups/index.js`](https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/index.js) (Groups API), [`lib/db.js`](https://github.com/vedant27-lab/stockpilot/blob/main/lib/db.js) (Database), [`lib/routes/personal.js`](https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/personal.js) (Personal API), [`lib/helpers/validation.js`](https://github.com/vedant27-lab/stockpilot/blob/main/lib/helpers/validation.js) (Validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client_web["Web client"]
  node_login_page["Login<br/>web page<br/>[login.html]"]
  node_dashboard_page["Dashboard<br/>web page<br/>[dashboard.html]"]
  node_login_js["Login script<br/>client script<br/>[login.js]"]
  node_dashboard_core["Dashboard core<br/>client script<br/>[dashboard-core.js]"]
  node_dashboard_views["Dashboard views<br/>client script<br/>[dashboard-views.js]"]
end

subgraph group_backend_app["Backend app"]
  node_server_js["Server<br/>entrypoint<br/>[server.js]"]
  node_api_index["API entry<br/>entrypoint<br/>[index.js]"]
  node_auth_routes["Auth routes<br/>[auth.js]"]
  node_personal_routes["Personal API<br/>route<br/>[personal.js]"]
  node_groups_index["Groups API<br/>route group<br/>[index.js]"]
  node_groups_crud["Group CRUD<br/>route<br/>[crud.js]"]
  node_groups_members["Members<br/>route<br/>[members.js]"]
  node_groups_products["Products<br/>route<br/>[products.js]"]
  node_groups_movements["Movements<br/>route<br/>[movements.js]"]
  node_groups_requests["Requests<br/>route<br/>[requests.js]"]
  node_groups_invites["Invites<br/>route<br/>[invitations.js]"]
  node_groups_logs["Logs<br/>route<br/>[logs.js]"]
  node_auth_mw["Auth middleware<br/>[auth.js]"]
  node_group_auth_mw["Group auth<br/>middleware<br/>[groupAuth.js]"]
  node_validation["Validation<br/>helper<br/>[validation.js]"]
  node_logger["Logger<br/>helper<br/>[logger.js]"]
  node_user_model["Users<br/>model<br/>[User.js]"]
  node_product_model["Products<br/>model<br/>[Product.js]"]
  node_movement_model["Movements<br/>model<br/>[Movement.js]"]
  node_request_model["Requests<br/>model<br/>[Request.js]"]
  node_activitylog_model["Activity log<br/>model<br/>[ActivityLog.js]"]
  node_group_model["Groups<br/>model<br/>[Group.js]"]
  node_groupmember_model["Group members<br/>model<br/>[GroupMember.js]"]
  node_groupinvite_model["Group invites<br/>model<br/>[GroupInvite.js]"]
end

subgraph group_mobile_shell["Android shell"]
  node_android_main["MainActivity<br/>android entry<br/>[MainActivity.java]"]
  node_android_web["Mobile web<br/>web asset<br/>[index.html]"]
  node_android_build["Android build<br/>build config<br/>[package.json]"]
end

subgraph group_ops_data["Ops & data"]
  node_db[("Database<br/>persistence<br/>[db.js]")]
  node_admin_bootstrap["Admin bootstrap<br/>script<br/>[createAdmin.js]"]
end

node_server_js -->|"mounts"| node_auth_routes
node_server_js -->|"mounts"| node_personal_routes
node_server_js -->|"mounts"| node_groups_index
node_api_index -.->|"deploys"| node_server_js
node_groups_index -->|"composes"| node_groups_crud
node_groups_index -->|"composes"| node_groups_members
node_groups_index -->|"composes"| node_groups_products
node_groups_index -->|"composes"| node_groups_movements
node_groups_index -->|"composes"| node_groups_requests
node_groups_index -->|"composes"| node_groups_invites
node_groups_index -->|"composes"| node_groups_logs
node_auth_routes -->|"protects"| node_auth_mw
node_personal_routes -->|"protects"| node_auth_mw
node_groups_index -->|"protects"| node_group_auth_mw
node_groups_crud -->|"validates"| node_validation
node_groups_products -->|"validates"| node_validation
node_groups_movements -->|"validates"| node_validation
node_groups_requests -->|"validates"| node_validation
node_groups_invites -->|"validates"| node_validation
node_groups_logs -->|"records"| node_logger
node_auth_routes -->|"uses"| node_user_model
node_personal_routes -->|"uses"| node_product_model
node_personal_routes -->|"uses"| node_request_model
node_groups_products -->|"uses"| node_product_model
node_groups_movements -->|"uses"| node_movement_model
node_groups_requests -->|"uses"| node_request_model
node_groups_logs -->|"uses"| node_activitylog_model
node_groups_crud -->|"uses"| node_group_model
node_groups_members -->|"uses"| node_groupmember_model
node_groups_invites -->|"uses"| node_groupinvite_model
node_user_model -->|"persists"| node_db
node_product_model -->|"persists"| node_db
node_movement_model -->|"persists"| node_db
node_request_model -->|"persists"| node_db
node_activitylog_model -->|"persists"| node_db
node_group_model -->|"persists"| node_db
node_groupmember_model -->|"persists"| node_db
node_groupinvite_model -->|"persists"| node_db
node_login_page -->|"loads"| node_login_js
node_dashboard_page -->|"loads"| node_dashboard_core
node_dashboard_page -->|"loads"| node_dashboard_views
node_login_js -->|"calls"| node_auth_routes
node_dashboard_core -->|"calls"| node_personal_routes
node_dashboard_core -->|"calls"| node_groups_index
node_dashboard_views -->|"renders"| node_dashboard_core
node_android_main -->|"hosts"| node_android_web
node_android_build -.->|"packages"| node_android_web
node_android_web -->|"wraps"| node_dashboard_page

click node_server_js "https://github.com/vedant27-lab/stockpilot/blob/main/server.js"
click node_api_index "https://github.com/vedant27-lab/stockpilot/blob/main/api/index.js"
click node_auth_routes "https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/auth.js"
click node_personal_routes "https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/personal.js"
click node_groups_index "https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/index.js"
click node_groups_crud "https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/crud.js"
click node_groups_members "https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/members.js"
click node_groups_products "https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/products.js"
click node_groups_movements "https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/movements.js"
click node_groups_requests "https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/requests.js"
click node_groups_invites "https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/invitations.js"
click node_groups_logs "https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/logs.js"
click node_auth_mw "https://github.com/vedant27-lab/stockpilot/blob/main/lib/middleware/auth.js"
click node_group_auth_mw "https://github.com/vedant27-lab/stockpilot/blob/main/lib/middleware/groupAuth.js"
click node_validation "https://github.com/vedant27-lab/stockpilot/blob/main/lib/helpers/validation.js"
click node_logger "https://github.com/vedant27-lab/stockpilot/blob/main/lib/helpers/logger.js"
click node_db "https://github.com/vedant27-lab/stockpilot/blob/main/lib/db.js"
click node_user_model "https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/User.js"
click node_product_model "https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/Product.js"
click node_movement_model "https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/Movement.js"
click node_request_model "https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/Request.js"
click node_activitylog_model "https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/ActivityLog.js"
click node_group_model "https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/Group.js"
click node_groupmember_model "https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/GroupMember.js"
click node_groupinvite_model "https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/GroupInvite.js"
click node_login_page "https://github.com/vedant27-lab/stockpilot/blob/main/public/login.html"
click node_dashboard_page "https://github.com/vedant27-lab/stockpilot/blob/main/public/dashboard.html"
click node_login_js "https://github.com/vedant27-lab/stockpilot/blob/main/public/js/login.js"
click node_dashboard_core "https://github.com/vedant27-lab/stockpilot/blob/main/public/js/dashboard-core.js"
click node_dashboard_views "https://github.com/vedant27-lab/stockpilot/blob/main/public/js/dashboard-views.js"
click node_android_main "https://github.com/vedant27-lab/stockpilot/blob/main/android-app/android/app/src/main/java/com/stockpilot/app/MainActivity.java"
click node_android_web "https://github.com/vedant27-lab/stockpilot/blob/main/android-app/www/index.html"
click node_android_build "https://github.com/vedant27-lab/stockpilot/blob/main/android-app/package.json"
click node_admin_bootstrap "https://github.com/vedant27-lab/stockpilot/blob/main/createAdmin.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_login_page,node_dashboard_page,node_login_js,node_dashboard_core,node_dashboard_views toneBlue
class node_server_js,node_api_index,node_auth_routes,node_personal_routes,node_groups_index,node_groups_crud,node_groups_members,node_groups_products,node_groups_movements,node_groups_requests,node_groups_invites,node_groups_logs,node_auth_mw,node_group_auth_mw,node_validation,node_logger,node_user_model,node_product_model,node_movement_model,node_request_model,node_activitylog_model,node_group_model,node_groupmember_model,node_groupinvite_model toneAmber
class node_android_main,node_android_web,node_android_build toneMint
class node_db,node_admin_bootstrap toneRose
```

## Components

### Web client

Static browser UI and client-side dashboard scripts.

- [Login](https://github.com/vedant27-lab/stockpilot/blob/main/public/login.html): web page · Static login surface. · `public/login.html`
- [Dashboard](https://github.com/vedant27-lab/stockpilot/blob/main/public/dashboard.html): web page · Static dashboard surface. · `public/dashboard.html`
- [Login script](https://github.com/vedant27-lab/stockpilot/blob/main/public/js/login.js): client script · Client-side authentication flow. · `public/js/login.js`
- [Dashboard core](https://github.com/vedant27-lab/stockpilot/blob/main/public/js/dashboard-core.js): client script · Dashboard state and interactions. · `public/js/dashboard-core.js`
- [Dashboard views](https://github.com/vedant27-lab/stockpilot/blob/main/public/js/dashboard-views.js): client script · Dashboard rendering and presentation logic. · `public/js/dashboard-views.js`

### Backend app

Express runtime, routing, middleware, and domain models.

- [Server](https://github.com/vedant27-lab/stockpilot/blob/main/server.js): entrypoint · Main Node.js runtime entrypoint. · `server.js`
- [API entry](https://github.com/vedant27-lab/stockpilot/blob/main/api/index.js): entrypoint · Serverless/API entry for hosted deployment. · `api/index.js`
- [Auth routes](https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/auth.js): route · Authentication and session-facing endpoints. · `lib/routes/auth.js`
- [Personal API](https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/personal.js): route · Personal inventory and request workflow endpoints. · `lib/routes/personal.js`
- [Groups API](https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/index.js): route group · Group-scoped API composition layer. · `lib/routes/groups/index.js`
- [Group CRUD](https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/crud.js): route · Core group create/read/update/delete operations. · `lib/routes/groups/crud.js`
- [Members](https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/members.js): route · Group membership management endpoints. · `lib/routes/groups/members.js`
- [Products](https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/products.js): route · Group-scoped product inventory endpoints. · `lib/routes/groups/products.js`
- [Movements](https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/movements.js): route · Stock movement and transfer endpoints. · `lib/routes/groups/movements.js`
- [Requests](https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/requests.js): route · Request submission and approval workflow endpoints. · `lib/routes/groups/requests.js`
- [Invites](https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/invitations.js): route · Group invitation issuance and acceptance endpoints. · `lib/routes/groups/invitations.js`
- [Logs](https://github.com/vedant27-lab/stockpilot/blob/main/lib/routes/groups/logs.js): route · Activity and audit log endpoints. · `lib/routes/groups/logs.js`
- [Auth middleware](https://github.com/vedant27-lab/stockpilot/blob/main/lib/middleware/auth.js): middleware · Authenticated-user access control boundary. · `lib/middleware/auth.js`
- [Group auth](https://github.com/vedant27-lab/stockpilot/blob/main/lib/middleware/groupAuth.js): middleware · Group-scoped authorization checks. · `lib/middleware/groupAuth.js`
- [Validation](https://github.com/vedant27-lab/stockpilot/blob/main/lib/helpers/validation.js): helper · Shared input validation before writes. · `lib/helpers/validation.js`
- [Logger](https://github.com/vedant27-lab/stockpilot/blob/main/lib/helpers/logger.js): helper · Centralized application logging. · `lib/helpers/logger.js`
- [Users](https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/User.js): model · Authenticated users and roles. · `lib/models/User.js`
- [Products](https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/Product.js): model · Inventory product records. · `lib/models/Product.js`
- [Movements](https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/Movement.js): model · Inventory change records. · `lib/models/Movement.js`
- [Requests](https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/Request.js): model · Approval workflow records. · `lib/models/Request.js`
- [Activity log](https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/ActivityLog.js): model · Audit trail records. · `lib/models/ActivityLog.js`
- [Groups](https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/Group.js): model · Collaborative workspace entities. · `lib/models/Group.js`
- [Group members](https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/GroupMember.js): model · Membership links between users and groups. · `lib/models/GroupMember.js`
- [Group invites](https://github.com/vedant27-lab/stockpilot/blob/main/lib/models/GroupInvite.js): model · Pending invitations into groups. · `lib/models/GroupInvite.js`

### Android shell

Capacitor-wrapped Android delivery surface.

- [MainActivity](https://github.com/vedant27-lab/stockpilot/blob/main/android-app/android/app/src/main/java/com/stockpilot/app/MainActivity.java): android entry · Minimal Android host activity. · `android-app/android/app/src/main/java/com/stockpilot/app/MainActivity.java`
- [Mobile web](https://github.com/vedant27-lab/stockpilot/blob/main/android-app/www/index.html): web asset · Embedded web entrypoint for the Android shell. · `android-app/www/index.html`
- [Android build](https://github.com/vedant27-lab/stockpilot/blob/main/android-app/package.json): build config · Capacitor/Gradle Android packaging configuration. · `android-app/package.json`

### Ops & data

Deployment, bootstrap, and auxiliary runtime state.

- [Database](https://github.com/vedant27-lab/stockpilot/blob/main/lib/db.js): persistence · Mongoose-backed datastore boundary. · `lib/db.js`
- [Admin bootstrap](https://github.com/vedant27-lab/stockpilot/blob/main/createAdmin.js): script · One-time admin provisioning script. · `createAdmin.js`

## Connections

- Server → Auth routes: mounts · Registers auth endpoints on the main server.
- Server → Personal API: mounts · Registers personal inventory routes.
- Server → Groups API: mounts · Registers group API surface.
- API entry → Server: deploys · Hosted API entry delegates to the main app runtime.
- Groups API → Group CRUD: composes · Group API is split into focused route modules.
- Groups API → Members: composes · Group API is split into focused route modules.
- Groups API → Products: composes · Group API is split into focused route modules.
- Groups API → Movements: composes · Group API is split into focused route modules.
- Groups API → Requests: composes · Group API is split into focused route modules.
- Groups API → Invites: composes · Group API is split into focused route modules.
- Groups API → Logs: composes · Group API is split into focused route modules.
- Auth routes → Auth middleware: protects · Authentication middleware guards protected access.
- Personal API → Auth middleware: protects · Personal workflows require authenticated access.
- Groups API → Group auth: protects · Group-scoped resources require additional authorization.
- Group CRUD → Validation: validates · Input is checked before writes.
- Products → Validation: validates · Input is checked before writes.
- Movements → Validation: validates · Input is checked before writes.
- Requests → Validation: validates · Input is checked before writes.
- Invites → Validation: validates · Input is checked before writes.
- Logs → Logger: records · Operational and audit events are logged centrally.
- Auth routes → Users: uses · Authentication depends on user records.
- Personal API → Products: uses · Personal inventory reads and writes products.
- Personal API → Requests: uses · Request workflow persists approval records.
- Products → Products: uses · Group inventory endpoints persist products.
- Movements → Movements: uses · Stock movement endpoints persist movements.
- Requests → Requests: uses · Request workflow persists requests.
- Logs → Activity log: uses · Audit endpoints expose activity log entries.
- Group CRUD → Groups: uses · Core group lifecycle persists group entities.
- Members → Group members: uses · Membership changes persist membership links.
- Invites → Group invites: uses · Invitation workflow persists invite records.
- Users → Database: persists · Models share the database boundary.
- Products → Database: persists · Models share the database boundary.
- Movements → Database: persists · Models share the database boundary.
- Requests → Database: persists · Models share the database boundary.
- Activity log → Database: persists · Models share the database boundary.
- Groups → Database: persists · Models share the database boundary.
- Group members → Database: persists · Models share the database boundary.
- Group invites → Database: persists · Models share the database boundary.
- Login → Login script: loads · Login page is driven by client-side auth logic.
- Dashboard → Dashboard core: loads · Dashboard page bootstraps core behavior.
- Dashboard → Dashboard views: loads · Dashboard page bootstraps rendering layer.
- Login script → Auth routes: calls · Login submits to backend auth endpoints.
- Dashboard core → Personal API: calls · Dashboard interacts with inventory APIs.
- Dashboard core → Groups API: calls · Dashboard interacts with group APIs.
- Dashboard views → Dashboard core: renders · View layer consumes dashboard state and actions.
- MainActivity → Mobile web: hosts · Android activity hosts the embedded web app.
- Android build → Mobile web: packages · Capacitor/Gradle package the web UI into Android.
- Mobile web → Dashboard: wraps · Mobile shell reuses the browser dashboard surface.
