# neerejsuresan-njuretech/scribble-it-test architecture

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

- Interactive diagram: https://gitdiagram.com/neerejsuresan-njuretech/scribble-it-test
- Repository: https://github.com/neerejsuresan-njuretech/scribble-it-test

## Overview

SCRIBBLE-IT is a self-hostable enterprise ITSM platform with web, Windows desktop, and Android client code. The principal workflow runs from a user-facing portal through the web application and API to ITSM services and persistent organizational records. The README documents major security, governance, AI, integration, and worker capabilities, which are included as distinct branches. Several backend routers and services were not sampled; their documented relationships are cited to the README rather than inferred from directory names.

Main entry points: [`backend/app/main.py`](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/main.py) (FastAPI entry), [`backend/app/db/session.py`](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/db/session.py) (PostgreSQL), [`src/context/ITSMContext.tsx`](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/context/ITSMContext.tsx) (ITSM workspace), [`backend/app/modules/incidents/service.py`](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/incidents/service.py) (ITSM services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Client applications"]
  node_mobile["Android client<br/>[mobileApiClient.ts]"]
  node_desktop["Windows desktop<br/>[lib.rs]"]
end

subgraph group_experience["Web experience"]
  node_web["Web application<br/>[main.tsx]"]
  node_workspace["ITSM workspace<br/>[ITSMContext.tsx]"]
  node_itil["ITSM queues<br/>[IncidentModule.tsx]"]
  node_assets["Assets and CMDB"]
  node_iamportal["IAM portal<br/>[IamPortalPage.tsx]"]
  node_selfservice["Self-service portal<br/>[CustomerPortal.tsx]"]
  node_workflowui["Workflow tools"]
end

subgraph group_backend["Backend services"]
  node_api["FastAPI entry<br/>[main.py]"]
  node_auth["Authentication<br/>[service.py]"]
  node_iam["Identity and access<br/>[service.py]"]
  node_itsm["ITSM services<br/>[service.py]"]
  node_approvals["Approvals and audit<br/>[service.py]"]
  node_ai["Advisory AI<br/>[service.py]"]
  node_operations["Operations and reporting<br/>[service.py]"]
  node_integrations["External integrations<br/>[service.py]"]
  node_workers["Retry workers<br/>[runner.py]"]
end

subgraph group_state["Data and integrations"]
  node_postgres[("PostgreSQL<br/>[session.py]")]
  node_firebase[("Firebase cloud sync<br/>[firestoreSync.ts]")]
  node_redis[("Redis<br/>[redis.py]")]
end

node_user(("Portal user"))
node_external["Google and Twilio"]

node_user -->|"uses"| node_web
node_web -->|"renders"| node_workspace
node_workspace -->|"supplies state"| node_itil
node_workspace -.->|"supplies state"| node_assets
node_workspace -.->|"supplies state"| node_selfservice
node_user -->|"uses"| node_mobile
node_user -->|"uses"| node_desktop
node_web -->|"calls API"| node_api
node_mobile -.->|"calls API"| node_api
node_desktop -.->|"calls API"| node_api
node_api -->|"routes to"| node_auth
node_api -->|"routes to"| node_iam
node_api -->|"routes to"| node_itsm
node_api -->|"routes to"| node_approvals
node_api -->|"routes to"| node_ai
node_api -->|"routes to"| node_operations
node_api -->|"routes to"| node_integrations
node_auth -->|"reads and writes"| node_postgres
node_iam -.->|"reads and writes"| node_postgres
node_itsm -.->|"reads and writes"| node_postgres
node_approvals -.->|"records audit"| node_postgres
node_operations -->|"reads and writes"| node_postgres
node_ai -->|"uses quotas"| node_redis
node_itsm -->|"requests advice"| node_ai
node_itsm -->|"uses connectors"| node_integrations
node_itsm -->|"enqueues work"| node_workers
node_workers -->|"uses queue"| node_redis
node_workers -->|"persists work"| node_postgres
node_workers -->|"dispatches"| node_external
node_integrations -->|"connects"| node_external
node_workspace -->|"syncs snapshot"| node_firebase
node_api -->|"initializes"| node_redis
node_api -->|"initializes"| node_postgres
node_iamportal -.->|"uses backend"| node_api
node_workflowui -.->|"uses backend"| node_api

click node_web "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/main.tsx"
click node_workspace "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/context/ITSMContext.tsx"
click node_itil "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/components/incidents/IncidentModule.tsx"
click node_assets "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/components/inventory/InventoryModule.tsx"
click node_iamportal "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/pages/iam/IamPortalPage.tsx"
click node_selfservice "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/components/portal/CustomerPortal.tsx"
click node_workflowui "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/pages/workflows/WorkflowManagementPage.tsx"
click node_mobile "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/mobile/android/src/services/mobileApiClient.ts"
click node_desktop "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src-tauri/src/lib.rs"
click node_api "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/main.py"
click node_auth "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/auth/service.py"
click node_iam "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/iam/service.py"
click node_itsm "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/incidents/service.py"
click node_approvals "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/approvals/service.py"
click node_ai "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/ai/service.py"
click node_operations "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/operations/service.py"
click node_integrations "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/integrations/service.py"
click node_workers "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/workers/runner.py"
click node_postgres "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/db/session.py"
click node_firebase "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/services/firestoreSync.ts"
click node_redis "https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/core/redis.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_mobile,node_desktop,node_user toneBlue
class node_web,node_workspace,node_itil,node_assets,node_iamportal,node_selfservice,node_workflowui toneAmber
class node_api,node_auth,node_iam,node_itsm,node_approvals,node_ai,node_operations,node_integrations,node_workers toneMint
class node_postgres,node_firebase,node_redis toneRose
class node_external toneIndigo
```

## Components

### Client applications

- [Android client](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/mobile/android/src/services/mobileApiClient.ts): `mobile/android/src/services/mobileApiClient.ts`
- [Windows desktop](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### Web experience

- [Web application](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/main.tsx): `src/main.tsx`
- [ITSM workspace](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/context/ITSMContext.tsx): `src/context/ITSMContext.tsx`
- [ITSM queues](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/components/incidents/IncidentModule.tsx): `src/components/incidents/IncidentModule.tsx`
- [Assets and CMDB](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/components/inventory/InventoryModule.tsx): `src/components/inventory/InventoryModule.tsx`
- [IAM portal](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/pages/iam/IamPortalPage.tsx): `src/pages/iam/IamPortalPage.tsx`
- [Self-service portal](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/components/portal/CustomerPortal.tsx): `src/components/portal/CustomerPortal.tsx`
- [Workflow tools](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/pages/workflows/WorkflowManagementPage.tsx): `src/pages/workflows/WorkflowManagementPage.tsx`

### Backend services

- [FastAPI entry](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/auth/service.py): `backend/app/modules/auth/service.py`
- [Identity and access](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/iam/service.py): `backend/app/modules/iam/service.py`
- [ITSM services](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/incidents/service.py): `backend/app/modules/incidents/service.py`
- [Approvals and audit](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/approvals/service.py): `backend/app/modules/approvals/service.py`
- [Advisory AI](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/ai/service.py): `backend/app/modules/ai/service.py`
- [Operations and reporting](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/operations/service.py): `backend/app/modules/operations/service.py`
- [External integrations](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/modules/integrations/service.py): `backend/app/modules/integrations/service.py`
- [Retry workers](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/workers/runner.py): `backend/app/workers/runner.py`

### Data and integrations

- [PostgreSQL](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/db/session.py): `backend/app/db/session.py`
- [Firebase cloud sync](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/src/services/firestoreSync.ts): `src/services/firestoreSync.ts`
- [Redis](https://github.com/neerejsuresan-njuretech/scribble-it-test/blob/main/backend/app/core/redis.py): `backend/app/core/redis.py`

### Other components

- **Portal user**
- **Google and Twilio**

## Connections

- Portal user → Web application: uses (evidence: `README.md`)
- Web application → ITSM workspace: renders
- ITSM workspace → ITSM queues: supplies state (evidence: `src/App.tsx`)
- ITSM workspace → Assets and CMDB: supplies state
- ITSM workspace → Self-service portal: supplies state
- Portal user → Android client: uses (evidence: `README.md`)
- Portal user → Windows desktop: uses (evidence: `README.md`)
- Web application → FastAPI entry: calls API
- Android client → FastAPI entry: calls API
- Windows desktop → FastAPI entry: calls API
- FastAPI entry → Authentication: routes to (evidence: `README.md`)
- FastAPI entry → Identity and access: routes to (evidence: `README.md`)
- FastAPI entry → ITSM services: routes to (evidence: `README.md`)
- FastAPI entry → Approvals and audit: routes to (evidence: `README.md`)
- FastAPI entry → Advisory AI: routes to (evidence: `README.md`)
- FastAPI entry → Operations and reporting: routes to (evidence: `README.md`)
- FastAPI entry → External integrations: routes to (evidence: `README.md`)
- Authentication → PostgreSQL: reads and writes (evidence: `backend/app/modules/auth/service.py`)
- Identity and access → PostgreSQL: reads and writes
- ITSM services → PostgreSQL: reads and writes
- Approvals and audit → PostgreSQL: records audit
- Operations and reporting → PostgreSQL: reads and writes (evidence: `backend/app/modules/operations/service.py`)
- Advisory AI → Redis: uses quotas (evidence: `backend/app/modules/ai/service.py`)
- ITSM services → Advisory AI: requests advice (evidence: `README.md`)
- ITSM services → External integrations: uses connectors (evidence: `README.md`)
- ITSM services → Retry workers: enqueues work (evidence: `README.md`)
- Retry workers → Redis: uses queue (evidence: `README.md`)
- Retry workers → PostgreSQL: persists work (evidence: `README.md`)
- Retry workers → Google and Twilio: dispatches (evidence: `README.md`)
- External integrations → Google and Twilio: connects (evidence: `README.md`)
- ITSM workspace → Firebase cloud sync: syncs snapshot (evidence: `src/context/ITSMContext.tsx`)
- FastAPI entry → Redis: initializes (evidence: `backend/app/main.py`)
- FastAPI entry → PostgreSQL: initializes (evidence: `backend/app/main.py`)
- IAM portal → FastAPI entry: uses backend
- Workflow tools → FastAPI entry: uses backend
