# manik-jasrai/flomate architecture

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

- Interactive diagram: https://gitdiagram.com/manik-jasrai/flomate
- Repository: https://github.com/manik-jasrai/flomate

## Overview

Flomate lets users define trigger-and-action flows in a React UI, manage them through the API, and execute incoming events asynchronously. The documented runtime separates webhook ingestion, Redis queueing, worker action execution, and database-backed flow management; the processor is described as coordinating reliable outbox delivery. The graph includes the major documented capabilities, but queue wiring, retry/logging internals, and some service registration are not visible in the sampled source, so those relationships rely on README evidence.

Main entry points: [`apps/api/src/index.ts`](https://github.com/manik-jasrai/flomate/blob/main/apps/api/src/index.ts) (REST API), [`packages/db/index.ts`](https://github.com/manik-jasrai/flomate/blob/main/packages/db/index.ts) (Database client), [`apps/web/src/App.tsx`](https://github.com/manik-jasrai/flomate/blob/main/apps/web/src/App.tsx) (Web application), [`apps/worker/src/TaskManager/handleTask.ts`](https://github.com/manik-jasrai/flomate/blob/main/apps/worker/src/TaskManager/handleTask.ts) (Task manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Flow interface"]
  node_web_app["Web application<br/>[App.tsx]"]
  node_flow_editor["Flow editor<br/>[NewFlow.tsx]"]
  node_flow_views["Dashboard and flow views<br/>[Dashboard.tsx]"]
  node_auth_ui["Sign-in and signup<br/>[LogInPage.tsx]"]
  node_api_client["Authenticated API client<br/>[useAxiosPrivate.ts]"]
end

subgraph group_management["Flow management"]
  node_api["REST API<br/>[index.ts]"]
  node_auth_routes["Authentication routes<br/>[auth.ts]"]
  node_flow_routes["Flow routes<br/>[flow.ts]"]
  node_trigger_routes["Trigger routes<br/>[trigger.ts]"]
  node_action_routes["Action routes<br/>[action.ts]"]
end

subgraph group_execution["Event execution"]
  node_hooks["Webhook handler<br/>[index.ts]"]
  node_queue["Redis task queue"]
  node_worker["Worker service<br/>[index.ts]"]
  node_task_manager["Task manager<br/>[handleTask.ts]"]
  node_metadata_parser["Metadata parser<br/>[parser.ts]"]
  node_email_action["Email action<br/>[email.ts]"]
  node_notion_action["Notion action<br/>[notion.ts]"]
  node_processor["Outbox processor<br/>[index.ts]"]
end

subgraph group_shared["Shared data"]
  node_db_client["Database client<br/>[index.ts]"]
  node_postgres[("PostgreSQL")]
end

node_user(("Flow author"))
node_webhook_sender(("Webhook source"))

node_user -->|"uses"| node_web_app
node_web_app -->|"routes to"| node_flow_editor
node_web_app -->|"routes to"| node_flow_views
node_web_app -->|"routes to"| node_auth_ui
node_flow_editor -->|"requests through"| node_api_client
node_flow_views -->|"requests through"| node_api_client
node_auth_ui -.->|"manages flows"| node_api
node_api_client -->|"calls"| node_api
node_api -.->|"routes requests"| node_auth_routes
node_api -.->|"routes requests"| node_flow_routes
node_api -.->|"routes requests"| node_trigger_routes
node_api -.->|"routes requests"| node_action_routes
node_flow_routes -->|"reads and writes"| node_db_client
node_trigger_routes -->|"reads and writes"| node_db_client
node_auth_routes -->|"reads and writes"| node_db_client
node_db_client -.->|"accesses"| node_postgres
node_webhook_sender -->|"sends events"| node_hooks
node_hooks -->|"enqueues tasks"| node_queue
node_queue -->|"dispatches jobs"| node_worker
node_worker -.->|"executes tasks"| node_task_manager
node_task_manager -->|"parses metadata"| node_metadata_parser
node_task_manager -->|"invokes"| node_email_action
node_task_manager -->|"invokes"| node_notion_action
node_processor -.->|"reads outbox"| node_db_client
node_processor -.->|"publishes tasks"| node_queue

click node_web_app "https://github.com/manik-jasrai/flomate/blob/main/apps/web/src/App.tsx"
click node_flow_editor "https://github.com/manik-jasrai/flomate/blob/main/apps/web/src/pages/NewFlow.tsx"
click node_flow_views "https://github.com/manik-jasrai/flomate/blob/main/apps/web/src/pages/Dashboard.tsx"
click node_auth_ui "https://github.com/manik-jasrai/flomate/blob/main/apps/web/src/pages/LogInPage.tsx"
click node_api_client "https://github.com/manik-jasrai/flomate/blob/main/apps/web/src/hooks/useAxiosPrivate.ts"
click node_api "https://github.com/manik-jasrai/flomate/blob/main/apps/api/src/index.ts"
click node_auth_routes "https://github.com/manik-jasrai/flomate/blob/main/apps/api/src/routes/auth.ts"
click node_flow_routes "https://github.com/manik-jasrai/flomate/blob/main/apps/api/src/routes/flow.ts"
click node_trigger_routes "https://github.com/manik-jasrai/flomate/blob/main/apps/api/src/routes/trigger.ts"
click node_action_routes "https://github.com/manik-jasrai/flomate/blob/main/apps/api/src/routes/action.ts"
click node_hooks "https://github.com/manik-jasrai/flomate/blob/main/apps/hooks/src/index.ts"
click node_worker "https://github.com/manik-jasrai/flomate/blob/main/apps/worker/src/index.ts"
click node_task_manager "https://github.com/manik-jasrai/flomate/blob/main/apps/worker/src/TaskManager/handleTask.ts"
click node_metadata_parser "https://github.com/manik-jasrai/flomate/blob/main/apps/worker/src/TaskManager/parser.ts"
click node_email_action "https://github.com/manik-jasrai/flomate/blob/main/apps/worker/src/Actions/email.ts"
click node_notion_action "https://github.com/manik-jasrai/flomate/blob/main/apps/worker/src/Actions/notion.ts"
click node_processor "https://github.com/manik-jasrai/flomate/blob/main/apps/processor/src/index.ts"
click node_db_client "https://github.com/manik-jasrai/flomate/blob/main/packages/db/index.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_web_app,node_flow_editor,node_flow_views,node_auth_ui,node_api_client toneBlue
class node_api,node_auth_routes,node_flow_routes,node_trigger_routes,node_action_routes toneAmber
class node_hooks,node_queue,node_worker,node_task_manager,node_metadata_parser,node_email_action,node_notion_action,node_processor,node_webhook_sender toneMint
class node_db_client,node_postgres toneRose
class node_user toneIndigo
```

## Components

### Flow interface

- [Web application](https://github.com/manik-jasrai/flomate/blob/main/apps/web/src/App.tsx): `apps/web/src/App.tsx`
- [Flow editor](https://github.com/manik-jasrai/flomate/blob/main/apps/web/src/pages/NewFlow.tsx): `apps/web/src/pages/NewFlow.tsx`
- [Dashboard and flow views](https://github.com/manik-jasrai/flomate/blob/main/apps/web/src/pages/Dashboard.tsx): `apps/web/src/pages/Dashboard.tsx`
- [Sign-in and signup](https://github.com/manik-jasrai/flomate/blob/main/apps/web/src/pages/LogInPage.tsx): `apps/web/src/pages/LogInPage.tsx`
- [Authenticated API client](https://github.com/manik-jasrai/flomate/blob/main/apps/web/src/hooks/useAxiosPrivate.ts): `apps/web/src/hooks/useAxiosPrivate.ts`

### Flow management

- [REST API](https://github.com/manik-jasrai/flomate/blob/main/apps/api/src/index.ts): `apps/api/src/index.ts`
- [Authentication routes](https://github.com/manik-jasrai/flomate/blob/main/apps/api/src/routes/auth.ts): `apps/api/src/routes/auth.ts`
- [Flow routes](https://github.com/manik-jasrai/flomate/blob/main/apps/api/src/routes/flow.ts): `apps/api/src/routes/flow.ts`
- [Trigger routes](https://github.com/manik-jasrai/flomate/blob/main/apps/api/src/routes/trigger.ts): `apps/api/src/routes/trigger.ts`
- [Action routes](https://github.com/manik-jasrai/flomate/blob/main/apps/api/src/routes/action.ts): `apps/api/src/routes/action.ts`

### Event execution

- [Webhook handler](https://github.com/manik-jasrai/flomate/blob/main/apps/hooks/src/index.ts): `apps/hooks/src/index.ts`
- **Redis task queue**
- [Worker service](https://github.com/manik-jasrai/flomate/blob/main/apps/worker/src/index.ts): `apps/worker/src/index.ts`
- [Task manager](https://github.com/manik-jasrai/flomate/blob/main/apps/worker/src/TaskManager/handleTask.ts): `apps/worker/src/TaskManager/handleTask.ts`
- [Metadata parser](https://github.com/manik-jasrai/flomate/blob/main/apps/worker/src/TaskManager/parser.ts): `apps/worker/src/TaskManager/parser.ts`
- [Email action](https://github.com/manik-jasrai/flomate/blob/main/apps/worker/src/Actions/email.ts): `apps/worker/src/Actions/email.ts`
- [Notion action](https://github.com/manik-jasrai/flomate/blob/main/apps/worker/src/Actions/notion.ts): `apps/worker/src/Actions/notion.ts`
- [Outbox processor](https://github.com/manik-jasrai/flomate/blob/main/apps/processor/src/index.ts): `apps/processor/src/index.ts`

### Shared data

- [Database client](https://github.com/manik-jasrai/flomate/blob/main/packages/db/index.ts): `packages/db/index.ts`
- **PostgreSQL**

### Other components

- **Flow author**
- **Webhook source**

## Connections

- Flow author → Web application: uses (evidence: `README.md`)
- Web application → Flow editor: routes to (evidence: `apps/web/src/App.tsx`)
- Web application → Dashboard and flow views: routes to (evidence: `apps/web/src/App.tsx`)
- Web application → Sign-in and signup: routes to (evidence: `apps/web/src/App.tsx`)
- Flow editor → Authenticated API client: requests through (evidence: `apps/web/src/pages/NewFlow.tsx`)
- Dashboard and flow views → Authenticated API client: requests through (evidence: `apps/web/src/pages/Dashboard.tsx`)
- Sign-in and signup → REST API: manages flows (evidence: `README.md`)
- Authenticated API client → REST API: calls (evidence: `README.md`)
- REST API → Authentication routes: routes requests
- REST API → Flow routes: routes requests
- REST API → Trigger routes: routes requests
- REST API → Action routes: routes requests
- Flow routes → Database client: reads and writes (evidence: `apps/api/src/routes/flow.ts`)
- Trigger routes → Database client: reads and writes (evidence: `apps/api/src/routes/trigger.ts`)
- Authentication routes → Database client: reads and writes (evidence: `apps/api/src/routes/auth.ts`)
- Database client → PostgreSQL: accesses (evidence: `README.md`)
- Webhook source → Webhook handler: sends events (evidence: `README.md`)
- Webhook handler → Redis task queue: enqueues tasks (evidence: `README.md`)
- Redis task queue → Worker service: dispatches jobs (evidence: `README.md`)
- Worker service → Task manager: executes tasks
- Task manager → Metadata parser: parses metadata (evidence: `apps/worker/src/TaskManager/handleTask.ts`)
- Task manager → Email action: invokes (evidence: `apps/worker/src/TaskManager/handleTask.ts`)
- Task manager → Notion action: invokes (evidence: `apps/worker/src/TaskManager/handleTask.ts`)
- Outbox processor → Database client: reads outbox (evidence: `README.md`)
- Outbox processor → Redis task queue: publishes tasks (evidence: `README.md`)
