# 96bbyy/flowise architecture

> Architecture diagram of the GitHub repository 96bbyy/flowise, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/96bbyy/flowise
- Repository: https://github.com/96bbyy/flowise

## Overview

##### Project type and purpose
- Flowise is a full-stack, monorepo application for visually building and running LLM-driven workflows. It consists of:
- A React-based drag-and-drop UI (`packages/ui`)
- An Express/TypeORM backend API (`packages/server`)
- A library of “node” plugins and integrations (`packages/components`)
- Auto-generated API docs (`packages/api-documentation`)

##### File structure
- Top-level divisions:
- `packages/ui` – frontend React app, HTTP client to backend
- `packages/server` – Node/Express server with controllers, services, routes, database migrations, queue, metrics
- `packages/components` – TypeScript modules defining nodes (agents, chains, tools, retrievers, etc.)
- `packages/api-documentation` – Swagger UI for API docs
- Config & deployment: Dockerfiles, docker-compose, GitHub Actions, metrics (Prometheus, Grafana, OpenTelemetry)

##### README for insights
- Monorepo with three modules
- Quick-start and Docker deployment
- Self-hosted options and supported env variables

##### Don’t overthink it – capture all major modules and their interactions.
- Optionally, annotate plugin boundaries or dynamic loading for the Components library

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Frontend Layer"
        Browser["Client Browser"]:::frontend
        FE_Server["Frontend Server\n(Express Serve Static)"]:::frontend
    end

    subgraph "Backend API (Node.js, Express)"
        API["Express API"]:::backend
        comp["Components Library"]:::backend
        API --> comp
    end

    subgraph "Queue Workers"
        Workers["Queue Workers"]:::backend
    end

    subgraph "Data Stores"
        DB["Relational DB\n(SQL)"]:::datastore
        Redis["Redis (Queue)"]:::datastore
        Storage["File Storage\n(Local/S3)"]:::datastore
    end

    subgraph "External AI Services"
        AI["LLM Providers"]:::external
    end

    subgraph "API Documentation"
        Swagger["Swagger UI"]:::external
    end

    subgraph "Metrics Stack"
        OTEL["OTEL Collector"]:::metrics
        Prom["Prometheus"]:::metrics
        Graf["Grafana"]:::metrics
    end

    Browser -->|REST/SSE| API
    Browser -->|static assets| FE_Server
    FE_Server -->|serves UI & client code| Browser
    FE_Server -->|API calls| API

    API -->|SQL| DB
    API -->|read/write files| Storage
    API -->|publish tasks| Redis
    API -->|stream events| Browser

    Redis -->|pub/sub| Workers
    Workers -->|SQL writes| DB
    Workers -->|upsert files| Storage
    Workers -->|LLM calls| AI

    API -->|docs| Swagger

    API -->|OTEL metrics| OTEL
    Workers -->|OTEL metrics| OTEL
    OTEL -->|scrape| Prom
    Prom -->|dashboard| Graf

    click Browser "https://github.com/96bbyy/flowise/tree/main/packages/ui"
    click FE_Server "https://github.com/96bbyy/flowise/tree/main/packages/ui"
    click API "https://github.com/96bbyy/flowise/blob/main/packages/server/src/index.ts"
    click comp "https://github.com/96bbyy/flowise/tree/main/packages/components"
    click Workers "https://github.com/96bbyy/flowise/blob/main/packages/server/src/commands/worker.ts"
    click Redis "https://github.com/96bbyy/flowise/tree/main/packages/server/src/queue"
    click DB "https://github.com/96bbyy/flowise/tree/main/packages/server/src/database/entities"
    click DB "https://github.com/96bbyy/flowise/tree/main/packages/server/src/database/migrations"
    click Storage "https://github.com/96bbyy/flowise/tree/main/packages/server/src/controllers/get-upload-file"
    click Storage "https://github.com/96bbyy/flowise/tree/main/packages/server/src/controllers/get-upload-path"
    click AI "https://github.com/96bbyy/flowise/tree/main/packages/components/nodes/llms"
    click OTEL "https://github.com/96bbyy/flowise/tree/main/metrics/otel"
    click Prom "https://github.com/96bbyy/flowise/tree/main/metrics/prometheus"
    click Graf "https://github.com/96bbyy/flowise/tree/main/metrics/grafana"
    click Swagger "https://github.com/96bbyy/flowise/tree/main/packages/api-documentation"

    classDef frontend fill:#cce5ff,stroke:#3399ff
    classDef backend fill:#d4edda,stroke:#28a745
    classDef datastore fill:#fff3cd,stroke:#ffcc00
    classDef external fill:#e2e3e5,stroke:#6c757d
    classDef metrics fill:#f5e6ff,stroke:#b17dff
```
