# saumyatiwariexe/odoohackathon architecture

> Architecture diagram of the GitHub repository saumyatiwariexe/odoohackathon, 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/saumyatiwariexe/odoohackathon
- Repository: https://github.com/saumyatiwariexe/odoohackathon

## Overview

StockSense is a warehouse inventory management application. Operators use its React interface to review stock and create receipts, deliveries, transfers, or adjustments; the FastAPI service exposes those capabilities, while operation validation updates quantities and records stock movements. The product also includes dashboard analytics, warehouse configuration, authentication, and an immutable movement ledger. The excerpts establish routing, catalog and operation database access, and login/signup persistence; links for other unsampled API behavior are shown as unverified where useful.

Main entry points: [`frontend/src/App.tsx`](https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/App.tsx) (Application routes), [`main.py`](https://github.com/saumyatiwariexe/odoohackathon/blob/main/main.py) (FastAPI application), [`frontend/src/pages/operations/OperationsPage.tsx`](https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/operations/OperationsPage.tsx) (Operations console), [`routers/catalog.py`](https://github.com/saumyatiwariexe/odoohackathon/blob/main/routers/catalog.py) (Catalog API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Operator interface"]
  node_app["Application routes<br/>[App.tsx]"]
  node_layout["Workspace layout<br/>[AppLayout.tsx]"]
  node_dashboard_ui["Telemetry dashboard<br/>[DashboardPage.tsx]"]
  node_catalog_ui["Product catalog<br/>[ProductsPage.tsx]"]
  node_operations_ui["Operations console<br/>[OperationsPage.tsx]"]
  node_operation_detail["Operation detail"]
  node_ledger_ui["Movement history<br/>[LedgerPage.tsx]"]
  node_settings_ui["Warehouse settings<br/>[SettingsPage.tsx]"]
  node_auth_ui["Sign-in and recovery<br/>[LoginPage.tsx]"]
end

subgraph group_service["API and identity"]
  node_api["FastAPI application<br/>[main.py]"]
  node_auth_login["Login<br/>[login.py]"]
  node_auth_signup["Registration<br/>[signup.py]"]
  node_auth_reset["Password recovery<br/>[password_reset.py]"]
end

subgraph group_inventory["Inventory workflows"]
  node_catalog_api["Catalog API<br/>[catalog.py]"]
  node_operations_api["Operations API<br/>[operations.py]"]
  node_dashboard_api["Dashboard analytics API<br/>[dashboard.py]"]
  node_ledger_api["Stock ledger API<br/>[ledger.py]"]
  node_locations_api["Location configuration API<br/>[locations.py]"]
end

subgraph group_persistence["Persistent state"]
  node_database[("PostgreSQL inventory and user data")]
end

node_operator(("Warehouse operator"))

node_operator -->|"uses"| node_app
node_app -->|"routes through"| node_layout
node_app -->|"routes to"| node_dashboard_ui
node_app -->|"routes to"| node_catalog_ui
node_app -->|"routes to"| node_operations_ui
node_app -->|"routes to"| node_operation_detail
node_app -->|"routes to"| node_ledger_ui
node_app -->|"routes to"| node_settings_ui
node_app -->|"routes to"| node_auth_ui
node_api -->|"invokes"| node_auth_login
node_api -->|"invokes"| node_auth_signup
node_api -->|"invokes"| node_auth_reset
node_api -->|"registers routes"| node_catalog_api
node_api -->|"registers routes"| node_operations_api
node_api -->|"registers routes"| node_dashboard_api
node_api -->|"registers routes"| node_ledger_api
node_api -->|"registers routes"| node_locations_api
node_catalog_ui -->|"requests catalog"| node_catalog_api
node_operations_ui -->|"requests operations"| node_operations_api
node_operations_ui -->|"loads products"| node_catalog_api
node_operations_ui -->|"loads locations"| node_locations_api
node_catalog_api -->|"reads and writes"| node_database
node_operations_api -->|"updates stock and ledger"| node_database
node_auth_login -->|"reads user"| node_database
node_auth_signup -->|"creates user"| node_database
node_dashboard_ui -.->|"loads analytics"| node_dashboard_api
node_ledger_ui -.->|"loads movement history"| node_ledger_api
node_settings_ui -.->|"configures locations"| node_locations_api
node_auth_ui -.->|"submits credentials"| node_api
node_auth_reset -.->|"uses reset state"| node_database

click node_app "https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/App.tsx"
click node_layout "https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/components/layout/AppLayout.tsx"
click node_dashboard_ui "https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/dashboard/DashboardPage.tsx"
click node_catalog_ui "https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/products/ProductsPage.tsx"
click node_operations_ui "https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/operations/OperationsPage.tsx"
click node_operation_detail "https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/operations/OperationDetailPage.tsx"
click node_ledger_ui "https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/ledger/LedgerPage.tsx"
click node_settings_ui "https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/settings/SettingsPage.tsx"
click node_auth_ui "https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/auth/LoginPage.tsx"
click node_api "https://github.com/saumyatiwariexe/odoohackathon/blob/main/main.py"
click node_auth_login "https://github.com/saumyatiwariexe/odoohackathon/blob/main/auth/login.py"
click node_auth_signup "https://github.com/saumyatiwariexe/odoohackathon/blob/main/auth/signup.py"
click node_auth_reset "https://github.com/saumyatiwariexe/odoohackathon/blob/main/auth/password_reset.py"
click node_catalog_api "https://github.com/saumyatiwariexe/odoohackathon/blob/main/routers/catalog.py"
click node_operations_api "https://github.com/saumyatiwariexe/odoohackathon/blob/main/routers/operations.py"
click node_dashboard_api "https://github.com/saumyatiwariexe/odoohackathon/blob/main/routers/dashboard.py"
click node_ledger_api "https://github.com/saumyatiwariexe/odoohackathon/blob/main/routers/ledger.py"
click node_locations_api "https://github.com/saumyatiwariexe/odoohackathon/blob/main/routers/locations.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_layout,node_dashboard_ui,node_catalog_ui,node_operations_ui,node_operation_detail,node_ledger_ui,node_settings_ui,node_auth_ui toneBlue
class node_api,node_auth_login,node_auth_signup,node_auth_reset toneAmber
class node_catalog_api,node_operations_api,node_dashboard_api,node_ledger_api,node_locations_api toneMint
class node_database toneRose
class node_operator toneIndigo
```

## Components

### Operator interface

- [Application routes](https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Workspace layout](https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/components/layout/AppLayout.tsx): `frontend/src/components/layout/AppLayout.tsx`
- [Telemetry dashboard](https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/dashboard/DashboardPage.tsx): `frontend/src/pages/dashboard/DashboardPage.tsx`
- [Product catalog](https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/products/ProductsPage.tsx): `frontend/src/pages/products/ProductsPage.tsx`
- [Operations console](https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/operations/OperationsPage.tsx): `frontend/src/pages/operations/OperationsPage.tsx`
- [Operation detail](https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/operations/OperationDetailPage.tsx): `frontend/src/pages/operations/OperationDetailPage.tsx`
- [Movement history](https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/ledger/LedgerPage.tsx): `frontend/src/pages/ledger/LedgerPage.tsx`
- [Warehouse settings](https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/settings/SettingsPage.tsx): `frontend/src/pages/settings/SettingsPage.tsx`
- [Sign-in and recovery](https://github.com/saumyatiwariexe/odoohackathon/blob/main/frontend/src/pages/auth/LoginPage.tsx): `frontend/src/pages/auth/LoginPage.tsx`

### API and identity

- [FastAPI application](https://github.com/saumyatiwariexe/odoohackathon/blob/main/main.py): `main.py`
- [Login](https://github.com/saumyatiwariexe/odoohackathon/blob/main/auth/login.py): `auth/login.py`
- [Registration](https://github.com/saumyatiwariexe/odoohackathon/blob/main/auth/signup.py): `auth/signup.py`
- [Password recovery](https://github.com/saumyatiwariexe/odoohackathon/blob/main/auth/password_reset.py): `auth/password_reset.py`

### Inventory workflows

- [Catalog API](https://github.com/saumyatiwariexe/odoohackathon/blob/main/routers/catalog.py): `routers/catalog.py`
- [Operations API](https://github.com/saumyatiwariexe/odoohackathon/blob/main/routers/operations.py): `routers/operations.py`
- [Dashboard analytics API](https://github.com/saumyatiwariexe/odoohackathon/blob/main/routers/dashboard.py): `routers/dashboard.py`
- [Stock ledger API](https://github.com/saumyatiwariexe/odoohackathon/blob/main/routers/ledger.py): `routers/ledger.py`
- [Location configuration API](https://github.com/saumyatiwariexe/odoohackathon/blob/main/routers/locations.py): `routers/locations.py`

### Persistent state

- **PostgreSQL inventory and user data**

### Other components

- **Warehouse operator**

## Connections

- Warehouse operator → Application routes: uses (evidence: `README.md`)
- Application routes → Workspace layout: routes through (evidence: `frontend/src/App.tsx`)
- Application routes → Telemetry dashboard: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Product catalog: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Operations console: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Operation detail: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Movement history: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Warehouse settings: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Sign-in and recovery: routes to (evidence: `frontend/src/App.tsx`)
- FastAPI application → Login: invokes (evidence: `main.py`)
- FastAPI application → Registration: invokes (evidence: `main.py`)
- FastAPI application → Password recovery: invokes (evidence: `main.py`)
- FastAPI application → Catalog API: registers routes (evidence: `main.py`)
- FastAPI application → Operations API: registers routes (evidence: `main.py`)
- FastAPI application → Dashboard analytics API: registers routes (evidence: `main.py`)
- FastAPI application → Stock ledger API: registers routes (evidence: `main.py`)
- FastAPI application → Location configuration API: registers routes (evidence: `main.py`)
- Product catalog → Catalog API: requests catalog (evidence: `frontend/src/pages/products/ProductsPage.tsx`)
- Operations console → Operations API: requests operations (evidence: `frontend/src/pages/operations/OperationsPage.tsx`)
- Operations console → Catalog API: loads products (evidence: `frontend/src/pages/operations/OperationsPage.tsx`)
- Operations console → Location configuration API: loads locations (evidence: `frontend/src/pages/operations/OperationsPage.tsx`)
- Catalog API → PostgreSQL inventory and user data: reads and writes (evidence: `routers/catalog.py`)
- Operations API → PostgreSQL inventory and user data: updates stock and ledger (evidence: `routers/operations.py`)
- Login → PostgreSQL inventory and user data: reads user (evidence: `auth/login.py`)
- Registration → PostgreSQL inventory and user data: creates user (evidence: `auth/signup.py`)
- Telemetry dashboard → Dashboard analytics API: loads analytics
- Movement history → Stock ledger API: loads movement history
- Warehouse settings → Location configuration API: configures locations
- Sign-in and recovery → FastAPI application: submits credentials
- Password recovery → PostgreSQL inventory and user data: uses reset state
