# heminados/inventorygo-app architecture

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

- Interactive diagram: https://gitdiagram.com/heminados/inventorygo-app
- Repository: https://github.com/heminados/inventorygo-app

## Overview

InventoryGO is an inventory and operations system with an admin web interface, a mobile client, and an Express API. Users sign in, then manage inventory, orders, tasks, employees, reports, and system settings; mobile users can also work with offline caching and queued writes. The excerpts show application routing, offline storage, and selected API paths, but not most screen-to-API calls or all backend controller/service implementations, so those relationships are omitted where they cannot be verified.

Main entry points: [`admin/src/App.tsx`](https://github.com/heminados/inventorygo-app/blob/main/admin/src/App.tsx) (Admin shell), [`client/App.tsx`](https://github.com/heminados/inventorygo-app/blob/main/client/App.tsx) (Mobile app shell), [`client/navigation/MainDrawer.tsx`](https://github.com/heminados/inventorygo-app/blob/main/client/navigation/MainDrawer.tsx) (Main navigation), [`server/routes`](https://github.com/heminados/inventorygo-app/tree/main/server/routes) (API route modules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Admin web"]
  node_admin_app["Admin shell<br/>[App.tsx]"]
  node_admin_login["Admin login<br/>[AdminLogin.tsx]"]
  node_admin_dashboard["Dashboard<br/>[HomePage.tsx]"]
  node_admin_inventory["Inventory management<br/>[Inventory.tsx]"]
  node_admin_orders["Order management<br/>[OrderManage.tsx]"]
  node_admin_tasks["Task management<br/>[TaskManage.tsx]"]
  node_admin_employees["Employee management<br/>[EmployeeManage.tsx]"]
  node_admin_reports["Reports<br/>[Reports.tsx]"]
  node_admin_settings["Back office<br/>[BackOffice.tsx]"]
end

subgraph group_mobile["Mobile app"]
  node_mobile_app["Mobile app shell<br/>[App.tsx]"]
  node_mobile_nav["Main navigation<br/>[MainDrawer.tsx]"]
  node_mobile_login["Mobile login<br/>[LoginScreen.tsx]"]
  node_mobile_dashboard["Mobile dashboard"]
  node_mobile_inventory["Mobile inventory"]
  node_mobile_search["Item search<br/>[SearchScreen.tsx]"]
  node_mobile_orders["Open orders"]
  node_mobile_tasks["My tasks<br/>[TasksScreen.tsx]"]
end

subgraph group_api["API and domain"]
  node_api_server["Express application<br/>[app.js]"]
  node_api_auth["Authentication<br/>[auth.controller.js]"]
  node_api_items["Item controller<br/>[item.controller.js]"]
  node_api_item_service["Item service<br/>[item.service.js]"]
  node_api_orders["Order controller"]
  node_api_order_service["Order service<br/>[order.service.js]"]
  node_api_tasks["Task controller<br/>[task.controller.js]"]
  node_api_task_service["Task service<br/>[task.service.js]"]
  node_api_reports["Report service<br/>[report.service.js]"]
  node_api_settings["Settings service"]
  node_api_routes["API route modules"]
end

subgraph group_data["Persistence"]
  node_db_local[("Offline SQLite<br/>[database.ts]")]
  node_db_prisma[("Prisma client<br/>[prisma.js]")]
  node_db_user_model["User model access<br/>[user.model.js]"]
end

node_admin_user(("Admin user"))
node_mobile_user(("Mobile user"))
node_external_api{{"HTTP API"}}

node_admin_user -->|"uses"| node_admin_app
node_admin_app -->|"shows when unauthenticated"| node_admin_login
node_admin_app -->|"routes to"| node_admin_dashboard
node_admin_app -->|"routes to"| node_admin_inventory
node_admin_app -->|"routes to"| node_admin_orders
node_admin_app -->|"routes to"| node_admin_tasks
node_admin_app -->|"routes to"| node_admin_employees
node_admin_app -->|"routes to"| node_admin_reports
node_admin_app -->|"routes to"| node_admin_settings
node_mobile_user -->|"uses"| node_mobile_app
node_mobile_app -->|"starts at"| node_mobile_login
node_mobile_app -->|"navigates to"| node_mobile_nav
node_mobile_app -->|"registers screen"| node_mobile_inventory
node_mobile_nav -->|"navigates to"| node_mobile_dashboard
node_mobile_nav -->|"navigates to"| node_mobile_search
node_mobile_nav -->|"navigates to"| node_mobile_orders
node_mobile_nav -->|"navigates to"| node_mobile_tasks
node_mobile_app -->|"initializes"| node_db_local
node_mobile_app -->|"starts sync listener"| node_external_api
node_mobile_tasks -->|"requests tasks"| node_external_api
node_external_api -.->|"serves requests"| node_api_server
node_api_server -->|"mounts routes"| node_api_routes
node_api_routes -->|"dispatches order requests"| node_api_orders
node_api_routes -->|"dispatches task requests"| node_api_tasks
node_api_routes -->|"dispatches item requests"| node_api_items
node_api_orders -->|"calls"| node_api_order_service
node_api_tasks -->|"calls"| node_api_task_service
node_api_items -->|"calls"| node_api_item_service
node_api_items -->|"logs inventory changes"| node_api_reports
node_api_order_service -->|"uses"| node_db_prisma
node_api_task_service -->|"uses"| node_db_prisma
node_api_reports -->|"uses"| node_db_prisma
node_api_auth -->|"authenticates via"| node_db_user_model
node_db_user_model -->|"queries"| node_db_prisma
node_api_orders -.->|"receives routed calls"| node_api_routes
node_external_api -.->|"offline cache and outbox"| node_db_local

click node_admin_app "https://github.com/heminados/inventorygo-app/blob/main/admin/src/App.tsx"
click node_admin_login "https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/AdminLogin.tsx"
click node_admin_dashboard "https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/HomePage.tsx"
click node_admin_inventory "https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/Inventory.tsx"
click node_admin_orders "https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/OrderManage.tsx"
click node_admin_tasks "https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/TaskManage.tsx"
click node_admin_employees "https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/EmployeeManage.tsx"
click node_admin_reports "https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/Reports.tsx"
click node_admin_settings "https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/BackOffice.tsx"
click node_mobile_app "https://github.com/heminados/inventorygo-app/blob/main/client/App.tsx"
click node_mobile_nav "https://github.com/heminados/inventorygo-app/blob/main/client/navigation/MainDrawer.tsx"
click node_mobile_login "https://github.com/heminados/inventorygo-app/blob/main/client/screens/LoginScreen.tsx"
click node_mobile_dashboard "https://github.com/heminados/inventorygo-app/blob/main/client/screens/DashboardScreen.tsx"
click node_mobile_inventory "https://github.com/heminados/inventorygo-app/blob/main/client/screens/ItamManageScreen.tsx"
click node_mobile_search "https://github.com/heminados/inventorygo-app/blob/main/client/screens/SearchScreen.tsx"
click node_mobile_orders "https://github.com/heminados/inventorygo-app/blob/main/client/screens/OpenOrderScreen.tsx"
click node_mobile_tasks "https://github.com/heminados/inventorygo-app/blob/main/client/screens/TasksScreen.tsx"
click node_api_server "https://github.com/heminados/inventorygo-app/blob/main/server/app.js"
click node_api_auth "https://github.com/heminados/inventorygo-app/blob/main/server/controllers/auth.controller.js"
click node_api_items "https://github.com/heminados/inventorygo-app/blob/main/server/controllers/item.controller.js"
click node_api_item_service "https://github.com/heminados/inventorygo-app/blob/main/server/services/item.service.js"
click node_api_orders "https://github.com/heminados/inventorygo-app/blob/main/server/controllers/order.controller.js"
click node_api_order_service "https://github.com/heminados/inventorygo-app/blob/main/server/services/order.service.js"
click node_api_tasks "https://github.com/heminados/inventorygo-app/blob/main/server/controllers/task.controller.js"
click node_api_task_service "https://github.com/heminados/inventorygo-app/blob/main/server/services/task.service.js"
click node_api_reports "https://github.com/heminados/inventorygo-app/blob/main/server/services/report.service.js"
click node_api_settings "https://github.com/heminados/inventorygo-app/blob/main/server/services/settings.service.js"
click node_api_routes "https://github.com/heminados/inventorygo-app/tree/main/server/routes"
click node_db_local "https://github.com/heminados/inventorygo-app/blob/main/client/db/database.ts"
click node_db_prisma "https://github.com/heminados/inventorygo-app/blob/main/server/config/prisma.js"
click node_db_user_model "https://github.com/heminados/inventorygo-app/blob/main/server/models/user.model.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_admin_app,node_admin_login,node_admin_dashboard,node_admin_inventory,node_admin_orders,node_admin_tasks,node_admin_employees,node_admin_reports,node_admin_settings,node_admin_user,node_mobile_user toneBlue
class node_mobile_app,node_mobile_nav,node_mobile_login,node_mobile_dashboard,node_mobile_inventory,node_mobile_search,node_mobile_orders,node_mobile_tasks toneAmber
class node_api_server,node_api_auth,node_api_items,node_api_item_service,node_api_orders,node_api_order_service,node_api_tasks,node_api_task_service,node_api_reports,node_api_settings,node_api_routes,node_external_api toneMint
class node_db_local,node_db_prisma,node_db_user_model toneRose
```

## Components

### Admin web

- [Admin shell](https://github.com/heminados/inventorygo-app/blob/main/admin/src/App.tsx): `admin/src/App.tsx`
- [Admin login](https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/AdminLogin.tsx): `admin/src/components/AdminLogin.tsx`
- [Dashboard](https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/HomePage.tsx): `admin/src/components/HomePage.tsx`
- [Inventory management](https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/Inventory.tsx): `admin/src/components/Inventory.tsx`
- [Order management](https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/OrderManage.tsx): `admin/src/components/OrderManage.tsx`
- [Task management](https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/TaskManage.tsx): `admin/src/components/TaskManage.tsx`
- [Employee management](https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/EmployeeManage.tsx): `admin/src/components/EmployeeManage.tsx`
- [Reports](https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/Reports.tsx): `admin/src/components/Reports.tsx`
- [Back office](https://github.com/heminados/inventorygo-app/blob/main/admin/src/components/BackOffice.tsx): `admin/src/components/BackOffice.tsx`

### Mobile app

- [Mobile app shell](https://github.com/heminados/inventorygo-app/blob/main/client/App.tsx): `client/App.tsx`
- [Main navigation](https://github.com/heminados/inventorygo-app/blob/main/client/navigation/MainDrawer.tsx): `client/navigation/MainDrawer.tsx`
- [Mobile login](https://github.com/heminados/inventorygo-app/blob/main/client/screens/LoginScreen.tsx): `client/screens/LoginScreen.tsx`
- [Mobile dashboard](https://github.com/heminados/inventorygo-app/blob/main/client/screens/DashboardScreen.tsx): `client/screens/DashboardScreen.tsx`
- [Mobile inventory](https://github.com/heminados/inventorygo-app/blob/main/client/screens/ItamManageScreen.tsx): `client/screens/ItamManageScreen.tsx`
- [Item search](https://github.com/heminados/inventorygo-app/blob/main/client/screens/SearchScreen.tsx): `client/screens/SearchScreen.tsx`
- [Open orders](https://github.com/heminados/inventorygo-app/blob/main/client/screens/OpenOrderScreen.tsx): `client/screens/OpenOrderScreen.tsx`
- [My tasks](https://github.com/heminados/inventorygo-app/blob/main/client/screens/TasksScreen.tsx): `client/screens/TasksScreen.tsx`

### API and domain

- [Express application](https://github.com/heminados/inventorygo-app/blob/main/server/app.js): `server/app.js`
- [Authentication](https://github.com/heminados/inventorygo-app/blob/main/server/controllers/auth.controller.js): `server/controllers/auth.controller.js`
- [Item controller](https://github.com/heminados/inventorygo-app/blob/main/server/controllers/item.controller.js): `server/controllers/item.controller.js`
- [Item service](https://github.com/heminados/inventorygo-app/blob/main/server/services/item.service.js): `server/services/item.service.js`
- [Order controller](https://github.com/heminados/inventorygo-app/blob/main/server/controllers/order.controller.js): `server/controllers/order.controller.js`
- [Order service](https://github.com/heminados/inventorygo-app/blob/main/server/services/order.service.js): `server/services/order.service.js`
- [Task controller](https://github.com/heminados/inventorygo-app/blob/main/server/controllers/task.controller.js): `server/controllers/task.controller.js`
- [Task service](https://github.com/heminados/inventorygo-app/blob/main/server/services/task.service.js): `server/services/task.service.js`
- [Report service](https://github.com/heminados/inventorygo-app/blob/main/server/services/report.service.js): `server/services/report.service.js`
- [Settings service](https://github.com/heminados/inventorygo-app/blob/main/server/services/settings.service.js): `server/services/settings.service.js`
- [API route modules](https://github.com/heminados/inventorygo-app/tree/main/server/routes): `server/routes`

### Persistence

- [Offline SQLite](https://github.com/heminados/inventorygo-app/blob/main/client/db/database.ts): `client/db/database.ts`
- [Prisma client](https://github.com/heminados/inventorygo-app/blob/main/server/config/prisma.js): `server/config/prisma.js`
- [User model access](https://github.com/heminados/inventorygo-app/blob/main/server/models/user.model.js): `server/models/user.model.js`

### Other components

- **Admin user**
- **Mobile user**
- **HTTP API**

## Connections

- Admin user → Admin shell: uses (evidence: `admin/src/App.tsx`)
- Admin shell → Admin login: shows when unauthenticated (evidence: `admin/src/App.tsx`)
- Admin shell → Dashboard: routes to (evidence: `admin/src/App.tsx`)
- Admin shell → Inventory management: routes to (evidence: `admin/src/App.tsx`)
- Admin shell → Order management: routes to (evidence: `admin/src/App.tsx`)
- Admin shell → Task management: routes to (evidence: `admin/src/App.tsx`)
- Admin shell → Employee management: routes to (evidence: `admin/src/App.tsx`)
- Admin shell → Reports: routes to (evidence: `admin/src/App.tsx`)
- Admin shell → Back office: routes to (evidence: `admin/src/App.tsx`)
- Mobile user → Mobile app shell: uses (evidence: `client/App.tsx`)
- Mobile app shell → Mobile login: starts at (evidence: `client/App.tsx`)
- Mobile app shell → Main navigation: navigates to (evidence: `client/App.tsx`)
- Mobile app shell → Mobile inventory: registers screen (evidence: `client/App.tsx`)
- Main navigation → Mobile dashboard: navigates to (evidence: `client/navigation/MainDrawer.tsx`)
- Main navigation → Item search: navigates to (evidence: `client/navigation/MainDrawer.tsx`)
- Main navigation → Open orders: navigates to (evidence: `client/navigation/MainDrawer.tsx`)
- Main navigation → My tasks: navigates to (evidence: `client/navigation/MainDrawer.tsx`)
- Mobile app shell → Offline SQLite: initializes (evidence: `client/App.tsx`)
- Mobile app shell → HTTP API: starts sync listener (evidence: `client/App.tsx`)
- My tasks → HTTP API: requests tasks (evidence: `client/screens/TasksScreen.tsx`)
- HTTP API → Express application: serves requests
- Express application → API route modules: mounts routes (evidence: `server/app.js`)
- API route modules → Order controller: dispatches order requests (evidence: `server/routes/order.routes.js`)
- API route modules → Task controller: dispatches task requests (evidence: `server/routes/task.routes.js`)
- API route modules → Item controller: dispatches item requests (evidence: `server/routes/item.routes.js`)
- Order controller → Order service: calls (evidence: `server/controllers/order.controller.js`)
- Task controller → Task service: calls (evidence: `server/controllers/task.controller.js`)
- Item controller → Item service: calls (evidence: `server/controllers/item.controller.js`)
- Item controller → Report service: logs inventory changes (evidence: `server/controllers/item.controller.js`)
- Order service → Prisma client: uses (evidence: `server/services/order.service.js`)
- Task service → Prisma client: uses (evidence: `server/services/task.service.js`)
- Report service → Prisma client: uses (evidence: `server/services/report.service.js`)
- Authentication → User model access: authenticates via
- User model access → Prisma client: queries (evidence: `server/models/user.model.js`)
- Order controller → API route modules: receives routed calls (evidence: `server/routes/order.routes.js`)
- HTTP API → Offline SQLite: offline cache and outbox
