# akshithkheeran-design/artha architecture

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

- Interactive diagram: https://gitdiagram.com/akshithkheeran-design/artha
- Repository: https://github.com/akshithkheeran-design/artha

## Overview

ARTHA is a small-business credit-readiness and application platform. Owners provide business, transaction and document information, manage purpose-bound consent, review scheme eligibility and cash-flow-based risk, then approve a lender-ready application; lenders and public-program users see only authorized information. The graph also preserves audit, security, field-research and owner-facing analysis capabilities. Edges follow shown calls/import references or README descriptions; several page and platform-router internals were not sampled, so their connections are limited to documented capabilities.

Main entry points: [`backend/app/routers/business.py`](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/routers/business.py) (Business routes), [`frontend/src/App.tsx`](https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/App.tsx) (ARTHA workspace), [`backend/app/routers/applications.py`](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/routers/applications.py) (Application routes), [`backend/app/main.py`](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/main.py) (FastAPI entrypoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Owner and partner experience"]
  node_webapp["ARTHA workspace<br/>[App.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_auth_ui["Session state<br/>[auth.tsx]"]
  node_business_ui["Business context<br/>[business.tsx]"]
  node_credit_views["Credit readiness views<br/>[CommandCenter.tsx]"]
  node_application_view["Application workspace<br/>[Applications.tsx]"]
  node_consent_view["Consent controls<br/>[Consent.tsx]"]
  node_other_views["Additional product views"]
end

subgraph group_api["API and application flow"]
  node_api_entry["FastAPI entrypoint<br/>[main.py]"]
  node_business_routes["Business routes<br/>[business.py]"]
  node_application_routes["Application routes<br/>[applications.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_platform_routes["Platform routes<br/>[platform.py]"]
  node_workflows["Application workflows<br/>[workflows.py]"]
end

subgraph group_analysis["Credit readiness analysis"]
  node_orchestrator["Agent orchestration<br/>[orchestrator.py]"]
  node_intake["Business intake<br/>[intake.py]"]
  node_cashflow["Cash-flow analysis<br/>[cashflow.py]"]
  node_eligibility["Scheme eligibility<br/>[eligibility.py]"]
  node_risk["Risk assessment<br/>[risk.py]"]
  node_documents["Document checklist<br/>[documents.py]"]
  node_scheme_index["Scheme navigator<br/>[schemes.py]"]
  node_application_agent["Application assembly<br/>[applications.py]"]
  node_services["Analysis services<br/>[services.py]"]
end

subgraph group_trust["Consent and data protection"]
  node_consent["Consent enforcement<br/>[consent.py]"]
  node_security["Session security<br/>[security.py]"]
  node_crypto["Encryption and signing<br/>[crypto.py]"]
  node_vault["Encrypted owner vault<br/>[vault.py]"]
end

subgraph group_state["Persistence and oversight"]
  node_audit["Signed audit ledger<br/>[audit.py]"]
  node_models[("Application data model<br/>[models.py]")]
  node_db["Database session<br/>[db.py]"]
end

node_owner(("Business owner"))
node_lender(("Lender / program user"))

node_owner -->|"uses"| node_webapp
node_lender -->|"reviews files"| node_webapp
node_webapp -->|"requests data"| node_api_client
node_api_client -->|"calls API"| node_api_entry
node_api_entry -->|"registers"| node_business_routes
node_api_entry -->|"registers"| node_application_routes
node_api_entry -->|"registers"| node_auth_routes
node_api_entry -->|"registers"| node_platform_routes
node_auth_ui -->|"authenticates through"| node_api_client
node_business_ui -->|"loads business"| node_api_client
node_webapp -->|"renders"| node_credit_views
node_webapp -->|"renders"| node_application_view
node_webapp -->|"renders"| node_consent_view
node_webapp -->|"renders"| node_other_views
node_business_routes -->|"invokes"| node_orchestrator
node_business_routes -->|"invokes"| node_intake
node_business_routes -->|"invokes"| node_cashflow
node_business_routes -->|"uses"| node_services
node_application_routes -->|"creates and reads"| node_workflows
node_application_routes -->|"uses"| node_application_agent
node_application_routes -->|"uses"| node_scheme_index
node_orchestrator -->|"coordinates"| node_application_agent
node_orchestrator -->|"coordinates"| node_risk
node_orchestrator -->|"coordinates"| node_scheme_index
node_orchestrator -->|"checks"| node_consent
node_services -->|"analyzes transactions"| node_cashflow
node_services -->|"evaluates"| node_eligibility
node_services -->|"assesses features"| node_risk
node_services -->|"builds checklist"| node_documents
node_eligibility -->|"checks schemes"| node_scheme_index
node_workflows -->|"builds context"| node_services
node_workflows -->|"assembles snapshot"| node_application_agent
node_workflows -->|"uses scheme data"| node_scheme_index
node_owner -->|"approves submission"| node_application_routes
node_application_routes -->|"shares approved file"| node_lender
node_application_routes -->|"authorizes access"| node_consent
node_consent -->|"records events"| node_audit
node_consent -->|"signs artefacts"| node_crypto
node_audit -->|"hashes and signs"| node_crypto
node_audit -->|"stores entries"| node_models
node_crypto -->|"protects owner data"| node_vault
node_vault -->|"reads encrypted profile"| node_models
node_security -->|"loads user"| node_models
node_auth_routes -->|"uses session controls"| node_security
node_models -->|"uses ORM base"| node_db
node_business_routes -->|"checks permissions"| node_consent
node_business_routes -->|"reads owner data"| node_vault
node_api_entry -->|"initializes model"| node_risk

click node_webapp "https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/App.tsx"
click node_api_client "https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/lib/api.ts"
click node_auth_ui "https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/lib/auth.tsx"
click node_business_ui "https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/lib/business.tsx"
click node_credit_views "https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/pages/CommandCenter.tsx"
click node_application_view "https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/pages/Applications.tsx"
click node_consent_view "https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/pages/Consent.tsx"
click node_other_views "https://github.com/akshithkheeran-design/artha/tree/main/frontend/src/pages"
click node_api_entry "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/main.py"
click node_business_routes "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/routers/business.py"
click node_application_routes "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/routers/applications.py"
click node_auth_routes "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/routers/auth.py"
click node_platform_routes "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/routers/platform.py"
click node_orchestrator "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/orchestrator.py"
click node_intake "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/intake.py"
click node_cashflow "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/cashflow.py"
click node_eligibility "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/eligibility.py"
click node_risk "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/risk.py"
click node_documents "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/documents.py"
click node_scheme_index "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/schemes.py"
click node_application_agent "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/applications.py"
click node_services "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/services.py"
click node_workflows "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/workflows.py"
click node_consent "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/consent.py"
click node_security "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/security.py"
click node_crypto "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/crypto.py"
click node_vault "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/vault.py"
click node_audit "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/audit.py"
click node_models "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/models.py"
click node_db "https://github.com/akshithkheeran-design/artha/blob/main/backend/app/db.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_webapp,node_api_client,node_auth_ui,node_business_ui,node_credit_views,node_application_view,node_consent_view,node_other_views,node_lender toneBlue
class node_api_entry,node_business_routes,node_application_routes,node_auth_routes,node_platform_routes,node_workflows toneAmber
class node_orchestrator,node_intake,node_cashflow,node_eligibility,node_risk,node_documents,node_scheme_index,node_application_agent,node_services toneMint
class node_consent,node_security,node_crypto,node_vault toneRose
class node_audit,node_models,node_db,node_owner toneIndigo
```

## Components

### Owner and partner experience

- [ARTHA workspace](https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [API client](https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [Session state](https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/lib/auth.tsx): `frontend/src/lib/auth.tsx`
- [Business context](https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/lib/business.tsx): `frontend/src/lib/business.tsx`
- [Credit readiness views](https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/pages/CommandCenter.tsx): `frontend/src/pages/CommandCenter.tsx`
- [Application workspace](https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/pages/Applications.tsx): `frontend/src/pages/Applications.tsx`
- [Consent controls](https://github.com/akshithkheeran-design/artha/blob/main/frontend/src/pages/Consent.tsx): `frontend/src/pages/Consent.tsx`
- [Additional product views](https://github.com/akshithkheeran-design/artha/tree/main/frontend/src/pages): `frontend/src/pages`

### API and application flow

- [FastAPI entrypoint](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/main.py): `backend/app/main.py`
- [Business routes](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/routers/business.py): `backend/app/routers/business.py`
- [Application routes](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/routers/applications.py): `backend/app/routers/applications.py`
- [Authentication routes](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Platform routes](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/routers/platform.py): `backend/app/routers/platform.py`
- [Application workflows](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/workflows.py): `backend/app/workflows.py`

### Credit readiness analysis

- [Agent orchestration](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/orchestrator.py): `backend/app/agents/orchestrator.py`
- [Business intake](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/intake.py): `backend/app/agents/intake.py`
- [Cash-flow analysis](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/cashflow.py): `backend/app/agents/cashflow.py`
- [Scheme eligibility](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/eligibility.py): `backend/app/agents/eligibility.py`
- [Risk assessment](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/risk.py): `backend/app/agents/risk.py`
- [Document checklist](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/documents.py): `backend/app/agents/documents.py`
- [Scheme navigator](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/schemes.py): `backend/app/agents/schemes.py`
- [Application assembly](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/agents/applications.py): `backend/app/agents/applications.py`
- [Analysis services](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/services.py): `backend/app/services.py`

### Consent and data protection

- [Consent enforcement](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/consent.py): `backend/app/consent.py`
- [Session security](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/security.py): `backend/app/security.py`
- [Encryption and signing](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/crypto.py): `backend/app/crypto.py`
- [Encrypted owner vault](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/vault.py): `backend/app/vault.py`

### Persistence and oversight

- [Signed audit ledger](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/audit.py): `backend/app/audit.py`
- [Application data model](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/models.py): `backend/app/models.py`
- [Database session](https://github.com/akshithkheeran-design/artha/blob/main/backend/app/db.py): `backend/app/db.py`

### Other components

- **Business owner**
- **Lender / program user**

## Connections

- Business owner → ARTHA workspace: uses (evidence: `README.md`)
- Lender / program user → ARTHA workspace: reviews files (evidence: `README.md`)
- ARTHA workspace → API client: requests data (evidence: `frontend/src/App.tsx`)
- API client → FastAPI entrypoint: calls API (evidence: `frontend/src/lib/api.ts`)
- FastAPI entrypoint → Business routes: registers (evidence: `backend/app/main.py`)
- FastAPI entrypoint → Application routes: registers (evidence: `backend/app/main.py`)
- FastAPI entrypoint → Authentication routes: registers (evidence: `backend/app/main.py`)
- FastAPI entrypoint → Platform routes: registers (evidence: `backend/app/main.py`)
- Session state → API client: authenticates through (evidence: `frontend/src/lib/auth.tsx`)
- Business context → API client: loads business (evidence: `frontend/src/lib/business.tsx`)
- ARTHA workspace → Credit readiness views: renders (evidence: `frontend/src/App.tsx`)
- ARTHA workspace → Application workspace: renders (evidence: `frontend/src/App.tsx`)
- ARTHA workspace → Consent controls: renders (evidence: `frontend/src/App.tsx`)
- ARTHA workspace → Additional product views: renders (evidence: `frontend/src/App.tsx`)
- Business routes → Agent orchestration: invokes (evidence: `backend/app/routers/business.py`)
- Business routes → Business intake: invokes (evidence: `backend/app/routers/business.py`)
- Business routes → Cash-flow analysis: invokes (evidence: `backend/app/routers/business.py`)
- Business routes → Analysis services: uses (evidence: `backend/app/routers/business.py`)
- Application routes → Application workflows: creates and reads (evidence: `backend/app/routers/applications.py`)
- Application routes → Application assembly: uses (evidence: `backend/app/routers/applications.py`)
- Application routes → Scheme navigator: uses (evidence: `backend/app/routers/applications.py`)
- Agent orchestration → Application assembly: coordinates (evidence: `backend/app/agents/orchestrator.py`)
- Agent orchestration → Risk assessment: coordinates (evidence: `backend/app/agents/orchestrator.py`)
- Agent orchestration → Scheme navigator: coordinates (evidence: `backend/app/agents/orchestrator.py`)
- Agent orchestration → Consent enforcement: checks (evidence: `backend/app/agents/orchestrator.py`)
- Analysis services → Cash-flow analysis: analyzes transactions (evidence: `backend/app/services.py`)
- Analysis services → Scheme eligibility: evaluates (evidence: `backend/app/services.py`)
- Analysis services → Risk assessment: assesses features (evidence: `backend/app/services.py`)
- Analysis services → Document checklist: builds checklist (evidence: `backend/app/services.py`)
- Scheme eligibility → Scheme navigator: checks schemes (evidence: `backend/app/agents/eligibility.py`)
- Application workflows → Analysis services: builds context (evidence: `backend/app/workflows.py`)
- Application workflows → Application assembly: assembles snapshot (evidence: `backend/app/workflows.py`)
- Application workflows → Scheme navigator: uses scheme data (evidence: `backend/app/workflows.py`)
- Business owner → Application routes: approves submission (evidence: `README.md`)
- Application routes → Lender / program user: shares approved file (evidence: `README.md`)
- Application routes → Consent enforcement: authorizes access (evidence: `backend/app/routers/applications.py`)
- Consent enforcement → Signed audit ledger: records events (evidence: `backend/app/consent.py`)
- Consent enforcement → Encryption and signing: signs artefacts (evidence: `backend/app/consent.py`)
- Signed audit ledger → Encryption and signing: hashes and signs (evidence: `backend/app/audit.py`)
- Signed audit ledger → Application data model: stores entries (evidence: `backend/app/audit.py`)
- Encryption and signing → Encrypted owner vault: protects owner data (evidence: `backend/app/vault.py`)
- Encrypted owner vault → Application data model: reads encrypted profile (evidence: `backend/app/vault.py`)
- Session security → Application data model: loads user (evidence: `backend/app/security.py`)
- Authentication routes → Session security: uses session controls (evidence: `backend/app/routers/auth.py`)
- Application data model → Database session: uses ORM base (evidence: `backend/app/models.py`)
- Business routes → Consent enforcement: checks permissions (evidence: `backend/app/routers/business.py`)
- Business routes → Encrypted owner vault: reads owner data (evidence: `backend/app/routers/business.py`)
- FastAPI entrypoint → Risk assessment: initializes model (evidence: `backend/app/main.py`)
