# code-with-antonio/nodebase architecture

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

- Interactive diagram: https://gitdiagram.com/code-with-antonio/nodebase
- Repository: https://github.com/code-with-antonio/nodebase

## Overview

This is a workflow-automation web app: users configure trigger and action nodes in a visual editor, save workflows, and request executions that run asynchronously and expose execution history. The graph separates workflow management, the editor, execution orchestration, and account/API services. Relationships are limited to calls or registrations visible in excerpts or the source index; unsampled UI and provider implementations are represented without guessed wiring.

Main entry points: [`src/features/executions/components/base-execution-node.tsx`](https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/components/base-execution-node.tsx) (Trigger and action nodes), [`src/inngest/functions.ts`](https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/functions.ts) (Workflow runner), [`src/features/workflows/server/routers.ts`](https://github.com/code-with-antonio/nodebase/blob/main/src/features/workflows/server/routers.ts) (Workflow procedures), [`src/inngest/utils.ts`](https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/utils.ts) (Execution dispatch and sorting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Workflow management"]
  node_workflow_ui["Workflow lists<br/>[workflows.tsx]"]
  node_workflow_api["Workflow procedures<br/>[routers.ts]"]
  node_workflow_store[("Workflow data<br/>[db.ts]")]
end

subgraph group_editor["Visual editor"]
  node_editor_ui["Workflow editor<br/>[editor.tsx]"]
  node_node_palette["Node selector<br/>[node-selector.tsx]"]
  node_node_registry["Node component registry<br/>[node-components.ts]"]
  node_node_ui["Trigger and action nodes"]
  node_workflow_components["Initial and workflow nodes<br/>[initial-node.tsx]"]
  node_ui_dropdown["Dropdown menu primitive<br/>[dropdown-menu.tsx]"]
  node_anthropic_dialog["Anthropic node dialog<br/>[dialog.tsx]"]
  node_gemini_dialog["Gemini node dialog<br/>[dialog.tsx]"]
end

subgraph group_runtime["Execution runtime"]
  node_execution_api["Execution procedures<br/>[routers.ts]"]
  node_execution_ui["Execution history<br/>[executions.tsx]"]
  node_executor_registry["Executor registry"]
  node_workflow_runner["Workflow runner<br/>[functions.ts]"]
  node_event_client["Inngest client<br/>[client.ts]"]
  node_event_endpoint["Inngest endpoint<br/>[route.ts]"]
  node_event_utils["Execution dispatch and sorting<br/>[utils.ts]"]
  node_provider_channels["Provider channels"]
  node_google_webhook["Google Forms webhook<br/>[route.ts]"]
  node_stripe_webhook["Stripe webhook<br/>[route.ts]"]
  node_node_status["Node status display<br/>[use-node-status.ts]"]
  node_anthropic_channel["Anthropic channel<br/>[anthropic.ts]"]
  node_discord_channel["Discord channel<br/>[discord.ts]"]
  node_gemini_channel["Gemini channel<br/>[gemini.ts]"]
end

subgraph group_platform["Accounts and API"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_auth_store[("Database adapter<br/>[db.ts]")]
  node_polar["Subscription provider<br/>[polar.ts]"]
  node_trpc_endpoint["tRPC endpoint<br/>[route.ts]"]
  node_trpc_app["Application router<br/>[_app.ts]"]
  node_trpc_init["tRPC procedures<br/>[init.ts]"]
  node_query_cache["Query cache<br/>[query-client.ts]"]
  node_auth_endpoint["Auth endpoint<br/>[route.ts]"]
end

node_user(("Workflow user"))

node_user -.->|"manages workflows"| node_workflow_ui
node_workflow_api -->|"reads and writes"| node_workflow_store
node_workflow_api -->|"dispatches execution"| node_event_utils
node_event_utils -->|"sends event"| node_event_client
node_workflow_runner -->|"registers function"| node_event_client
node_event_endpoint -->|"serves functions"| node_event_client
node_event_endpoint -->|"serves function"| node_workflow_runner
node_workflow_runner -->|"loads and updates"| node_workflow_store
node_workflow_runner -->|"sorts nodes"| node_event_utils
node_workflow_runner -->|"selects executor"| node_executor_registry
node_workflow_runner -->|"registers channels"| node_provider_channels
node_node_registry -->|"registers node"| node_workflow_components
node_node_registry -->|"registers nodes"| node_node_ui
node_node_ui -->|"opens dialog"| node_anthropic_dialog
node_node_ui -->|"opens dialog"| node_gemini_dialog
node_node_ui -->|"reads status"| node_node_status
node_node_ui -->|"references channel"| node_anthropic_channel
node_node_ui -->|"references channel"| node_discord_channel
node_node_ui -->|"references channel"| node_gemini_channel
node_trpc_endpoint -->|"uses procedures"| node_trpc_init
node_trpc_endpoint -->|"routes requests"| node_trpc_app
node_trpc_app -->|"creates router"| node_trpc_init
node_trpc_app -->|"registers workflows"| node_workflow_api
node_trpc_app -->|"registers executions"| node_execution_api
node_trpc_init -->|"checks session"| node_auth
node_trpc_init -->|"checks subscription"| node_polar
node_auth -->|"uses adapter"| node_auth_store
node_auth -->|"configures plugin"| node_polar
node_auth_endpoint -->|"routes auth"| node_auth
node_google_webhook -->|"uses dispatch utility"| node_event_utils
node_stripe_webhook -->|"uses dispatch utility"| node_event_utils
node_user -.->|"edits workflow"| node_editor_ui
node_editor_ui -.->|"saves workflow"| node_workflow_api
node_user -.->|"reviews runs"| node_execution_ui
node_execution_api -->|"queries executions"| node_workflow_store
node_workflow_ui -.->|"loads workflows"| node_workflow_api
node_editor_ui -.->|"renders registered nodes"| node_node_registry
node_node_palette -.->|"uses menu"| node_ui_dropdown

click node_workflow_ui "https://github.com/code-with-antonio/nodebase/blob/main/src/features/workflows/components/workflows.tsx"
click node_workflow_api "https://github.com/code-with-antonio/nodebase/blob/main/src/features/workflows/server/routers.ts"
click node_workflow_store "https://github.com/code-with-antonio/nodebase/blob/main/src/lib/db.ts"
click node_editor_ui "https://github.com/code-with-antonio/nodebase/blob/main/src/features/editor/components/editor.tsx"
click node_node_palette "https://github.com/code-with-antonio/nodebase/blob/main/src/components/node-selector.tsx"
click node_node_registry "https://github.com/code-with-antonio/nodebase/blob/main/src/config/node-components.ts"
click node_node_ui "https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/components/base-execution-node.tsx"
click node_workflow_components "https://github.com/code-with-antonio/nodebase/blob/main/src/components/initial-node.tsx"
click node_execution_api "https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/server/routers.ts"
click node_execution_ui "https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/components/executions.tsx"
click node_executor_registry "https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/lib/executor-registry.ts"
click node_workflow_runner "https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/functions.ts"
click node_event_client "https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/client.ts"
click node_event_endpoint "https://github.com/code-with-antonio/nodebase/blob/main/src/app/api/inngest/route.ts"
click node_event_utils "https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/utils.ts"
click node_provider_channels "https://github.com/code-with-antonio/nodebase/tree/main/src/inngest/channels"
click node_auth "https://github.com/code-with-antonio/nodebase/blob/main/src/lib/auth.ts"
click node_auth_store "https://github.com/code-with-antonio/nodebase/blob/main/src/lib/db.ts"
click node_polar "https://github.com/code-with-antonio/nodebase/blob/main/src/lib/polar.ts"
click node_trpc_endpoint "https://github.com/code-with-antonio/nodebase/blob/main/src/app/api/trpc/%5Btrpc%5D/route.ts"
click node_trpc_app "https://github.com/code-with-antonio/nodebase/blob/main/src/trpc/routers/_app.ts"
click node_trpc_init "https://github.com/code-with-antonio/nodebase/blob/main/src/trpc/init.ts"
click node_query_cache "https://github.com/code-with-antonio/nodebase/blob/main/src/trpc/query-client.ts"
click node_auth_endpoint "https://github.com/code-with-antonio/nodebase/blob/main/src/app/api/auth/%5B...all%5D/route.ts"
click node_google_webhook "https://github.com/code-with-antonio/nodebase/blob/main/src/app/api/webhooks/google-form/route.ts"
click node_stripe_webhook "https://github.com/code-with-antonio/nodebase/blob/main/src/app/api/webhooks/stripe/route.ts"
click node_ui_dropdown "https://github.com/code-with-antonio/nodebase/blob/main/src/components/ui/dropdown-menu.tsx"
click node_anthropic_dialog "https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/components/anthropic/dialog.tsx"
click node_gemini_dialog "https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/components/gemini/dialog.tsx"
click node_node_status "https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/hooks/use-node-status.ts"
click node_anthropic_channel "https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/channels/anthropic.ts"
click node_discord_channel "https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/channels/discord.ts"
click node_gemini_channel "https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/channels/gemini.ts"

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_workflow_ui,node_workflow_api,node_workflow_store,node_user toneBlue
class node_editor_ui,node_node_palette,node_node_registry,node_node_ui,node_workflow_components,node_ui_dropdown,node_anthropic_dialog,node_gemini_dialog toneAmber
class node_execution_api,node_execution_ui,node_executor_registry,node_workflow_runner,node_event_client,node_event_endpoint,node_event_utils,node_provider_channels,node_google_webhook,node_stripe_webhook,node_node_status,node_anthropic_channel,node_discord_channel,node_gemini_channel toneMint
class node_auth,node_auth_store,node_polar,node_trpc_endpoint,node_trpc_app,node_trpc_init,node_query_cache,node_auth_endpoint toneRose
```

## Components

### Workflow management

- [Workflow lists](https://github.com/code-with-antonio/nodebase/blob/main/src/features/workflows/components/workflows.tsx): `src/features/workflows/components/workflows.tsx`
- [Workflow procedures](https://github.com/code-with-antonio/nodebase/blob/main/src/features/workflows/server/routers.ts): `src/features/workflows/server/routers.ts`
- [Workflow data](https://github.com/code-with-antonio/nodebase/blob/main/src/lib/db.ts): `src/lib/db.ts`

### Visual editor

- [Workflow editor](https://github.com/code-with-antonio/nodebase/blob/main/src/features/editor/components/editor.tsx): `src/features/editor/components/editor.tsx`
- [Node selector](https://github.com/code-with-antonio/nodebase/blob/main/src/components/node-selector.tsx): `src/components/node-selector.tsx`
- [Node component registry](https://github.com/code-with-antonio/nodebase/blob/main/src/config/node-components.ts): `src/config/node-components.ts`
- [Trigger and action nodes](https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/components/base-execution-node.tsx): `src/features/executions/components/base-execution-node.tsx`
- [Initial and workflow nodes](https://github.com/code-with-antonio/nodebase/blob/main/src/components/initial-node.tsx): `src/components/initial-node.tsx`
- [Dropdown menu primitive](https://github.com/code-with-antonio/nodebase/blob/main/src/components/ui/dropdown-menu.tsx): `src/components/ui/dropdown-menu.tsx`
- [Anthropic node dialog](https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/components/anthropic/dialog.tsx): `src/features/executions/components/anthropic/dialog.tsx`
- [Gemini node dialog](https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/components/gemini/dialog.tsx): `src/features/executions/components/gemini/dialog.tsx`

### Execution runtime

- [Execution procedures](https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/server/routers.ts): `src/features/executions/server/routers.ts`
- [Execution history](https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/components/executions.tsx): `src/features/executions/components/executions.tsx`
- [Executor registry](https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/lib/executor-registry.ts): `src/features/executions/lib/executor-registry.ts`
- [Workflow runner](https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/functions.ts): `src/inngest/functions.ts`
- [Inngest client](https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/client.ts): `src/inngest/client.ts`
- [Inngest endpoint](https://github.com/code-with-antonio/nodebase/blob/main/src/app/api/inngest/route.ts): `src/app/api/inngest/route.ts`
- [Execution dispatch and sorting](https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/utils.ts): `src/inngest/utils.ts`
- [Provider channels](https://github.com/code-with-antonio/nodebase/tree/main/src/inngest/channels): `src/inngest/channels`
- [Google Forms webhook](https://github.com/code-with-antonio/nodebase/blob/main/src/app/api/webhooks/google-form/route.ts): `src/app/api/webhooks/google-form/route.ts`
- [Stripe webhook](https://github.com/code-with-antonio/nodebase/blob/main/src/app/api/webhooks/stripe/route.ts): `src/app/api/webhooks/stripe/route.ts`
- [Node status display](https://github.com/code-with-antonio/nodebase/blob/main/src/features/executions/hooks/use-node-status.ts): `src/features/executions/hooks/use-node-status.ts`
- [Anthropic channel](https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/channels/anthropic.ts): `src/inngest/channels/anthropic.ts`
- [Discord channel](https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/channels/discord.ts): `src/inngest/channels/discord.ts`
- [Gemini channel](https://github.com/code-with-antonio/nodebase/blob/main/src/inngest/channels/gemini.ts): `src/inngest/channels/gemini.ts`

### Accounts and API

- [Authentication](https://github.com/code-with-antonio/nodebase/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Database adapter](https://github.com/code-with-antonio/nodebase/blob/main/src/lib/db.ts): `src/lib/db.ts`
- [Subscription provider](https://github.com/code-with-antonio/nodebase/blob/main/src/lib/polar.ts): `src/lib/polar.ts`
- [tRPC endpoint](https://github.com/code-with-antonio/nodebase/blob/main/src/app/api/trpc/%5Btrpc%5D/route.ts): `src/app/api/trpc/[trpc]/route.ts`
- [Application router](https://github.com/code-with-antonio/nodebase/blob/main/src/trpc/routers/_app.ts): `src/trpc/routers/_app.ts`
- [tRPC procedures](https://github.com/code-with-antonio/nodebase/blob/main/src/trpc/init.ts): `src/trpc/init.ts`
- [Query cache](https://github.com/code-with-antonio/nodebase/blob/main/src/trpc/query-client.ts): `src/trpc/query-client.ts`
- [Auth endpoint](https://github.com/code-with-antonio/nodebase/blob/main/src/app/api/auth/%5B...all%5D/route.ts): `src/app/api/auth/[...all]/route.ts`

### Other components

- **Workflow user**

## Connections

- Workflow user → Workflow lists: manages workflows
- Workflow procedures → Workflow data: reads and writes (evidence: `src/features/workflows/server/routers.ts`)
- Workflow procedures → Execution dispatch and sorting: dispatches execution (evidence: `src/features/workflows/server/routers.ts`)
- Execution dispatch and sorting → Inngest client: sends event (evidence: `src/inngest/utils.ts`)
- Workflow runner → Inngest client: registers function (evidence: `src/inngest/functions.ts`)
- Inngest endpoint → Inngest client: serves functions (evidence: `src/app/api/inngest/route.ts`)
- Inngest endpoint → Workflow runner: serves function (evidence: `src/app/api/inngest/route.ts`)
- Workflow runner → Workflow data: loads and updates (evidence: `src/inngest/functions.ts`)
- Workflow runner → Execution dispatch and sorting: sorts nodes (evidence: `src/inngest/functions.ts`)
- Workflow runner → Executor registry: selects executor (evidence: `src/inngest/functions.ts`)
- Workflow runner → Provider channels: registers channels (evidence: `src/inngest/functions.ts`)
- Node component registry → Initial and workflow nodes: registers node (evidence: `src/config/node-components.ts`)
- Node component registry → Trigger and action nodes: registers nodes (evidence: `src/config/node-components.ts`)
- Trigger and action nodes → Anthropic node dialog: opens dialog (evidence: `src/features/executions/components/anthropic/node.tsx`)
- Trigger and action nodes → Gemini node dialog: opens dialog (evidence: `src/features/executions/components/gemini/node.tsx`)
- Trigger and action nodes → Node status display: reads status (evidence: `src/features/executions/components/anthropic/node.tsx`)
- Trigger and action nodes → Anthropic channel: references channel (evidence: `src/features/executions/components/anthropic/node.tsx`)
- Trigger and action nodes → Discord channel: references channel (evidence: `src/features/executions/components/discord/node.tsx`)
- Trigger and action nodes → Gemini channel: references channel (evidence: `src/features/executions/components/gemini/node.tsx`)
- tRPC endpoint → tRPC procedures: uses procedures (evidence: `src/app/api/trpc/[trpc]/route.ts`)
- tRPC endpoint → Application router: routes requests (evidence: `src/app/api/trpc/[trpc]/route.ts`)
- Application router → tRPC procedures: creates router (evidence: `src/trpc/routers/_app.ts`)
- Application router → Workflow procedures: registers workflows (evidence: `src/trpc/routers/_app.ts`)
- Application router → Execution procedures: registers executions (evidence: `src/trpc/routers/_app.ts`)
- tRPC procedures → Authentication: checks session (evidence: `src/trpc/init.ts`)
- tRPC procedures → Subscription provider: checks subscription (evidence: `src/trpc/init.ts`)
- Authentication → Database adapter: uses adapter (evidence: `src/lib/auth.ts`)
- Authentication → Subscription provider: configures plugin (evidence: `src/lib/auth.ts`)
- Auth endpoint → Authentication: routes auth (evidence: `src/app/api/auth/[...all]/route.ts`)
- Google Forms webhook → Execution dispatch and sorting: uses dispatch utility (evidence: `src/app/api/webhooks/google-form/route.ts`)
- Stripe webhook → Execution dispatch and sorting: uses dispatch utility (evidence: `src/app/api/webhooks/stripe/route.ts`)
- Workflow user → Workflow editor: edits workflow
- Workflow editor → Workflow procedures: saves workflow
- Workflow user → Execution history: reviews runs
- Execution procedures → Workflow data: queries executions (evidence: `src/features/executions/server/routers.ts`)
- Workflow lists → Workflow procedures: loads workflows
- Workflow editor → Node component registry: renders registered nodes
- Node selector → Dropdown menu primitive: uses menu
