# vivekmaury/ighouse architecture

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

- Interactive diagram: https://gitdiagram.com/vivekmaury/ighouse
- Repository: https://github.com/vivekmaury/ighouse

## Overview

IgHouse is an Instagram automation platform: users build and manage workflow canvases, while Instagram events trigger matching workflows that send replies or direct messages. The graph also shows webhook verification and retry processing, workflow persistence and execution logging, and the dashboard/inbox surface. Source evidence is sampled and incomplete; documented capabilities are retained, but uncertain wiring—particularly the separate Supabase Edge Functions—is not inferred.

Main entry points: [`src/app/dashboard/flows/new/page.tsx`](https://github.com/vivekmaury/ighouse/blob/main/src/app/dashboard/flows/new/page.tsx) (Flow editor), [`src/lib/workflow-engine.ts`](https://github.com/vivekmaury/ighouse/blob/main/src/lib/workflow-engine.ts) (Workflow engine), [`src/app/api/webhooks/instagram/route.ts`](https://github.com/vivekmaury/ighouse/blob/main/src/app/api/webhooks/instagram/route.ts) (Webhook endpoint), [`src/lib/queue/webhook-processor.ts`](https://github.com/vivekmaury/ighouse/blob/main/src/lib/queue/webhook-processor.ts) (Queue processor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Workflow authoring"]
  node_editor["Flow editor<br/>[page.tsx]"]
  node_flow_actions["Flow actions<br/>[flow-actions.ts]"]
  node_flow_sidebar["Node palette<br/>[FlowSidebar.tsx]"]
  node_custom_nodes["Custom nodes<br/>[CustomNodes.tsx]"]
  node_trigger_node["Trigger node<br/>[TriggerNode.tsx]"]
  node_message_node["Message node<br/>[MessageNode.tsx]"]
  node_condition_node["Condition node<br/>[ConditionNode.tsx]"]
  node_delay_node["Delay node<br/>[DelayNode.tsx]"]
  node_flow_list["Flow management<br/>[page.tsx]"]
  node_flow_detail["Flow detail<br/>[page.tsx]"]
end

subgraph group_runtime["Instagram automation"]
  node_webhook["Webhook endpoint<br/>[route.ts]"]
  node_engine["Workflow engine<br/>[workflow-engine.ts]"]
  node_processor["Queue processor"]
  node_cron["Retry trigger<br/>[route.ts]"]
  node_graph_api["Instagram messaging<br/>[graph-api.ts]"]
end

subgraph group_platform["Accounts and state"]
  node_redis_queue["Webhook queue<br/>[upstash.ts]"]
  node_admin_client["Admin client<br/>[admin.ts]"]
  node_supabase[("Supabase data")]
  node_auth_client["Server auth client<br/>[server.ts]"]
end

subgraph group_experience["User experience"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_inbox["Inbox<br/>[page.tsx]"]
  node_auth_pages["Sign-in pages<br/>[page.tsx]"]
  node_signup["Signup<br/>[page.tsx]"]
end

node_user(("Workspace user"))
node_meta(("Instagram platform"))

node_user -->|"builds flows"| node_editor
node_editor -->|"uses palette"| node_flow_sidebar
node_editor -->|"renders nodes"| node_custom_nodes
node_editor -->|"uses node"| node_trigger_node
node_editor -->|"uses node"| node_message_node
node_editor -->|"uses node"| node_condition_node
node_editor -->|"uses node"| node_delay_node
node_editor -->|"saves flows"| node_flow_actions
node_flow_list -->|"loads flows"| node_flow_actions
node_flow_detail -->|"renders palette"| node_flow_sidebar
node_flow_detail -->|"renders nodes"| node_custom_nodes
node_flow_actions -->|"creates client"| node_auth_client
node_auth_client -->|"accesses data"| node_supabase
node_meta -->|"sends events"| node_webhook
node_webhook -->|"evaluates event"| node_engine
node_webhook -->|"queues failures"| node_redis_queue
node_webhook -->|"logs event"| node_admin_client
node_cron -->|"starts batch"| node_processor
node_processor -->|"dequeues retries"| node_redis_queue
node_processor -->|"processes payload"| node_engine
node_engine -->|"creates client"| node_admin_client
node_engine -->|"rate limits"| node_redis_queue
node_engine -->|"sends responses"| node_graph_api
node_engine -->|"reads workflows"| node_supabase
node_engine -->|"writes execution logs"| node_supabase
node_user -->|"signs in"| node_auth_pages
node_user -->|"creates account"| node_signup
node_user -.->|"views workspace"| node_dashboard
node_user -.->|"views messages"| node_inbox

click node_editor "https://github.com/vivekmaury/ighouse/blob/main/src/app/dashboard/flows/new/page.tsx"
click node_flow_actions "https://github.com/vivekmaury/ighouse/blob/main/src/app/actions/flow-actions.ts"
click node_flow_sidebar "https://github.com/vivekmaury/ighouse/blob/main/src/components/flows/FlowSidebar.tsx"
click node_custom_nodes "https://github.com/vivekmaury/ighouse/blob/main/src/components/flows/CustomNodes.tsx"
click node_trigger_node "https://github.com/vivekmaury/ighouse/blob/main/src/components/canvas/nodes/TriggerNode.tsx"
click node_message_node "https://github.com/vivekmaury/ighouse/blob/main/src/components/canvas/nodes/MessageNode.tsx"
click node_condition_node "https://github.com/vivekmaury/ighouse/blob/main/src/components/canvas/nodes/ConditionNode.tsx"
click node_delay_node "https://github.com/vivekmaury/ighouse/blob/main/src/components/canvas/nodes/DelayNode.tsx"
click node_flow_list "https://github.com/vivekmaury/ighouse/blob/main/src/app/dashboard/flows/page.tsx"
click node_flow_detail "https://github.com/vivekmaury/ighouse/blob/main/src/app/dashboard/flows/%5Bid%5D/page.tsx"
click node_webhook "https://github.com/vivekmaury/ighouse/blob/main/src/app/api/webhooks/instagram/route.ts"
click node_engine "https://github.com/vivekmaury/ighouse/blob/main/src/lib/workflow-engine.ts"
click node_processor "https://github.com/vivekmaury/ighouse/blob/main/src/lib/queue/webhook-processor.ts"
click node_cron "https://github.com/vivekmaury/ighouse/blob/main/src/app/api/cron/process-webhooks/route.ts"
click node_graph_api "https://github.com/vivekmaury/ighouse/blob/main/src/lib/meta/graph-api.ts"
click node_redis_queue "https://github.com/vivekmaury/ighouse/blob/main/src/lib/queue/upstash.ts"
click node_admin_client "https://github.com/vivekmaury/ighouse/blob/main/src/lib/supabase/admin.ts"
click node_supabase "https://github.com/vivekmaury/ighouse/blob/main/supabase/migrations/20261004000000_init_schema.sql"
click node_auth_client "https://github.com/vivekmaury/ighouse/blob/main/src/utils/supabase/server.ts"
click node_dashboard "https://github.com/vivekmaury/ighouse/blob/main/src/app/dashboard/page.tsx"
click node_inbox "https://github.com/vivekmaury/ighouse/blob/main/src/app/dashboard/inbox/page.tsx"
click node_auth_pages "https://github.com/vivekmaury/ighouse/blob/main/src/app/login/page.tsx"
click node_signup "https://github.com/vivekmaury/ighouse/blob/main/src/app/signup/page.tsx"

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_editor,node_flow_actions,node_flow_sidebar,node_custom_nodes,node_trigger_node,node_message_node,node_condition_node,node_delay_node,node_flow_list,node_flow_detail,node_user toneBlue
class node_webhook,node_engine,node_processor,node_cron,node_graph_api toneAmber
class node_redis_queue,node_admin_client,node_supabase,node_auth_client toneMint
class node_dashboard,node_inbox,node_auth_pages,node_signup toneRose
class node_meta toneIndigo
```

## Components

### Workflow authoring

- [Flow editor](https://github.com/vivekmaury/ighouse/blob/main/src/app/dashboard/flows/new/page.tsx): `src/app/dashboard/flows/new/page.tsx`
- [Flow actions](https://github.com/vivekmaury/ighouse/blob/main/src/app/actions/flow-actions.ts): `src/app/actions/flow-actions.ts`
- [Node palette](https://github.com/vivekmaury/ighouse/blob/main/src/components/flows/FlowSidebar.tsx): `src/components/flows/FlowSidebar.tsx`
- [Custom nodes](https://github.com/vivekmaury/ighouse/blob/main/src/components/flows/CustomNodes.tsx): `src/components/flows/CustomNodes.tsx`
- [Trigger node](https://github.com/vivekmaury/ighouse/blob/main/src/components/canvas/nodes/TriggerNode.tsx): `src/components/canvas/nodes/TriggerNode.tsx`
- [Message node](https://github.com/vivekmaury/ighouse/blob/main/src/components/canvas/nodes/MessageNode.tsx): `src/components/canvas/nodes/MessageNode.tsx`
- [Condition node](https://github.com/vivekmaury/ighouse/blob/main/src/components/canvas/nodes/ConditionNode.tsx): `src/components/canvas/nodes/ConditionNode.tsx`
- [Delay node](https://github.com/vivekmaury/ighouse/blob/main/src/components/canvas/nodes/DelayNode.tsx): `src/components/canvas/nodes/DelayNode.tsx`
- [Flow management](https://github.com/vivekmaury/ighouse/blob/main/src/app/dashboard/flows/page.tsx): `src/app/dashboard/flows/page.tsx`
- [Flow detail](https://github.com/vivekmaury/ighouse/blob/main/src/app/dashboard/flows/%5Bid%5D/page.tsx): `src/app/dashboard/flows/[id]/page.tsx`

### Instagram automation

- [Webhook endpoint](https://github.com/vivekmaury/ighouse/blob/main/src/app/api/webhooks/instagram/route.ts): `src/app/api/webhooks/instagram/route.ts`
- [Workflow engine](https://github.com/vivekmaury/ighouse/blob/main/src/lib/workflow-engine.ts): `src/lib/workflow-engine.ts`
- [Queue processor](https://github.com/vivekmaury/ighouse/blob/main/src/lib/queue/webhook-processor.ts): `src/lib/queue/webhook-processor.ts`
- [Retry trigger](https://github.com/vivekmaury/ighouse/blob/main/src/app/api/cron/process-webhooks/route.ts): `src/app/api/cron/process-webhooks/route.ts`
- [Instagram messaging](https://github.com/vivekmaury/ighouse/blob/main/src/lib/meta/graph-api.ts): `src/lib/meta/graph-api.ts`

### Accounts and state

- [Webhook queue](https://github.com/vivekmaury/ighouse/blob/main/src/lib/queue/upstash.ts): `src/lib/queue/upstash.ts`
- [Admin client](https://github.com/vivekmaury/ighouse/blob/main/src/lib/supabase/admin.ts): `src/lib/supabase/admin.ts`
- [Supabase data](https://github.com/vivekmaury/ighouse/blob/main/supabase/migrations/20261004000000_init_schema.sql): `supabase/migrations/20261004000000_init_schema.sql`
- [Server auth client](https://github.com/vivekmaury/ighouse/blob/main/src/utils/supabase/server.ts): `src/utils/supabase/server.ts`

### User experience

- [Dashboard](https://github.com/vivekmaury/ighouse/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Inbox](https://github.com/vivekmaury/ighouse/blob/main/src/app/dashboard/inbox/page.tsx): `src/app/dashboard/inbox/page.tsx`
- [Sign-in pages](https://github.com/vivekmaury/ighouse/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [Signup](https://github.com/vivekmaury/ighouse/blob/main/src/app/signup/page.tsx): `src/app/signup/page.tsx`

### Other components

- **Workspace user**
- **Instagram platform**

## Connections

- Workspace user → Flow editor: builds flows (evidence: `src/app/dashboard/flows/new/page.tsx`)
- Flow editor → Node palette: uses palette (evidence: `src/app/dashboard/flows/new/page.tsx`)
- Flow editor → Custom nodes: renders nodes (evidence: `src/app/dashboard/flows/new/page.tsx`)
- Flow editor → Trigger node: uses node
- Flow editor → Message node: uses node
- Flow editor → Condition node: uses node
- Flow editor → Delay node: uses node
- Flow editor → Flow actions: saves flows (evidence: `src/app/dashboard/flows/new/page.tsx`)
- Flow management → Flow actions: loads flows (evidence: `src/app/dashboard/flows/page.tsx`)
- Flow detail → Node palette: renders palette (evidence: `src/app/dashboard/flows/[id]/page.tsx`)
- Flow detail → Custom nodes: renders nodes (evidence: `src/app/dashboard/flows/[id]/page.tsx`)
- Flow actions → Server auth client: creates client (evidence: `src/app/actions/flow-actions.ts`)
- Server auth client → Supabase data: accesses data (evidence: `src/utils/supabase/server.ts`)
- Instagram platform → Webhook endpoint: sends events (evidence: `README.md`)
- Webhook endpoint → Workflow engine: evaluates event (evidence: `src/app/api/webhooks/instagram/route.ts`)
- Webhook endpoint → Webhook queue: queues failures (evidence: `src/app/api/webhooks/instagram/route.ts`)
- Webhook endpoint → Admin client: logs event (evidence: `src/app/api/webhooks/instagram/route.ts`)
- Retry trigger → Queue processor: starts batch (evidence: `src/app/api/cron/process-webhooks/route.ts`)
- Queue processor → Webhook queue: dequeues retries (evidence: `src/lib/queue/webhook-processor.ts`)
- Queue processor → Workflow engine: processes payload (evidence: `src/lib/queue/webhook-processor.ts`)
- Workflow engine → Admin client: creates client (evidence: `src/lib/workflow-engine.ts`)
- Workflow engine → Webhook queue: rate limits (evidence: `src/lib/workflow-engine.ts`)
- Workflow engine → Instagram messaging: sends responses (evidence: `src/lib/workflow-engine.ts`)
- Workflow engine → Supabase data: reads workflows (evidence: `src/lib/workflow-engine.ts`)
- Workflow engine → Supabase data: writes execution logs (evidence: `src/lib/workflow-engine.ts`)
- Workspace user → Sign-in pages: signs in
- Workspace user → Signup: creates account (evidence: `src/app/signup/page.tsx`)
- Workspace user → Dashboard: views workspace
- Workspace user → Inbox: views messages
