Skip to content
STACK IT FAST

Budibase

Curated OSSClassicInternal Tool Builder6-20 people

Audited from github.com/Budibase/budibase

Budibase is an open-source, self-hostable platform for building AI agents, automations and internal business apps from a visual builder, backed by a Svelte builder/runtime, a Koa API and worker layer, and a CouchDB system database.

Language
TypeScript
Database
CouchDB
Hosting
Docker
Running for
4 years 3 months
Team
6-20 people

Why this architecture

Splits the builder (Svelte), API/automation engine and background jobs (Koa) into independently deployable packages on shared CouchDB, while isolated-vm sandboxes user scripts and AI tool calls.

Tech stack by layer

8 technologies · audited Sep 17, 2026
Frontend & UI
  • SvelteBoth the app builder (packages/builder) and the published app runtime (packages/client) are Svelte; bbui is the shared Svelte component library.
  • ViteBundles bbui, client and the frontend packages; builder combines it with routify for file-based routing.
  • CodeMirrorPowers the builder's binding, JavaScript and JSON editors (codemirror plus @codemirror/lang-* packages).
Backend & APIs
  • KoaBoth packages/server and packages/worker are Koa applications, using @koa/router, koa-session and koa-passport for auth.
  • Node.jsRuntime for server, worker and CLI packages; version pinned for local development.
  • isolated-vmSandboxes JavaScript execution for automation bindings and scripting steps outside the main process.
  • BullBacks scheduled automations and background jobs in backend-core and worker, queued on Redis.(inferred)
Data & Persistence
  • CouchDBPrimary datastore for app definitions, rows and metadata; the hosting image is a customized CouchDB build.
  • RedisCaching, session storage and distributed locks via ioredis and redlock in backend-core.
Infrastructure & Deploy
  • Dockerhosting/docker-compose.yaml composes the server, worker, CouchDB, proxy and Redis containers for self-hosted installs.
  • KubernetesA Helm chart under charts/budibase, with chart-testing config, supports cluster deployments.(inferred)
Tooling, Testing & Ops
  • Vercel AI SDKPowers the agent chat and tool-calling surfaces (ai plus @ai-sdk/svelte) that frontend-core exposes to the builder.
  • LiteLLMSelf-hosted proxy configuration (litellm_config.yaml) that normalizes calls to different AI model providers for Budibase agents.(inferred)

Budibase architecture diagram

Open SVG
Budibase architecture diagramBuilder → Proxy (HTTPS); Published apps → Proxy (HTTPS); Proxy → Server (/api); Proxy → Worker (/worker); Server → CouchDB (nano · pouchdb); Worker → CouchDB (nano); Server → Redis (enqueue); Redis → Automations (jobs); Server → External sources (datasources)CLIENTSSERVICESWORKERS & JOBSDATA & STORAGEEXTERNALBuilderSvelte · bbuiPublished appsSvelte clientProxyhosting proxyServerKoa · isolated-vmWorkerKoa · backend-coreAutomationsisolated-vm · BullCouchDBapps · rows · metadataRediscache · locks · queueExternal sourcesSQL / NoSQL · AI/api/workerHTTPSHTTPSjobsnano · pouchdbnanoenqueuedatasources
How the main components of Budibase connect, drawn from the audited repository.
Diagram as text
  • Builder (Svelte · bbui) → Proxy (hosting proxy): HTTPS
  • Published apps (Svelte client) → Proxy (hosting proxy): HTTPS
  • Proxy (hosting proxy) → Server (Koa · isolated-vm): /api
  • Proxy (hosting proxy) → Worker (Koa · backend-core): /worker
  • Server (Koa · isolated-vm) → CouchDB (apps · rows · metadata): nano · pouchdb
  • Worker (Koa · backend-core) → CouchDB (apps · rows · metadata): nano
  • Server (Koa · isolated-vm) → Redis (cache · locks · queue): enqueue
  • Redis (cache · locks · queue) → Automations (isolated-vm · Bull): jobs
  • Server (Koa · isolated-vm) → External sources (SQL / NoSQL · AI): datasources

