# rithvin-us/wwe-os architecture

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

- Interactive diagram: https://gitdiagram.com/rithvin-us/wwe-os
- Repository: https://github.com/rithvin-us/wwe-os

## Overview

WWE OS is a multi-tenant industrial operations platform with a web/mobile portal, Django business modules, and a separate biometric AI service. The main workflow is staff using the portal to manage workforce, finance, purchasing and documents; invoice uploads can proceed through OCR review and commit, while other operational tasks feed reporting, alerts and AI-assisted retrieval. Shared platform services provide identity, permissions, storage, audit and durable workflow execution. README capabilities also include contracts, inventory, maintenance, approvals, backups and executive briefing. Connections are limited to documented or indexed evidence; uninspected subsystem links are omitted.

Main entry points: [`apps/web/src/app/(platform)/layout.tsx`](https://github.com/rithvin-us/wwe-os/blob/main/apps/web/src/app/(platform)/layout.tsx) (Web portal), [`modules/finance/backend/services/invoice_import.py`](https://github.com/rithvin-us/wwe-os/blob/main/modules/finance/backend/services/invoice_import.py) (Finance and invoices), [`apps/mobile/src/app/_layout.tsx`](https://github.com/rithvin-us/wwe-os/blob/main/apps/mobile/src/app/_layout.tsx) (Mobile app), [`modules/documents/backend/services/document.py`](https://github.com/rithvin-us/wwe-os/blob/main/modules/documents/backend/services/document.py) (Document vault)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User applications"]
  node_web["Web portal<br/>[layout.tsx]"]
  node_mobile["Mobile app<br/>[_layout.tsx]"]
end

subgraph group_business["Business operations"]
  node_finance["Finance and invoices<br/>[invoice_import.py]"]
  node_purchase["Purchase operations<br/>[apps.py]"]
  node_hr["HR and payroll<br/>[payroll_engine.py]"]
  node_documents["Document vault<br/>[document.py]"]
  node_contracts["Contracts<br/>[contract.py]"]
  node_inventory["Inventory"]
  node_maintenance["Maintenance"]
  node_approvals["Approvals<br/>[services.py]"]
end

subgraph group_platform["Shared platform"]
  node_storage[("Object storage<br/>[services.py]")]
  node_permissions[("Access permissions<br/>[models.py]")]
  node_context["Tenant context<br/>[context.py]"]
  node_workflow["Workflow engine<br/>[engine.py]"]
  node_workflow_registry["Pipeline registry<br/>[registry.py]"]
  node_audit["Audit trail<br/>[services.py]"]
end

subgraph group_intelligence["AI and insights"]
  node_rag["Document RAG<br/>[rag_service.py]"]
  node_assistant["Rithu AI<br/>[route.ts]"]
  node_reporting["Reports and analytics<br/>[services.py]"]
  node_automation["Automation rules<br/>[pipelines.py]"]
end

subgraph group_biometric["Biometric service"]
  node_face_ai["Face AI engine<br/>[engine.py]"]
  node_face_service["Face AI API<br/>[main.py]"]
end

node_staff(("Enterprise staff"))

node_staff -->|"uses"| node_web
node_staff -->|"uses"| node_mobile
node_web -.->|"manages invoices"| node_finance
node_web -.->|"manages purchasing"| node_purchase
node_web -.->|"manages workforce"| node_hr
node_web -.->|"manages files"| node_documents
node_web -.->|"manages contracts"| node_contracts
node_web -.->|"manages stock"| node_inventory
node_web -.->|"manages maintenance"| node_maintenance
node_web -.->|"reviews approvals"| node_approvals
node_mobile -.->|"manages invoices"| node_finance
node_mobile -.->|"manages workforce"| node_hr
node_mobile -.->|"manages files"| node_documents
node_finance -->|"registers OCR job"| node_workflow_registry
node_workflow_registry -->|"defines steps"| node_workflow
node_workflow -.->|"runs extraction"| node_finance
node_finance -->|"stores files"| node_storage
node_documents -->|"stores documents"| node_storage
node_rag -.->|"retrieves indexed context"| node_documents
node_assistant -.->|"gets document context"| node_rag
node_automation -->|"registers rule jobs"| node_workflow_registry
node_automation -->|"runs report"| node_reporting
node_workflow -->|"publishes events"| node_audit
node_hr -->|"reads tenant"| node_context
node_face_service -.->|"dispatches recognition"| node_face_ai
node_web -.->|"requests biometric checks"| node_face_service

click node_web "https://github.com/rithvin-us/wwe-os/blob/main/apps/web/src/app/(platform)/layout.tsx"
click node_mobile "https://github.com/rithvin-us/wwe-os/blob/main/apps/mobile/src/app/_layout.tsx"
click node_finance "https://github.com/rithvin-us/wwe-os/blob/main/modules/finance/backend/services/invoice_import.py"
click node_purchase "https://github.com/rithvin-us/wwe-os/blob/main/modules/purchase/backend/apps.py"
click node_hr "https://github.com/rithvin-us/wwe-os/blob/main/modules/hr/backend/services/payroll_engine.py"
click node_documents "https://github.com/rithvin-us/wwe-os/blob/main/modules/documents/backend/services/document.py"
click node_contracts "https://github.com/rithvin-us/wwe-os/blob/main/modules/contracts/backend/services/contract.py"
click node_inventory "https://github.com/rithvin-us/wwe-os/tree/main/modules/inventory/backend"
click node_maintenance "https://github.com/rithvin-us/wwe-os/tree/main/apps/web/src/app/(platform)/maintenance"
click node_approvals "https://github.com/rithvin-us/wwe-os/blob/main/platform/approvals/services.py"
click node_storage "https://github.com/rithvin-us/wwe-os/blob/main/platform/storage/services.py"
click node_permissions "https://github.com/rithvin-us/wwe-os/blob/main/platform/permissions/models.py"
click node_context "https://github.com/rithvin-us/wwe-os/blob/main/platform/shared/context.py"
click node_workflow "https://github.com/rithvin-us/wwe-os/blob/main/platform/workflow/engine.py"
click node_workflow_registry "https://github.com/rithvin-us/wwe-os/blob/main/platform/workflow/registry.py"
click node_audit "https://github.com/rithvin-us/wwe-os/blob/main/platform/audit/services.py"
click node_rag "https://github.com/rithvin-us/wwe-os/blob/main/platform/ai/rag_service.py"
click node_assistant "https://github.com/rithvin-us/wwe-os/blob/main/apps/web/src/app/api/ai/chatbot/route.ts"
click node_reporting "https://github.com/rithvin-us/wwe-os/blob/main/platform/reporting/services.py"
click node_automation "https://github.com/rithvin-us/wwe-os/blob/main/platform/automation/pipelines.py"
click node_face_ai "https://github.com/rithvin-us/wwe-os/blob/main/services/face-ai/app/engine.py"
click node_face_service "https://github.com/rithvin-us/wwe-os/blob/main/services/face-ai/app/main.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_web,node_mobile toneBlue
class node_finance,node_purchase,node_hr,node_documents,node_contracts,node_inventory,node_maintenance,node_approvals toneAmber
class node_storage,node_permissions,node_context,node_workflow,node_workflow_registry,node_audit toneMint
class node_rag,node_assistant,node_reporting,node_automation toneRose
class node_face_ai,node_face_service,node_staff toneIndigo
```

## Components

### User applications

- [Web portal](https://github.com/rithvin-us/wwe-os/blob/main/apps/web/src/app/(platform)/layout.tsx): `apps/web/src/app/(platform)/layout.tsx`
- [Mobile app](https://github.com/rithvin-us/wwe-os/blob/main/apps/mobile/src/app/_layout.tsx): `apps/mobile/src/app/_layout.tsx`

### Business operations

- [Finance and invoices](https://github.com/rithvin-us/wwe-os/blob/main/modules/finance/backend/services/invoice_import.py): `modules/finance/backend/services/invoice_import.py`
- [Purchase operations](https://github.com/rithvin-us/wwe-os/blob/main/modules/purchase/backend/apps.py): `modules/purchase/backend/apps.py`
- [HR and payroll](https://github.com/rithvin-us/wwe-os/blob/main/modules/hr/backend/services/payroll_engine.py): `modules/hr/backend/services/payroll_engine.py`
- [Document vault](https://github.com/rithvin-us/wwe-os/blob/main/modules/documents/backend/services/document.py): `modules/documents/backend/services/document.py`
- [Contracts](https://github.com/rithvin-us/wwe-os/blob/main/modules/contracts/backend/services/contract.py): `modules/contracts/backend/services/contract.py`
- [Inventory](https://github.com/rithvin-us/wwe-os/tree/main/modules/inventory/backend): `modules/inventory/backend`
- [Maintenance](https://github.com/rithvin-us/wwe-os/tree/main/apps/web/src/app/(platform)/maintenance): `apps/web/src/app/(platform)/maintenance`
- [Approvals](https://github.com/rithvin-us/wwe-os/blob/main/platform/approvals/services.py): `platform/approvals/services.py`

### Shared platform

- [Object storage](https://github.com/rithvin-us/wwe-os/blob/main/platform/storage/services.py): `platform/storage/services.py`
- [Access permissions](https://github.com/rithvin-us/wwe-os/blob/main/platform/permissions/models.py): `platform/permissions/models.py`
- [Tenant context](https://github.com/rithvin-us/wwe-os/blob/main/platform/shared/context.py): `platform/shared/context.py`
- [Workflow engine](https://github.com/rithvin-us/wwe-os/blob/main/platform/workflow/engine.py): `platform/workflow/engine.py`
- [Pipeline registry](https://github.com/rithvin-us/wwe-os/blob/main/platform/workflow/registry.py): `platform/workflow/registry.py`
- [Audit trail](https://github.com/rithvin-us/wwe-os/blob/main/platform/audit/services.py): `platform/audit/services.py`

### AI and insights

- [Document RAG](https://github.com/rithvin-us/wwe-os/blob/main/platform/ai/rag_service.py): `platform/ai/rag_service.py`
- [Rithu AI](https://github.com/rithvin-us/wwe-os/blob/main/apps/web/src/app/api/ai/chatbot/route.ts): `apps/web/src/app/api/ai/chatbot/route.ts`
- [Reports and analytics](https://github.com/rithvin-us/wwe-os/blob/main/platform/reporting/services.py): `platform/reporting/services.py`
- [Automation rules](https://github.com/rithvin-us/wwe-os/blob/main/platform/automation/pipelines.py): `platform/automation/pipelines.py`

### Biometric service

- [Face AI engine](https://github.com/rithvin-us/wwe-os/blob/main/services/face-ai/app/engine.py): `services/face-ai/app/engine.py`
- [Face AI API](https://github.com/rithvin-us/wwe-os/blob/main/services/face-ai/app/main.py): `services/face-ai/app/main.py`

### Other components

- **Enterprise staff**

## Connections

- Enterprise staff → Web portal: uses (evidence: `README.md`)
- Enterprise staff → Mobile app: uses (evidence: `README.md`)
- Web portal → Finance and invoices: manages invoices
- Web portal → Purchase operations: manages purchasing
- Web portal → HR and payroll: manages workforce
- Web portal → Document vault: manages files
- Web portal → Contracts: manages contracts
- Web portal → Inventory: manages stock
- Web portal → Maintenance: manages maintenance
- Web portal → Approvals: reviews approvals
- Mobile app → Finance and invoices: manages invoices
- Mobile app → HR and payroll: manages workforce
- Mobile app → Document vault: manages files
- Finance and invoices → Pipeline registry: registers OCR job (evidence: `modules/finance/backend/pipelines.py`)
- Pipeline registry → Workflow engine: defines steps (evidence: `platform/workflow/registry.py`)
- Workflow engine → Finance and invoices: runs extraction
- Finance and invoices → Object storage: stores files (evidence: `modules/finance/backend/services/invoice_import.py`)
- Document vault → Object storage: stores documents (evidence: `modules/documents/backend/collectible.py`)
- Document RAG → Document vault: retrieves indexed context
- Rithu AI → Document RAG: gets document context
- Automation rules → Pipeline registry: registers rule jobs (evidence: `platform/automation/pipelines.py`)
- Automation rules → Reports and analytics: runs report (evidence: `platform/automation/pipelines.py`)
- Workflow engine → Audit trail: publishes events (evidence: `platform/workflow/engine.py`)
- HR and payroll → Tenant context: reads tenant (evidence: `modules/hr/backend/services/payroll_engine.py`)
- Face AI API → Face AI engine: dispatches recognition
- Web portal → Face AI API: requests biometric checks
