# manzav95/paintinventory architecture

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

- Interactive diagram: https://gitdiagram.com/manzav95/paintinventory
- Repository: https://github.com/manzav95/paintinventory
- Video tour (about a minute): https://gitdiagram.com/manzav95/paintinventory/video

## Overview

This is a paint-inventory operations app with a React Native client and a server-backed API; the README’s NFC description does not reflect the broader capabilities visible in the repository tree. The main workflow is staff using the app to manage inventory, with client services making API requests and server handlers working with persisted data. The graph includes major documented-by-directory product areas, but their internal connections are omitted where sampled source does not establish them.

Main entry points: [`server/server.js`](https://github.com/manzav95/paintinventory/blob/main/server/server.js) (Inventory API), [`screens/InventoryListScreen.js`](https://github.com/manzav95/paintinventory/blob/main/screens/InventoryListScreen.js) (Inventory screen), [`services/inventoryService.js`](https://github.com/manzav95/paintinventory/blob/main/services/inventoryService.js) (Inventory service), [`server/stainFormulasStore.js`](https://github.com/manzav95/paintinventory/blob/main/server/stainFormulasStore.js) (Formula store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mobile app"]
  node_app["App shell<br/>[App.js]"]
  node_dashboard["Dashboard<br/>[DashboardScreen.js]"]
  node_inventory_screen["Inventory screen"]
  node_nfc["NFC scanning<br/>[nfcService.js]"]
  node_api_config["API configuration<br/>[config.js]"]
  node_ui["Shared UI controls<br/>[AppButton.js]"]
end

subgraph group_inventory["Inventory operations"]
  node_inventory_service["Inventory service"]
end

subgraph group_operations["Business workflows"]
  node_orders["Order management<br/>[orderService.js]"]
  node_material_usage["Material usage"]
  node_reports["Reporting<br/>[reportService.js]"]
  node_stain_formulas["Stain formulas"]
  node_safety_docs["Safety documents<br/>[itemDocRoutes.js]"]
  node_job_lookup["Job lookup<br/>[jobLookup.js]"]
  node_overview["Operations overview<br/>[overviewRoutes.js]"]
  node_user_messages["User messages"]
  node_waste["Waste tracking"]
end

subgraph group_backend["Server and data"]
  node_inventory_api["Inventory API<br/>[server.js]"]
  node_database[("Server database<br/>[database.js]")]
  node_formula_store[("Formula store")]
end

node_staff(("Staff user"))

node_staff -->|"uses"| node_app
node_app -->|"renders"| node_dashboard
node_staff -->|"manages stock"| node_inventory_screen
node_inventory_screen -->|"uses"| node_inventory_service
node_inventory_service -->|"reads URL"| node_api_config
node_orders -->|"reads URL"| node_api_config
node_inventory_service -.->|"requests API"| node_inventory_api
node_inventory_api -->|"uses"| node_database
node_inventory_api -->|"mounts routes"| node_stain_formulas
node_inventory_api -->|"mounts routes"| node_safety_docs
node_inventory_api -->|"mounts routes"| node_overview
node_inventory_api -->|"mounts routes"| node_user_messages
node_stain_formulas -->|"calls"| node_formula_store
node_safety_docs -->|"uses"| node_formula_store
node_overview -->|"uses"| node_formula_store
node_inventory_screen -->|"uses"| node_ui
node_staff -->|"scans tags"| node_nfc

click node_app "https://github.com/manzav95/paintinventory/blob/main/App.js"
click node_dashboard "https://github.com/manzav95/paintinventory/blob/main/screens/DashboardScreen.js"
click node_inventory_screen "https://github.com/manzav95/paintinventory/blob/main/screens/InventoryListScreen.js"
click node_nfc "https://github.com/manzav95/paintinventory/blob/main/services/nfcService.js"
click node_inventory_service "https://github.com/manzav95/paintinventory/blob/main/services/inventoryService.js"
click node_inventory_api "https://github.com/manzav95/paintinventory/blob/main/server/server.js"
click node_database "https://github.com/manzav95/paintinventory/blob/main/server/database.js"
click node_orders "https://github.com/manzav95/paintinventory/blob/main/services/orderService.js"
click node_material_usage "https://github.com/manzav95/paintinventory/blob/main/services/materialUsageService.js"
click node_reports "https://github.com/manzav95/paintinventory/blob/main/services/reportService.js"
click node_stain_formulas "https://github.com/manzav95/paintinventory/blob/main/server/stainFormulaRoutes.js"
click node_formula_store "https://github.com/manzav95/paintinventory/blob/main/server/stainFormulasStore.js"
click node_safety_docs "https://github.com/manzav95/paintinventory/blob/main/server/itemDocRoutes.js"
click node_job_lookup "https://github.com/manzav95/paintinventory/blob/main/server/jobLookup.js"
click node_overview "https://github.com/manzav95/paintinventory/blob/main/server/overviewRoutes.js"
click node_user_messages "https://github.com/manzav95/paintinventory/blob/main/server/userMessageRoutes.js"
click node_waste "https://github.com/manzav95/paintinventory/blob/main/services/wasteTrackingService.js"
click node_api_config "https://github.com/manzav95/paintinventory/blob/main/config.js"
click node_ui "https://github.com/manzav95/paintinventory/blob/main/components/ui/AppButton.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_app,node_dashboard,node_inventory_screen,node_nfc,node_api_config,node_ui,node_staff toneBlue
class node_inventory_service toneAmber
class node_orders,node_material_usage,node_reports,node_stain_formulas,node_safety_docs,node_job_lookup,node_overview,node_user_messages,node_waste toneMint
class node_inventory_api,node_database,node_formula_store toneRose
```

## Components

### Mobile app

- [App shell](https://github.com/manzav95/paintinventory/blob/main/App.js): `App.js`
- [Dashboard](https://github.com/manzav95/paintinventory/blob/main/screens/DashboardScreen.js): `screens/DashboardScreen.js`
- [Inventory screen](https://github.com/manzav95/paintinventory/blob/main/screens/InventoryListScreen.js): `screens/InventoryListScreen.js`
- [NFC scanning](https://github.com/manzav95/paintinventory/blob/main/services/nfcService.js): `services/nfcService.js`
- [API configuration](https://github.com/manzav95/paintinventory/blob/main/config.js): `config.js`
- [Shared UI controls](https://github.com/manzav95/paintinventory/blob/main/components/ui/AppButton.js): `components/ui/AppButton.js`

### Inventory operations

- [Inventory service](https://github.com/manzav95/paintinventory/blob/main/services/inventoryService.js): `services/inventoryService.js`

### Business workflows

- [Order management](https://github.com/manzav95/paintinventory/blob/main/services/orderService.js): `services/orderService.js`
- [Material usage](https://github.com/manzav95/paintinventory/blob/main/services/materialUsageService.js): `services/materialUsageService.js`
- [Reporting](https://github.com/manzav95/paintinventory/blob/main/services/reportService.js): `services/reportService.js`
- [Stain formulas](https://github.com/manzav95/paintinventory/blob/main/server/stainFormulaRoutes.js): `server/stainFormulaRoutes.js`
- [Safety documents](https://github.com/manzav95/paintinventory/blob/main/server/itemDocRoutes.js): `server/itemDocRoutes.js`
- [Job lookup](https://github.com/manzav95/paintinventory/blob/main/server/jobLookup.js): `server/jobLookup.js`
- [Operations overview](https://github.com/manzav95/paintinventory/blob/main/server/overviewRoutes.js): `server/overviewRoutes.js`
- [User messages](https://github.com/manzav95/paintinventory/blob/main/server/userMessageRoutes.js): `server/userMessageRoutes.js`
- [Waste tracking](https://github.com/manzav95/paintinventory/blob/main/services/wasteTrackingService.js): `services/wasteTrackingService.js`

### Server and data

- [Inventory API](https://github.com/manzav95/paintinventory/blob/main/server/server.js): `server/server.js`
- [Server database](https://github.com/manzav95/paintinventory/blob/main/server/database.js): `server/database.js`
- [Formula store](https://github.com/manzav95/paintinventory/blob/main/server/stainFormulasStore.js): `server/stainFormulasStore.js`

### Other components

- **Staff user**

## Connections

- Staff user → App shell: uses (evidence: `README.md`)
- App shell → Dashboard: renders (evidence: `App.js`)
- Staff user → Inventory screen: manages stock (evidence: `README.md`)
- Inventory screen → Inventory service: uses (evidence: `screens/InventoryListScreen.js`)
- Inventory service → API configuration: reads URL (evidence: `services/inventoryService.js`)
- Order management → API configuration: reads URL (evidence: `services/orderService.js`)
- Inventory service → Inventory API: requests API
- Inventory API → Server database: uses (evidence: `server/server.js`)
- Inventory API → Stain formulas: mounts routes (evidence: `server/server.js`)
- Inventory API → Safety documents: mounts routes (evidence: `server/server.js`)
- Inventory API → Operations overview: mounts routes (evidence: `server/server.js`)
- Inventory API → User messages: mounts routes (evidence: `server/server.js`)
- Stain formulas → Formula store: calls (evidence: `server/stainFormulaRoutes.js`)
- Safety documents → Formula store: uses (evidence: `server/itemDocRoutes.js`)
- Operations overview → Formula store: uses (evidence: `server/overviewRoutes.js`)
- Inventory screen → Shared UI controls: uses (evidence: `screens/InventoryListScreen.js`)
- Staff user → NFC scanning: scans tags (evidence: `README.md`)