Key architectural decisions

5 decisions
  1. 01

    The product pivoted from "low-code apps" to "AI agents, automations and apps"

    The README and package topics (ai-app-builder, ai-applications alongside low-code, crud-app) describe Budibase as an operations platform for agents, automations and apps; the frontend-core package pulls in the Vercel AI SDK and hosting/ ships a LiteLLM proxy config, layered on top of the original low-code app builder.

  2. 02

    CouchDB is the system of record; external SQL/NoSQL sources are a separate layer

    backend-core depends on @budibase/nano and pouchdb/pouchdb-find to talk to the bundled CouchDB, which stores app definitions, users and table rows. Connecting a user's own PostgreSQL, MySQL or other database is a distinct 'datasource' integration, not the system database.

  3. 03

    Server, worker and builder are separate deployable packages sharing typed core libraries

    packages/server (the API and automation engine) and packages/worker (background jobs, global config) are independent Koa apps with their own Dockerfiles, both depending on packages/backend-core, packages/shared-core and packages/types for shared logic and typings, so the two processes can be scaled independently.

  4. 04

    Automation and binding code runs inside isolated-vm, not the main process

    packages/worker and packages/server depend on isolated-vm (^6.0.1) to execute user-authored JavaScript (automation steps, handlebars helpers via string-templates) in a V8 isolate rather than Node's main context.

  5. 05

    Nx and Lerna both configure the same yarn workspace

    nx.json defines the task graph and caching for the monorepo, while lerna.json is still present for legacy versioning/publish flows; scripts like build invoke lerna run build --stream rather than a bare nx command.

How Budibase is built

How Budibase is structured

The repository is a yarn workspace under packages/, orchestrated by both Nx (nx.json, per-package nx.targets build dependency graphs) and Lerna (lerna.json, still driving the build/build:npm/build:apps scripts via lerna run --stream). The core split is: packages/builder (the Svelte design-time app builder), packages/client (the Svelte runtime that published apps embed), packages/bbui (shared Svelte UI kit wrapping Adobe Spectrum CSS), packages/frontend-core (shared frontend utilities and AI/agent chat logic used by both builder and client), packages/server (the Koa API, automation engine and data layer), packages/worker (Koa background service for jobs and global/tenant config), packages/backend-core (shared server-side libraries for auth, storage, CouchDB, Redis and queues), packages/sdk (a published API SDK built with Rollup), packages/string-templates (a Handlebars wrapper for templating), and packages/shared-core/packages/types for cross-cutting logic and TypeScript types. packages/pro holds enterprise features layered on the same structure.

Frontend

