# deepbartaria/assetflow-odoo-hackathon architecture

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

- Interactive diagram: https://gitdiagram.com/deepbartaria/assetflow-odoo-hackathon
- Repository: https://github.com/deepbartaria/assetflow-odoo-hackathon

## Overview

AssetFlow is a web-based asset and shared-resource management system. The main workflow runs from dashboard modules through API requests to domain records, covering organization setup, asset allocation and transfer, booking, maintenance, audits, and reporting. Sampled allocation code confirms availability checks, asset status/history updates, and overdue notifications; the README documents additional capabilities whose implementations were not sampled. Dashed edges mark documented but unverified runtime links.

Main entry points: [`lib/api.ts`](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/lib/api.ts) (API client), [`app/api/allocations/route.ts`](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/api/allocations/route.ts) (Allocation API), [`app/api/chat/route.ts`](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/api/chat/route.ts) (Assistant API), [`lib/mongodb.ts`](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/lib/mongodb.ts) (MongoDB connection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_dashboard["Dashboard shell<br/>[layout.tsx]"]
  node_sidebar["Role navigation<br/>[Sidebar.tsx]"]
end

subgraph group_operations["Operational workflows"]
  node_allocation_ui["Allocation &amp; transfer<br/>[page.tsx]"]
  node_booking_ui["Resource booking<br/>[page.tsx]"]
  node_maintenance_ui["Maintenance<br/>[page.tsx]"]
  node_audit_ui["Asset audits<br/>[page.tsx]"]
  node_org_ui["Organization setup<br/>[page.tsx]"]
  node_reports_ui["Reports &amp; analytics<br/>[page.tsx]"]
  node_scanner_ui["QR scanning<br/>[page.tsx]"]
  node_tara_ui["Tara assistant<br/>[TaraChatbot.tsx]"]
end

subgraph group_services["API services"]
  node_api_client["API client<br/>[api.ts]"]
  node_allocation_api["Allocation API<br/>[route.ts]"]
  node_transfer_api["Transfer API<br/>[route.ts]"]
  node_org_api["Organization APIs"]
  node_reports_api["Dashboard &amp; report APIs"]
  node_chat_api["Assistant API<br/>[route.ts]"]
  node_notify_service["Notifications<br/>[notifications.ts]"]
end

subgraph group_data["Domain data"]
  node_db_connector["MongoDB connection<br/>[mongodb.ts]"]
  node_domain_models[("Asset &amp; workflow records")]
  node_shared_schema["Assistant data schema<br/>[schema.ts]"]
end

node_staff(("Organization users"))

node_staff -.->|"uses"| node_dashboard
node_dashboard -.->|"renders"| node_sidebar
node_staff -.->|"manages assets"| node_allocation_ui
node_staff -.->|"books resources"| node_booking_ui
node_staff -.->|"requests repairs"| node_maintenance_ui
node_staff -.->|"verifies assets"| node_audit_ui
node_staff -.->|"configures organization"| node_org_ui
node_staff -.->|"reviews insights"| node_reports_ui
node_staff -.->|"scans assets"| node_scanner_ui
node_staff -.->|"asks questions"| node_tara_ui
node_allocation_ui -->|"requests data"| node_api_client
node_booking_ui -->|"requests data"| node_api_client
node_maintenance_ui -->|"requests data"| node_api_client
node_audit_ui -->|"requests data"| node_api_client
node_org_ui -->|"requests data"| node_api_client
node_reports_ui -->|"requests data"| node_api_client
node_api_client -.->|"sends HTTP request"| node_allocation_api
node_api_client -.->|"sends HTTP request"| node_transfer_api
node_allocation_api -->|"connects"| node_db_connector
node_transfer_api -->|"connects"| node_db_connector
node_allocation_api -->|"reads and updates"| node_domain_models
node_transfer_api -->|"reads and creates"| node_domain_models
node_allocation_api -->|"creates notifications"| node_notify_service
node_org_ui -.->|"manages records"| node_org_api
node_reports_ui -.->|"retrieves reports"| node_reports_api
node_tara_ui -.->|"sends chat"| node_chat_api
node_chat_api -->|"connects"| node_db_connector
node_chat_api -->|"queries domain data"| node_shared_schema
node_chat_api -->|"queries records"| node_domain_models
node_db_connector -.->|"persists records"| node_domain_models

click node_dashboard "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/layout.tsx"
click node_sidebar "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/Sidebar.tsx"
click node_allocation_ui "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/allocation-transfer/page.tsx"
click node_booking_ui "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/resource-booking/page.tsx"
click node_maintenance_ui "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/maintenance/page.tsx"
click node_audit_ui "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/audit/page.tsx"
click node_org_ui "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/organization-setup/page.tsx"
click node_reports_ui "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/reports/page.tsx"
click node_scanner_ui "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/scanner/page.tsx"
click node_tara_ui "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/components/TaraChatbot.tsx"
click node_api_client "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/lib/api.ts"
click node_allocation_api "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/api/allocations/route.ts"
click node_transfer_api "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/api/transfers/route.ts"
click node_org_api "https://github.com/deepbartaria/assetflow-odoo-hackathon/tree/main/app/api"
click node_reports_api "https://github.com/deepbartaria/assetflow-odoo-hackathon/tree/main/app/api/reports"
click node_chat_api "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/api/chat/route.ts"
click node_notify_service "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/lib/notifications.ts"
click node_db_connector "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/lib/mongodb.ts"
click node_domain_models "https://github.com/deepbartaria/assetflow-odoo-hackathon/tree/main/models"
click node_shared_schema "https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/lib/models/schema.ts"

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_dashboard,node_sidebar,node_staff toneBlue
class node_allocation_ui,node_booking_ui,node_maintenance_ui,node_audit_ui,node_org_ui,node_reports_ui,node_scanner_ui,node_tara_ui toneAmber
class node_api_client,node_allocation_api,node_transfer_api,node_org_api,node_reports_api,node_chat_api,node_notify_service toneMint
class node_db_connector,node_domain_models,node_shared_schema toneRose
```

## Components

### Web experience

- [Dashboard shell](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/layout.tsx): `app/dashboard/layout.tsx`
- [Role navigation](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/Sidebar.tsx): `app/dashboard/Sidebar.tsx`

### Operational workflows

- [Allocation & transfer](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/allocation-transfer/page.tsx): `app/dashboard/allocation-transfer/page.tsx`
- [Resource booking](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/resource-booking/page.tsx): `app/dashboard/resource-booking/page.tsx`
- [Maintenance](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/maintenance/page.tsx): `app/dashboard/maintenance/page.tsx`
- [Asset audits](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/audit/page.tsx): `app/dashboard/audit/page.tsx`
- [Organization setup](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/organization-setup/page.tsx): `app/dashboard/organization-setup/page.tsx`
- [Reports & analytics](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/reports/page.tsx): `app/dashboard/reports/page.tsx`
- [QR scanning](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/dashboard/scanner/page.tsx): `app/dashboard/scanner/page.tsx`
- [Tara assistant](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/components/TaraChatbot.tsx): `app/components/TaraChatbot.tsx`

### API services

- [API client](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/lib/api.ts): `lib/api.ts`
- [Allocation API](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/api/allocations/route.ts): `app/api/allocations/route.ts`
- [Transfer API](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/api/transfers/route.ts): `app/api/transfers/route.ts`
- [Organization APIs](https://github.com/deepbartaria/assetflow-odoo-hackathon/tree/main/app/api): `app/api`
- [Dashboard & report APIs](https://github.com/deepbartaria/assetflow-odoo-hackathon/tree/main/app/api/reports): `app/api/reports`
- [Assistant API](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/app/api/chat/route.ts): `app/api/chat/route.ts`
- [Notifications](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/lib/notifications.ts): `lib/notifications.ts`

### Domain data

- [MongoDB connection](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/lib/mongodb.ts): `lib/mongodb.ts`
- [Asset & workflow records](https://github.com/deepbartaria/assetflow-odoo-hackathon/tree/main/models): `models`
- [Assistant data schema](https://github.com/deepbartaria/assetflow-odoo-hackathon/blob/main/lib/models/schema.ts): `lib/models/schema.ts`

### Other components

- **Organization users**

## Connections

- Organization users → Dashboard shell: uses (evidence: `README.md`)
- Dashboard shell → Role navigation: renders (evidence: `README.md`)
- Organization users → Allocation & transfer: manages assets (evidence: `README.md`)
- Organization users → Resource booking: books resources (evidence: `README.md`)
- Organization users → Maintenance: requests repairs (evidence: `README.md`)
- Organization users → Asset audits: verifies assets (evidence: `README.md`)
- Organization users → Organization setup: configures organization (evidence: `README.md`)
- Organization users → Reports & analytics: reviews insights (evidence: `README.md`)
- Organization users → QR scanning: scans assets (evidence: `README.md`)
- Organization users → Tara assistant: asks questions (evidence: `README.md`)
- Allocation & transfer → API client: requests data (evidence: `app/dashboard/allocation-transfer/page.tsx`)
- Resource booking → API client: requests data (evidence: `app/dashboard/resource-booking/page.tsx`)
- Maintenance → API client: requests data (evidence: `app/dashboard/maintenance/page.tsx`)
- Asset audits → API client: requests data (evidence: `app/dashboard/audit/page.tsx`)
- Organization setup → API client: requests data (evidence: `app/dashboard/organization-setup/page.tsx`)
- Reports & analytics → API client: requests data (evidence: `app/dashboard/reports/page.tsx`)
- API client → Allocation API: sends HTTP request
- API client → Transfer API: sends HTTP request
- Allocation API → MongoDB connection: connects (evidence: `app/api/allocations/route.ts`)
- Transfer API → MongoDB connection: connects (evidence: `app/api/transfers/route.ts`)
- Allocation API → Asset & workflow records: reads and updates (evidence: `app/api/allocations/route.ts`)
- Transfer API → Asset & workflow records: reads and creates (evidence: `app/api/transfers/route.ts`)
- Allocation API → Notifications: creates notifications (evidence: `app/api/allocations/route.ts`)
- Organization setup → Organization APIs: manages records (evidence: `README.md`)
- Reports & analytics → Dashboard & report APIs: retrieves reports (evidence: `README.md`)
- Tara assistant → Assistant API: sends chat (evidence: `README.md`)
- Assistant API → MongoDB connection: connects (evidence: `app/api/chat/route.ts`)
- Assistant API → Assistant data schema: queries domain data (evidence: `app/api/chat/route.ts`)
- Assistant API → Asset & workflow records: queries records (evidence: `app/api/chat/route.ts`)
- MongoDB connection → Asset & workflow records: persists records
