# jinnaramuttej/delta architecture

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

- Interactive diagram: https://gitdiagram.com/jinnaramuttej/delta
- Repository: https://github.com/jinnaramuttej/delta

## Overview

Delta is a founder operations dashboard centered on Oni: a founder submits a natural-language request, the orchestrator classifies it, and a domain agent drafts or processes it; founder-facing dashboards expose operational data and approval workflows. Finance, hiring, legal, GTM, and calendar are distinct product areas. The README documents capabilities beyond the sampled code; unsampled implementation details and some wiring are represented only at the documented subsystem level.

Main entry points: [`lib/supabase.ts`](https://github.com/jinnaramuttej/delta/blob/main/lib/supabase.ts) (Supabase client), [`lib/ollama.ts`](https://github.com/jinnaramuttej/delta/blob/main/lib/ollama.ts) (LLM client), [`app/api/orchestrate/route.ts`](https://github.com/jinnaramuttej/delta/blob/main/app/api/orchestrate/route.ts) (Oni orchestrator), [`app/oni/page.tsx`](https://github.com/jinnaramuttej/delta/blob/main/app/oni/page.tsx) (Oni chat)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Founder experience"]
  node_oni["Oni chat<br/>[page.tsx]"]
  node_dashboard["Overview<br/>[page.tsx]"]
  node_finance_ui["Finance dashboard<br/>[page.tsx]"]
  node_hiring_ui["Hiring dashboard<br/>[page.tsx]"]
  node_legal_ui["Legal dashboard<br/>[page.tsx]"]
  node_gtm_ui["GTM dashboard<br/>[page.tsx]"]
  node_calendar_ui["Calendar<br/>[page.tsx]"]
  node_chat_overlay["Chat overlay<br/>[ChatOverlay.tsx]"]
end

subgraph group_routing["AI routing"]
  node_orchestrator["Oni orchestrator<br/>[route.ts]"]
end

subgraph group_operations["Operations agents"]
  node_finance_agent["Finance agent<br/>[route.ts]"]
  node_hiring_agent["Hiring agent<br/>[route.ts]"]
  node_legal_agent["Legal agent<br/>[route.ts]"]
  node_gtm_agent["GTM agent<br/>[route.ts]"]
  node_candidate_gen["Candidate generation<br/>[route.ts]"]
end

subgraph group_integrations["Automation integrations"]
  node_instagram_route["Instagram posting route<br/>[route.ts]"]
  node_social_scripts["Social automation"]
  node_social_unified["Unified social commands"]
  node_instagram_api["Instagram automation<br/>[instagram_api.py]"]
end

subgraph group_shared["Shared services"]
  node_ollama_client["LLM client<br/>[ollama.ts]"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_database[("Supabase data<br/>[schema.sql]")]
end

node_founder(("Founder"))
node_ollama_service["Ollama"]
node_openrouter["OpenRouter"]
node_social_platforms["Social platforms"]

node_founder -->|"submits request"| node_oni
node_oni -->|"sends request"| node_orchestrator
node_orchestrator -->|"classifies with"| node_ollama_client
node_orchestrator -->|"reads profile"| node_supabase_client
node_orchestrator -->|"routes request"| node_finance_agent
node_orchestrator -->|"routes request"| node_hiring_agent
node_orchestrator -->|"routes request"| node_legal_agent
node_orchestrator -->|"routes request"| node_gtm_agent
node_finance_agent -->|"reads and logs snapshots"| node_supabase_client
node_finance_agent -->|"extracts and drafts with"| node_ollama_client
node_hiring_agent -->|"drafts with"| node_ollama_client
node_legal_agent -.->|"generates documents"| node_ollama_client
node_gtm_agent -.->|"drafts content"| node_ollama_client
node_candidate_gen -->|"generates profiles"| node_ollama_client
node_oni -.->|"requests candidates"| node_candidate_gen
node_instagram_route -.->|"dispatches posting"| node_social_scripts
node_social_unified -->|"imports command"| node_social_scripts
node_instagram_api -->|"uses commands"| node_social_unified
node_social_scripts -.->|"publishes content"| node_social_platforms
node_ollama_client -->|"calls"| node_ollama_service
node_ollama_client -->|"falls back to"| node_openrouter
node_supabase_client -.->|"accesses"| node_database
node_dashboard -->|"loads and updates activity"| node_supabase_client
node_finance_ui -.->|"reads finance data"| node_supabase_client
node_hiring_ui -.->|"manages approvals"| node_supabase_client
node_legal_ui -.->|"loads legal activity"| node_supabase_client
node_gtm_ui -->|"manages campaign actions"| node_supabase_client
node_calendar_ui -->|"reads calendar data"| node_supabase_client
node_chat_overlay -.->|"accesses founder data"| node_supabase_client
node_oni -->|"persists chat context"| node_supabase_client
node_oni -.->|"can display chat"| node_chat_overlay

click node_oni "https://github.com/jinnaramuttej/delta/blob/main/app/oni/page.tsx"
click node_dashboard "https://github.com/jinnaramuttej/delta/blob/main/app/page.tsx"
click node_finance_ui "https://github.com/jinnaramuttej/delta/blob/main/app/finance/page.tsx"
click node_hiring_ui "https://github.com/jinnaramuttej/delta/blob/main/app/hiring/page.tsx"
click node_legal_ui "https://github.com/jinnaramuttej/delta/blob/main/app/legal/page.tsx"
click node_gtm_ui "https://github.com/jinnaramuttej/delta/blob/main/app/gtm/page.tsx"
click node_calendar_ui "https://github.com/jinnaramuttej/delta/blob/main/app/calendar/page.tsx"
click node_chat_overlay "https://github.com/jinnaramuttej/delta/blob/main/components/ChatOverlay.tsx"
click node_orchestrator "https://github.com/jinnaramuttej/delta/blob/main/app/api/orchestrate/route.ts"
click node_finance_agent "https://github.com/jinnaramuttej/delta/blob/main/app/api/agent/finance/route.ts"
click node_hiring_agent "https://github.com/jinnaramuttej/delta/blob/main/app/api/agent/hiring/route.ts"
click node_legal_agent "https://github.com/jinnaramuttej/delta/blob/main/app/api/agent/legal/route.ts"
click node_gtm_agent "https://github.com/jinnaramuttej/delta/blob/main/app/api/agent/gtm/route.ts"
click node_candidate_gen "https://github.com/jinnaramuttej/delta/blob/main/app/api/generate-candidates/route.ts"
click node_instagram_route "https://github.com/jinnaramuttej/delta/blob/main/app/api/agent/gtm/post-instagram/route.ts"
click node_social_scripts "https://github.com/jinnaramuttej/delta/blob/main/GTM/insta/commands/social_media_easy.py"
click node_social_unified "https://github.com/jinnaramuttej/delta/blob/main/GTM/insta/commands/social_media_unified.py"
click node_instagram_api "https://github.com/jinnaramuttej/delta/blob/main/GTM/insta/instagram_api.py"
click node_ollama_client "https://github.com/jinnaramuttej/delta/blob/main/lib/ollama.ts"
click node_supabase_client "https://github.com/jinnaramuttej/delta/blob/main/lib/supabase.ts"
click node_database "https://github.com/jinnaramuttej/delta/blob/main/supabase/schema.sql"

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_oni,node_dashboard,node_finance_ui,node_hiring_ui,node_legal_ui,node_gtm_ui,node_calendar_ui,node_chat_overlay toneBlue
class node_orchestrator toneAmber
class node_finance_agent,node_hiring_agent,node_legal_agent,node_gtm_agent,node_candidate_gen,node_openrouter toneMint
class node_instagram_route,node_social_scripts,node_social_unified,node_instagram_api toneRose
class node_ollama_client,node_supabase_client,node_database,node_founder,node_ollama_service,node_social_platforms toneIndigo
```

## Components

### Founder experience

- [Oni chat](https://github.com/jinnaramuttej/delta/blob/main/app/oni/page.tsx): `app/oni/page.tsx`
- [Overview](https://github.com/jinnaramuttej/delta/blob/main/app/page.tsx): `app/page.tsx`
- [Finance dashboard](https://github.com/jinnaramuttej/delta/blob/main/app/finance/page.tsx): `app/finance/page.tsx`
- [Hiring dashboard](https://github.com/jinnaramuttej/delta/blob/main/app/hiring/page.tsx): `app/hiring/page.tsx`
- [Legal dashboard](https://github.com/jinnaramuttej/delta/blob/main/app/legal/page.tsx): `app/legal/page.tsx`
- [GTM dashboard](https://github.com/jinnaramuttej/delta/blob/main/app/gtm/page.tsx): `app/gtm/page.tsx`
- [Calendar](https://github.com/jinnaramuttej/delta/blob/main/app/calendar/page.tsx): `app/calendar/page.tsx`
- [Chat overlay](https://github.com/jinnaramuttej/delta/blob/main/components/ChatOverlay.tsx): `components/ChatOverlay.tsx`

### AI routing

- [Oni orchestrator](https://github.com/jinnaramuttej/delta/blob/main/app/api/orchestrate/route.ts): `app/api/orchestrate/route.ts`

### Operations agents

- [Finance agent](https://github.com/jinnaramuttej/delta/blob/main/app/api/agent/finance/route.ts): `app/api/agent/finance/route.ts`
- [Hiring agent](https://github.com/jinnaramuttej/delta/blob/main/app/api/agent/hiring/route.ts): `app/api/agent/hiring/route.ts`
- [Legal agent](https://github.com/jinnaramuttej/delta/blob/main/app/api/agent/legal/route.ts): `app/api/agent/legal/route.ts`
- [GTM agent](https://github.com/jinnaramuttej/delta/blob/main/app/api/agent/gtm/route.ts): `app/api/agent/gtm/route.ts`
- [Candidate generation](https://github.com/jinnaramuttej/delta/blob/main/app/api/generate-candidates/route.ts): `app/api/generate-candidates/route.ts`

### Automation integrations

- [Instagram posting route](https://github.com/jinnaramuttej/delta/blob/main/app/api/agent/gtm/post-instagram/route.ts): `app/api/agent/gtm/post-instagram/route.ts`
- [Social automation](https://github.com/jinnaramuttej/delta/blob/main/GTM/insta/commands/social_media_easy.py): `GTM/insta/commands/social_media_easy.py`
- [Unified social commands](https://github.com/jinnaramuttej/delta/blob/main/GTM/insta/commands/social_media_unified.py): `GTM/insta/commands/social_media_unified.py`
- [Instagram automation](https://github.com/jinnaramuttej/delta/blob/main/GTM/insta/instagram_api.py): `GTM/insta/instagram_api.py`

### Shared services

- [LLM client](https://github.com/jinnaramuttej/delta/blob/main/lib/ollama.ts): `lib/ollama.ts`
- [Supabase client](https://github.com/jinnaramuttej/delta/blob/main/lib/supabase.ts): `lib/supabase.ts`
- [Supabase data](https://github.com/jinnaramuttej/delta/blob/main/supabase/schema.sql): `supabase/schema.sql`

### Other components

- **Founder**
- **Ollama**
- **OpenRouter**
- **Social platforms**

## Connections

- Founder → Oni chat: submits request (evidence: `README.md`)
- Oni chat → Oni orchestrator: sends request (evidence: `README.md`)
- Oni orchestrator → LLM client: classifies with (evidence: `app/api/orchestrate/route.ts`)
- Oni orchestrator → Supabase client: reads profile (evidence: `app/api/orchestrate/route.ts`)
- Oni orchestrator → Finance agent: routes request (evidence: `README.md`)
- Oni orchestrator → Hiring agent: routes request (evidence: `README.md`)
- Oni orchestrator → Legal agent: routes request (evidence: `README.md`)
- Oni orchestrator → GTM agent: routes request (evidence: `README.md`)
- Finance agent → Supabase client: reads and logs snapshots (evidence: `app/api/agent/finance/route.ts`)
- Finance agent → LLM client: extracts and drafts with (evidence: `app/api/agent/finance/route.ts`)
- Hiring agent → LLM client: drafts with (evidence: `app/api/agent/hiring/route.ts`)
- Legal agent → LLM client: generates documents (evidence: `README.md`)
- GTM agent → LLM client: drafts content (evidence: `README.md`)
- Candidate generation → LLM client: generates profiles (evidence: `app/api/generate-candidates/route.ts`)
- Oni chat → Candidate generation: requests candidates
- Instagram posting route → Social automation: dispatches posting (evidence: `README.md`)
- Unified social commands → Social automation: imports command (evidence: `GTM/insta/commands/social_media_unified.py`)
- Instagram automation → Unified social commands: uses commands (evidence: `GTM/insta/instagram_api.py`)
- Social automation → Social platforms: publishes content (evidence: `README.md`)
- LLM client → Ollama: calls (evidence: `lib/ollama.ts`)
- LLM client → OpenRouter: falls back to (evidence: `lib/ollama.ts`)
- Supabase client → Supabase data: accesses
- Overview → Supabase client: loads and updates activity (evidence: `app/page.tsx`)
- Finance dashboard → Supabase client: reads finance data (evidence: `app/finance/page.tsx`)
- Hiring dashboard → Supabase client: manages approvals (evidence: `app/hiring/page.tsx`)
- Legal dashboard → Supabase client: loads legal activity (evidence: `app/legal/page.tsx`)
- GTM dashboard → Supabase client: manages campaign actions (evidence: `app/gtm/page.tsx`)
- Calendar → Supabase client: reads calendar data (evidence: `app/calendar/page.tsx`)
- Chat overlay → Supabase client: accesses founder data (evidence: `components/ChatOverlay.tsx`)
- Oni chat → Supabase client: persists chat context (evidence: `app/oni/page.tsx`)
- Oni chat → Chat overlay: can display chat