The builder (packages/builder) is a Svelte SPA built with routify for routing and Vite for bundling; its binding, JavaScript and JSON editors are built on CodeMirror (codemirror plus @codemirror/lang-* packages), and flow-style views use @xyflow/svelte and @dagrejs/dagre for layout. packages/client is the runtime that compiled Budibase apps ship to end users, published as budibase-client.js and also built with Vite. Both depend on packages/bbui, which wraps @spectrum-css/* primitives (Adobe's Spectrum design system) into Svelte components, and on packages/frontend-core, which adds shared data-fetching utilities plus ai/@ai-sdk/svelte for the AI agent chat surfaces and socket.io-client for realtime updates from the server.

Backend & APIs

packages/server and packages/worker are both Koa applications (koa, @koa/router), sharing packages/backend-core for cross-cutting concerns: authentication (koa-passport with Google OAuth and OpenID Connect strategies), CouchDB access (@budibase/nano, pouchdb, pouchdb-find), Redis (ioredis, redlock for distributed locks), and background jobs (bull, backed by Redis). Automation steps and user-authored bindings run inside isolated-vm, a V8 isolate sandbox, so untrusted scripts do not execute in the main server or worker process. External data sources (PostgreSQL, MySQL, MS SQL, and others) are reached through Knex as a SQL query builder, kept separate from the CouchDB system database that stores Budibase's own app definitions.

Data & persistence

CouchDB is the system-of-record: hosting/couchdb/Dockerfile builds a customized CouchDB image, and backend-core talks to it via @budibase/nano and pouchdb/pouchdb-find. Redis, accessed through ioredis, provides caching, session storage and the backing store for Bull's job queues. Connections to a user's own external databases are a distinct integration layer built on Knex rather than part of the system database.

Build, test & deploy

The root package.json uses Jest for server/worker tests and Vitest for frontend packages (bbui, builder, client each run vitest run), with testcontainers available for integration tests that need real service dependencies. knip and madge check for unused exports and circular dependencies. Husky hooks (post-checkout, pre-commit, pre-push) and ESLint (flat config, eslint.config.mjs) gate commits. GitHub Actions workflows under .github/workflows (not individually enumerated in this audit) drive CI; scripts/build.js and scripts/build-single-image.sh produce the single-container distribution.

Self-hosting notes

hosting/docker-compose.yaml is the reference multi-container deployment, composing the server, worker, CouchDB and a proxy (per hosting/proxy/Dockerfile) alongside Redis; hosting/docker-compose.build.yaml, .dev.yaml and .redis-tls.yaml provide build, development and TLS-enabled variants. hosting/single builds a single-container image bundling all services (using budibase/database:2.1.0 as its base image argument) for simpler installs, and hosting/digitalocean provides a one-click deployment path. charts/budibase is a Helm chart, tested via ct.yaml, for Kubernetes installs.

What to copy (and what not to)

The server/worker split on a shared backend-core library is a clean way to scale the API and background-job layers independently without duplicating auth, storage or queue logic. Sandboxing user-authored automation code in isolated-vm rather than the host process is worth copying whenever a platform lets end users write and run their own scripts. Running both Nx and Lerna in the same repository is harder to justify going forward — it is a historical artifact of migrating build tooling, and a from-scratch project would likely pick one, not both.

Sources & repo audit

Audited
Sep 17, 2026
Commit
c024aad
License
NOASSERTION

Independent analysis of repository at github.com/Budibase/budibase. Spotted an inaccuracy? Use the claim form to request a correction.

Show this stack on your README or website
Tech stack of Budibase
[![Tech stack of Budibase on STACK IT FAST](https://stackitfast.com/badge/budibase.svg)](https://stackitfast.com/project/budibase)

Paste it into your README. It shows your current stack and links to this page.

Use this stack

Scaffold it with your agent

Paste this prompt into Claude Code, Cursor, Windsurf or AGY to start a project with Budibase's architecture.

  1. 1Copy the promptThe full markdown spec, with every layer and decision.
  2. 2Open your AI toolClaude Code, Cursor, Windsurf or Copilot, in a new repo.
  3. 3Paste and scaffoldUse it as the first instruction; review before you ship.
use-this-stack.md · 60 lines · 7.5 KB
# MISSION: Scaffold "Budibase" Production Architecture
You are an expert Senior Staff Software Architect and Full-Stack Engineer. Your mission is to scaffold and implement a production-grade, highly reliable, and modular codebase following the proven architecture of **Budibase**.
---
## 1. PROJECT SPECIFICATIONS & BENCHMARK
- **Reference Architecture**: Budibase
- **What It Does**: Budibase is an open-source, self-hostable platform for building AI agents, automations and internal business apps from a visual builder, backed by a Svelte builder/runtime, a Koa API and worker layer, and a CouchDB system database.
- **Domain & Category**: Internal Tool Builder
- **Production Scale**: 6-20 people
- **Development Mode**: CLASSIC
- **Architectural Rationale**: Splits the builder (Svelte), API/automation engine and background jobs (Koa) into independently deployable packages on shared CouchDB, while isolated-vm sandboxes user scripts and AI tool calls.
- **Live Website Reference**: https://budibase.com
- **Source Repository**: https://github.com/Budibase/budibase
---
## 2. PRODUCTION TECH STACK
- **Full Stack Array**: TypeScript, Svelte, Koa, CouchDB, Redis, Docker, Kubernetes, Vite
- **Primary Language(s)**: TypeScript, Svelte, JavaScript
- **License of the reference repo**: NOASSERTION
- **Frontend**: Svelte — Both the app builder (packages/builder) and the published app runtime (packages/client) are Svelte; bbui is the shared Svelte component library.; Vite — Bundles bbui, client and the frontend packages; builder combines it with routify for file-based routing.; CodeMirror — Powers the builder's binding, JavaScript and JSON editors (codemirror plus @codemirror/lang-* packages).
- **Backend & APIs**: Koa — Both packages/server and packages/worker are Koa applications, using @koa/router, koa-session and koa-passport for auth.; Node.js — Runtime for server, worker and CLI packages; version pinned for local development.; isolated-vm — Sandboxes JavaScript execution for automation bindings and scripting steps outside the main process.; Bull — Backs scheduled automations and background jobs in backend-core and worker, queued on Redis.
- **Data & persistence**: CouchDB — Primary datastore for app definitions, rows and metadata; the hosting image is a customized CouchDB build.; Redis — Caching, session storage and distributed locks via ioredis and redlock in backend-core.
- **Infrastructure & deploy**: Docker — hosting/docker-compose.yaml composes the server, worker, CouchDB, proxy and Redis containers for self-hosted installs.; Kubernetes — A Helm chart under charts/budibase, with chart-testing config, supports cluster deployments.
- **Tooling, testing & ops**: Vercel AI SDK — Powers the agent chat and tool-calling surfaces (ai plus @ai-sdk/svelte) that frontend-core exposes to the builder.; LiteLLM — Self-hosted proxy configuration (litellm_config.yaml) that normalizes calls to different AI model providers for Budibase agents.
---
## 3. KEY ARCHITECTURAL DECISIONS (audited from https://github.com/Budibase/budibase @ c024aad)
1. **The product pivoted from "low-code apps" to "AI agents, automations and apps"**: The README and package topics (ai-app-builder, ai-applications alongside low-code, crud-app) describe Budibase as an operations platform for agents, automations and apps; the frontend-core package pulls in the Vercel AI SDK and hosting/ ships a LiteLLM proxy config, layered on top of the original low-code app builder.
2. **CouchDB is the system of record; external SQL/NoSQL sources are a separate layer**: backend-core depends on @budibase/nano and pouchdb/pouchdb-find to talk to the bundled CouchDB, which stores app definitions, users and table rows. Connecting a user's own PostgreSQL, MySQL or other database is a distinct 'datasource' integration, not the system database.
3. **Server, worker and builder are separate deployable packages sharing typed core libraries**: packages/server (the API and automation engine) and packages/worker (background jobs, global config) are independent Koa apps with their own Dockerfiles, both depending on packages/backend-core, packages/shared-core and packages/types for shared logic and typings, so the two processes can be scaled independently.
4. **Automation and binding code runs inside isolated-vm, not the main process**: packages/worker and packages/server depend on isolated-vm (^6.0.1) to execute user-authored JavaScript (automation steps, handlebars helpers via string-templates) in a V8 isolate rather than Node's main context.
5. **Nx and Lerna both configure the same yarn workspace**: nx.json defines the task graph and caching for the monorepo, while lerna.json is still present for legacy versioning/publish flows; scripts like `build` invoke `lerna run build --stream` rather than a bare `nx` command.
---
## 4. NON-NEGOTIABLE ARCHITECTURAL GUARDRAILS
1. **Monorepo & Modular Separation**:
   - Structure as a Turborepo monorepo with strict package boundaries:
     - `apps/web`: Application UI, routing, layouts, and server endpoints.
     - `packages/ui`: Shared design tokens, CSS variables, and Radix UI primitive components.
     - `packages/db`: Database schemas, client singleton, declarative migrations, and seed scripts.
     - `packages/config`: Shared TypeScript, ESLint, and build configurations.
2. **Strict Type Safety & Zero `any` Policy**:
   - Enable `strict: true`, `noImplicitAny: true`, and `strictNullChecks: true`.
   - Validate ALL external inputs, API request bodies, and query parameters with **Zod** schemas before execution.
3. **Frontend & Rendering Guidelines**:
   - Utilize Vite 6 with TanStack Router for fully type-safe routing. Manage server state and caching via TanStack Query v5 with optimistic UI updates.
4. **Design System & Aesthetics**:
   - Keep every color, radius, shadow and font in a single token file (CSS variables) and consume tokens everywhere; never hardcode hex values in components.
   - Prefer crisp 1px borders and one subtle shadow scale over blurry default shadows. Pair one sans-serif for body/headings with one monospace for tags, badges, metrics, and code.
5. **Data Layer & Reliability**:
   - Write declarative schema definitions with foreign keys, composite indexes on queried filters, and automated timestamp triggers.
   - Use connection pooling and prepared statements for serverless database execution.
---
## 5. STEP-BY-STEP SCAFFOLDING ROADMAP
- **Phase 1: Workspace & Root Config**: Initialize package manager, monorepo configuration (`turbo.json`, `tsconfig.base.json`, `package.json`).
- **Phase 2: Database Schema & Client**: Set up the data layer (CouchDB, Redis): client, connection pool, models, and migration scripts.
- **Phase 3: Design Tokens & UI Primitives**: Build accessible `Button`, `Input`, `Card`, `Badge`, and layout wrappers inside `packages/ui`.
- **Phase 4: Core Application Routes & Handlers**: Implement primary authentication, user session handling, and application routes.
- **Phase 5: Quality Assurance & Build Verification**: Run `tsc --noEmit`, ESLint, Prettier, and smoke test suites to ensure zero compilation or runtime errors.
---
## 6. EXECUTION INSTRUCTIONS
1. Review all specifications, architectural guardrails, and stack choices above.
2. Present the full monorepo directory tree structure.
3. Systematically generate the complete, production-ready codebase according to the 5-phase roadmap above — starting with the root workspace setup, followed by the database schema, UI design system package, and full-stack application routes until the repository is fully scaffolded and ready to run.
Scaffolded something with this prompt?
Would you pick this stack for a internal tool builder project?

Frequently asked about Budibase

What is Budibase built with?

Budibase is a TypeScript/Svelte monorepo: the builder and published-app runtime are Svelte apps bundled with Vite, the server and worker are Koa services on Node.js, CouchDB is the system database, and Redis backs caching, sessions and Bull job queues.

Does Budibase need a backend, or can apps run standalone?

Budibase apps need the Budibase backend at runtime: packages/server serves the automation engine and data APIs, packages/worker handles background jobs and global configuration, and both depend on a CouchDB instance for app data.

Can I self-host Budibase?

Yes. hosting/docker-compose.yaml composes the server, worker, CouchDB, proxy and Redis containers, and charts/budibase provides a Helm chart for Kubernetes deployments, alongside single-container and DigitalOcean deployment scripts under hosting/.

How does Budibase run user-authored automation scripts safely?

Automation bindings and scripting steps execute inside isolated-vm, a V8 isolate sandbox, rather than in the main server or worker process, as declared in the worker and server package dependencies.

What powers Budibase's AI agent features?

The frontend-core package integrates the Vercel AI SDK (ai and @ai-sdk/svelte) for agent chat and tool-calling UI, and the hosting/ directory ships a LiteLLM proxy configuration to route agent requests to different underlying AI model providers.

One email a month: new deep dives and stack trends

New source-audited architectures, head-to-head comparisons and the monthly stack report. No spam, unsubscribe anytime.

use-this-stack.md