# areysid/flowforge architecture

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

- Interactive diagram: https://gitdiagram.com/areysid/flowforge
- Repository: https://github.com/areysid/flowforge

## Overview

Flowforge is a workflow-automation application: authenticated users create and edit node-and-edge workflows, persist them, and start executions manually or from external trigger webhooks. The sampled workflow router confirms persistence and execution dispatch; the Inngest route registers execution handling, while the tree identifies trigger/action executors and execution-history views. Their internal wiring is not sampled, so those connections are omitted. The README is generic Next.js boilerplate and documents no additional product capabilities.

Main entry points: [`src/features/workflows/server/routers.ts`](https://github.com/areysid/flowforge/blob/main/src/features/workflows/server/routers.ts) (Workflow operations), [`src/features/executions/server/routers.ts`](https://github.com/areysid/flowforge/blob/main/src/features/executions/server/routers.ts) (Execution queries), [`src/features/executions/lib/executor-registry.ts`](https://github.com/areysid/flowforge/blob/main/src/features/executions/lib/executor-registry.ts) (Executor registry), [`src/trpc/routers/_app.ts`](https://github.com/areysid/flowforge/blob/main/src/trpc/routers/_app.ts) (API router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_editor_page["Workflow editor page<br/>[page.tsx]"]
  node_editor["Canvas editor<br/>[editor.tsx]"]
  node_workflow_list["Workflow list<br/>[workflows.tsx]"]
  node_execution_list["Execution history<br/>[executions.tsx]"]
  node_execution_detail["Execution detail<br/>[execution.tsx]"]
end

subgraph group_workflow["Workflow management"]
  node_workflow_api["Workflow operations<br/>[routers.ts]"]
  node_workflow_store[("Workflow records<br/>[db.ts]")]
  node_editor_state["Canvas state<br/>[atoms.ts]"]
  node_execution_api["Execution queries<br/>[routers.ts]"]
  node_execution_store[("Execution records<br/>[db.ts]")]
end

subgraph group_runtime["Execution runtime"]
  node_inngest_endpoint["Inngest endpoint<br/>[route.ts]"]
  node_workflow_functions["Workflow functions<br/>[functions.ts]"]
  node_dispatch["Execution dispatch<br/>[utils.ts]"]
  node_executor_registry["Executor registry"]
end

subgraph group_integrations["Triggers and actions"]
  node_trigger_webhooks["Trigger webhooks"]
  node_trigger_executors["Trigger executors"]
  node_action_executors["Action executors"]
end

subgraph group_platform["Application services"]
  node_trpc_endpoint["tRPC endpoint<br/>[route.ts]"]
  node_app_router["API router<br/>[_app.ts]"]
  node_auth["Authentication<br/>[auth.ts]"]
end

node_user(("User"))
node_external_triggers(("External trigger services"))

node_user -->|"opens"| node_editor_page
node_user -->|"manages"| node_workflow_list
node_user -->|"reviews"| node_execution_list
node_editor_page -->|"renders"| node_editor
node_editor -->|"updates"| node_editor_state
node_trpc_endpoint -->|"dispatches"| node_app_router
node_app_router -->|"routes"| node_workflow_api
node_app_router -->|"routes"| node_execution_api
node_workflow_api -->|"reads/writes"| node_workflow_store
node_workflow_api -->|"starts execution"| node_dispatch
node_workflow_list -->|"requests workflows"| node_workflow_api
node_execution_api -->|"reads"| node_execution_store
node_execution_list -->|"requests history"| node_execution_api
node_execution_detail -->|"requests details"| node_execution_api
node_trigger_webhooks -->|"dispatches execution"| node_dispatch
node_external_triggers -.->|"sends events"| node_trigger_webhooks
node_dispatch -->|"sends event"| node_inngest_endpoint
node_inngest_endpoint -->|"serves"| node_workflow_functions
node_workflow_functions -->|"uses"| node_executor_registry
node_executor_registry -->|"resolves"| node_trigger_executors
node_executor_registry -->|"resolves"| node_action_executors

click node_editor_page "https://github.com/areysid/flowforge/blob/main/src/app/(dashboard)/(editor)/workflows/%5BworkflowId%5D/page.tsx"
click node_editor "https://github.com/areysid/flowforge/blob/main/src/features/editor/components/editor.tsx"
click node_workflow_list "https://github.com/areysid/flowforge/blob/main/src/features/workflows/components/workflows.tsx"
click node_execution_list "https://github.com/areysid/flowforge/blob/main/src/features/executions/components/executions.tsx"
click node_execution_detail "https://github.com/areysid/flowforge/blob/main/src/features/executions/components/execution.tsx"
click node_workflow_api "https://github.com/areysid/flowforge/blob/main/src/features/workflows/server/routers.ts"
click node_workflow_store "https://github.com/areysid/flowforge/blob/main/src/lib/db.ts"
click node_editor_state "https://github.com/areysid/flowforge/blob/main/src/features/editor/store/atoms.ts"
click node_execution_api "https://github.com/areysid/flowforge/blob/main/src/features/executions/server/routers.ts"
click node_execution_store "https://github.com/areysid/flowforge/blob/main/src/lib/db.ts"
click node_trpc_endpoint "https://github.com/areysid/flowforge/blob/main/src/app/api/trpc/%5Btrpc%5D/route.ts"
click node_app_router "https://github.com/areysid/flowforge/blob/main/src/trpc/routers/_app.ts"
click node_auth "https://github.com/areysid/flowforge/blob/main/src/lib/auth.ts"
click node_inngest_endpoint "https://github.com/areysid/flowforge/blob/main/src/app/api/inngest/route.ts"
click node_workflow_functions "https://github.com/areysid/flowforge/blob/main/src/inngest/functions.ts"
click node_dispatch "https://github.com/areysid/flowforge/blob/main/src/inngest/utils.ts"
click node_executor_registry "https://github.com/areysid/flowforge/blob/main/src/features/executions/lib/executor-registry.ts"
click node_trigger_webhooks "https://github.com/areysid/flowforge/tree/main/src/app/api/webhooks"
click node_trigger_executors "https://github.com/areysid/flowforge/tree/main/src/features/triggers/components"
click node_action_executors "https://github.com/areysid/flowforge/tree/main/src/features/executions/components"

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_page,node_editor,node_workflow_list,node_execution_list,node_execution_detail,node_user toneBlue
class node_workflow_api,node_workflow_store,node_editor_state,node_execution_api,node_execution_store toneAmber
class node_inngest_endpoint,node_workflow_functions,node_dispatch,node_executor_registry toneMint
class node_trigger_webhooks,node_trigger_executors,node_action_executors toneRose
class node_trpc_endpoint,node_app_router,node_auth,node_external_triggers toneIndigo
```

## Components

### User experience

- [Workflow editor page](https://github.com/areysid/flowforge/blob/main/src/app/(dashboard)/(editor)/workflows/%5BworkflowId%5D/page.tsx): `src/app/(dashboard)/(editor)/workflows/[workflowId]/page.tsx`
- [Canvas editor](https://github.com/areysid/flowforge/blob/main/src/features/editor/components/editor.tsx): `src/features/editor/components/editor.tsx`
- [Workflow list](https://github.com/areysid/flowforge/blob/main/src/features/workflows/components/workflows.tsx): `src/features/workflows/components/workflows.tsx`
- [Execution history](https://github.com/areysid/flowforge/blob/main/src/features/executions/components/executions.tsx): `src/features/executions/components/executions.tsx`
- [Execution detail](https://github.com/areysid/flowforge/blob/main/src/features/executions/components/execution.tsx): `src/features/executions/components/execution.tsx`

### Workflow management

- [Workflow operations](https://github.com/areysid/flowforge/blob/main/src/features/workflows/server/routers.ts): `src/features/workflows/server/routers.ts`
- [Workflow records](https://github.com/areysid/flowforge/blob/main/src/lib/db.ts): `src/lib/db.ts`
- [Canvas state](https://github.com/areysid/flowforge/blob/main/src/features/editor/store/atoms.ts): `src/features/editor/store/atoms.ts`
- [Execution queries](https://github.com/areysid/flowforge/blob/main/src/features/executions/server/routers.ts): `src/features/executions/server/routers.ts`
- [Execution records](https://github.com/areysid/flowforge/blob/main/src/lib/db.ts): `src/lib/db.ts`

### Execution runtime

- [Inngest endpoint](https://github.com/areysid/flowforge/blob/main/src/app/api/inngest/route.ts): `src/app/api/inngest/route.ts`
- [Workflow functions](https://github.com/areysid/flowforge/blob/main/src/inngest/functions.ts): `src/inngest/functions.ts`
- [Execution dispatch](https://github.com/areysid/flowforge/blob/main/src/inngest/utils.ts): `src/inngest/utils.ts`
- [Executor registry](https://github.com/areysid/flowforge/blob/main/src/features/executions/lib/executor-registry.ts): `src/features/executions/lib/executor-registry.ts`

### Triggers and actions

- [Trigger webhooks](https://github.com/areysid/flowforge/tree/main/src/app/api/webhooks): `src/app/api/webhooks`
- [Trigger executors](https://github.com/areysid/flowforge/tree/main/src/features/triggers/components): `src/features/triggers/components`
- [Action executors](https://github.com/areysid/flowforge/tree/main/src/features/executions/components): `src/features/executions/components`

### Application services

- [tRPC endpoint](https://github.com/areysid/flowforge/blob/main/src/app/api/trpc/%5Btrpc%5D/route.ts): `src/app/api/trpc/[trpc]/route.ts`
- [API router](https://github.com/areysid/flowforge/blob/main/src/trpc/routers/_app.ts): `src/trpc/routers/_app.ts`
- [Authentication](https://github.com/areysid/flowforge/blob/main/src/lib/auth.ts): `src/lib/auth.ts`

### Other components

- **User**
- **External trigger services**

## Connections

- User → Workflow editor page: opens
- User → Workflow list: manages
- User → Execution history: reviews
- Workflow editor page → Canvas editor: renders
- Canvas editor → Canvas state: updates
- tRPC endpoint → API router: dispatches
- API router → Workflow operations: routes
- API router → Execution queries: routes
- Workflow operations → Workflow records: reads/writes
- Workflow operations → Execution dispatch: starts execution
- Workflow list → Workflow operations: requests workflows
- Execution queries → Execution records: reads
- Execution history → Execution queries: requests history
- Execution detail → Execution queries: requests details
- Trigger webhooks → Execution dispatch: dispatches execution
- External trigger services → Trigger webhooks: sends events
- Execution dispatch → Inngest endpoint: sends event
- Inngest endpoint → Workflow functions: serves
- Workflow functions → Executor registry: uses
- Executor registry → Trigger executors: resolves
- Executor registry → Action executors: resolves
