# johnram1975/allone-wms architecture

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

- Interactive diagram: https://gitdiagram.com/johnram1975/allone-wms
- Repository: https://github.com/johnram1975/allone-wms

## Overview

AllOne WMS is a multi-tenant warehouse and custody system for construction sites. Operators authenticate, select an organization and site, then manage workers and inventory, handle requests at the counter, and record returns and proof of delivery; platform staff manage organizations, plans, billing, and support. The graph combines README-documented capabilities with sampled route, service, and frontend evidence. Some domain routes and integrations were not sampled, so their connections are omitted or marked unverified.

Main entry points: [`frontend/src/api.js`](https://github.com/johnram1975/allone-wms/blob/main/frontend/src/api.js) (API client), [`frontend/src/App.jsx`](https://github.com/johnram1975/allone-wms/blob/main/frontend/src/App.jsx) (App routing), [`backend/app/routers/auth.py`](https://github.com/johnram1975/allone-wms/blob/main/backend/app/routers/auth.py) (Login and access routes), [`backend/app/models/models.py`](https://github.com/johnram1975/allone-wms/blob/main/backend/app/models/models.py) (Domain models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Operator interface"]
  node_app["App routing<br/>[App.jsx]"]
  node_auth_ui["Session context<br/>[AuthContext.jsx]"]
  node_tenant_ui["Tenant context<br/>[TenantContext.jsx]"]
  node_api_client["API client<br/>[api.js]"]
  node_inventory_ui["Inventory pages<br/>[Insumos.jsx]"]
  node_request_ui["Request pages<br/>[RequisicaoNova.jsx]"]
  node_counter_ui["Counter service"]
  node_signature_ui["Signature capture<br/>[SignaturePad.jsx]"]
  node_biometric_ui["Worker verification"]
  node_platform_ui["Platform console"]
end

subgraph group_operations["Warehouse operations"]
  node_requisition_routes["Request endpoints<br/>[requisicoes.py]"]
  node_requisition_service["Request lifecycle"]
  node_biometric_service["Biometric device service<br/>[service.py]"]
end

subgraph group_platform["Identity and platform"]
  node_api["FastAPI entry<br/>[main.py]"]
  node_auth_routes["Login and access routes<br/>[auth.py]"]
  node_auth_service["Authentication<br/>[auth.py]"]
  node_tenant_access["Tenant and site access<br/>[tenant.py]"]
end

subgraph group_data["Persistence and services"]
  node_models["Domain models<br/>[models.py]"]
  node_database[("PostgreSQL access<br/>[database.py]")]
  node_redis[("Redis client<br/>[redis_client.py]")]
  node_postgres[("PostgreSQL")]
end

node_browser(("Browser / tablet"))
node_redis_service[("Redis service")]

node_browser -->|"uses"| node_app
node_app -->|"provides routes"| node_auth_ui
node_app -->|"wraps tenant"| node_tenant_ui
node_auth_ui -->|"calls"| node_api_client
node_api_client -->|"sends API requests"| node_api
node_api -->|"serves API routes"| node_auth_routes
node_auth_routes -->|"uses authentication"| node_auth_service
node_auth_routes -->|"checks tenant context"| node_tenant_access
node_inventory_ui -.->|"requests inventory"| node_api_client
node_request_ui -.->|"submits requests"| node_api_client
node_counter_ui -.->|"sends fulfillment"| node_api_client
node_signature_ui -.->|"captures proof"| node_counter_ui
node_api_client -.->|"calls endpoints"| node_requisition_routes
node_requisition_routes -.->|"delegates requests"| node_requisition_service
node_requisition_service -->|"reads and writes"| node_models
node_biometric_ui -->|"uses API"| node_api_client
node_api_client -.->|"calls device API"| node_biometric_service
node_biometric_service -->|"persists device data"| node_models
node_platform_ui -->|"uses API"| node_api_client
node_models -->|"maps tables"| node_database
node_database -->|"connects"| node_postgres
node_redis -.->|"connects optionally"| node_redis_service
node_browser -->|"opens platform console"| node_platform_ui

click node_app "https://github.com/johnram1975/allone-wms/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/johnram1975/allone-wms/blob/main/frontend/src/AuthContext.jsx"
click node_tenant_ui "https://github.com/johnram1975/allone-wms/blob/main/frontend/src/TenantContext.jsx"
click node_api_client "https://github.com/johnram1975/allone-wms/blob/main/frontend/src/api.js"
click node_inventory_ui "https://github.com/johnram1975/allone-wms/blob/main/frontend/src/pages/Insumos.jsx"
click node_request_ui "https://github.com/johnram1975/allone-wms/blob/main/frontend/src/pages/RequisicaoNova.jsx"
click node_counter_ui "https://github.com/johnram1975/allone-wms/blob/main/frontend/src/pages/RequisicaoAtendimento.jsx"
click node_signature_ui "https://github.com/johnram1975/allone-wms/blob/main/frontend/src/components/SignaturePad.jsx"
click node_biometric_ui "https://github.com/johnram1975/allone-wms/blob/main/frontend/src/pages/ColaboradorBiometria.jsx"
click node_platform_ui "https://github.com/johnram1975/allone-wms/blob/main/frontend/src/platform/PlatformOrgDetail.jsx"
click node_api "https://github.com/johnram1975/allone-wms/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/johnram1975/allone-wms/blob/main/backend/app/routers/auth.py"
click node_auth_service "https://github.com/johnram1975/allone-wms/blob/main/backend/app/auth.py"
click node_tenant_access "https://github.com/johnram1975/allone-wms/blob/main/backend/app/tenant.py"
click node_requisition_routes "https://github.com/johnram1975/allone-wms/blob/main/backend/app/routers/requisicoes.py"
click node_requisition_service "https://github.com/johnram1975/allone-wms/blob/main/backend/app/requisicoes_service.py"
click node_biometric_service "https://github.com/johnram1975/allone-wms/blob/main/backend/app/biometric/service.py"
click node_models "https://github.com/johnram1975/allone-wms/blob/main/backend/app/models/models.py"
click node_database "https://github.com/johnram1975/allone-wms/blob/main/backend/app/database.py"
click node_redis "https://github.com/johnram1975/allone-wms/blob/main/backend/app/core/redis_client.py"

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_auth_ui,node_tenant_ui,node_api_client,node_inventory_ui,node_request_ui,node_counter_ui,node_signature_ui,node_biometric_ui,node_platform_ui,node_browser toneBlue
class node_requisition_routes,node_requisition_service,node_biometric_service,node_redis_service toneAmber
class node_api,node_auth_routes,node_auth_service,node_tenant_access toneMint
class node_models,node_database,node_redis,node_postgres toneRose
```

## Components

### Operator interface

- [App routing](https://github.com/johnram1975/allone-wms/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Session context](https://github.com/johnram1975/allone-wms/blob/main/frontend/src/AuthContext.jsx): `frontend/src/AuthContext.jsx`
- [Tenant context](https://github.com/johnram1975/allone-wms/blob/main/frontend/src/TenantContext.jsx): `frontend/src/TenantContext.jsx`
- [API client](https://github.com/johnram1975/allone-wms/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Inventory pages](https://github.com/johnram1975/allone-wms/blob/main/frontend/src/pages/Insumos.jsx): `frontend/src/pages/Insumos.jsx`
- [Request pages](https://github.com/johnram1975/allone-wms/blob/main/frontend/src/pages/RequisicaoNova.jsx): `frontend/src/pages/RequisicaoNova.jsx`
- [Counter service](https://github.com/johnram1975/allone-wms/blob/main/frontend/src/pages/RequisicaoAtendimento.jsx): `frontend/src/pages/RequisicaoAtendimento.jsx`
- [Signature capture](https://github.com/johnram1975/allone-wms/blob/main/frontend/src/components/SignaturePad.jsx): `frontend/src/components/SignaturePad.jsx`
- [Worker verification](https://github.com/johnram1975/allone-wms/blob/main/frontend/src/pages/ColaboradorBiometria.jsx): `frontend/src/pages/ColaboradorBiometria.jsx`
- [Platform console](https://github.com/johnram1975/allone-wms/blob/main/frontend/src/platform/PlatformOrgDetail.jsx): `frontend/src/platform/PlatformOrgDetail.jsx`

### Warehouse operations

- [Request endpoints](https://github.com/johnram1975/allone-wms/blob/main/backend/app/routers/requisicoes.py): `backend/app/routers/requisicoes.py`
- [Request lifecycle](https://github.com/johnram1975/allone-wms/blob/main/backend/app/requisicoes_service.py): `backend/app/requisicoes_service.py`
- [Biometric device service](https://github.com/johnram1975/allone-wms/blob/main/backend/app/biometric/service.py): `backend/app/biometric/service.py`

### Identity and platform

- [FastAPI entry](https://github.com/johnram1975/allone-wms/blob/main/backend/app/main.py): `backend/app/main.py`
- [Login and access routes](https://github.com/johnram1975/allone-wms/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Authentication](https://github.com/johnram1975/allone-wms/blob/main/backend/app/auth.py): `backend/app/auth.py`
- [Tenant and site access](https://github.com/johnram1975/allone-wms/blob/main/backend/app/tenant.py): `backend/app/tenant.py`

### Persistence and services

- [Domain models](https://github.com/johnram1975/allone-wms/blob/main/backend/app/models/models.py): `backend/app/models/models.py`
- [PostgreSQL access](https://github.com/johnram1975/allone-wms/blob/main/backend/app/database.py): `backend/app/database.py`
- [Redis client](https://github.com/johnram1975/allone-wms/blob/main/backend/app/core/redis_client.py): `backend/app/core/redis_client.py`
- **PostgreSQL**

### Other components

- **Browser / tablet**
- **Redis service**

## Connections

- Browser / tablet → App routing: uses (evidence: `README.md`)
- App routing → Session context: provides routes (evidence: `frontend/src/App.jsx`)
- App routing → Tenant context: wraps tenant (evidence: `frontend/src/App.jsx`)
- Session context → API client: calls (evidence: `frontend/src/AuthContext.jsx`)
- API client → FastAPI entry: sends API requests (evidence: `README.md`)
- FastAPI entry → Login and access routes: serves API routes (evidence: `backend/app/main.py`)
- Login and access routes → Authentication: uses authentication (evidence: `backend/app/routers/auth.py`)
- Login and access routes → Tenant and site access: checks tenant context (evidence: `backend/app/routers/auth.py`)
- Inventory pages → API client: requests inventory
- Request pages → API client: submits requests
- Counter service → API client: sends fulfillment
- Signature capture → Counter service: captures proof
- API client → Request endpoints: calls endpoints
- Request endpoints → Request lifecycle: delegates requests
- Request lifecycle → Domain models: reads and writes (evidence: `backend/app/requisicoes_service.py`)
- Worker verification → API client: uses API (evidence: `frontend/src/pages/ColaboradorBiometria.jsx`)
- API client → Biometric device service: calls device API
- Biometric device service → Domain models: persists device data (evidence: `backend/app/biometric/service.py`)
- Platform console → API client: uses API (evidence: `frontend/src/platform/PlatformOrgDetail.jsx`)
- Domain models → PostgreSQL access: maps tables (evidence: `backend/app/models/models.py`)
- PostgreSQL access → PostgreSQL: connects (evidence: `backend/app/database.py`)
- Redis client → Redis service: connects optionally (evidence: `backend/app/core/redis_client.py`)
- Browser / tablet → Platform console: opens platform console (evidence: `README.md`)
