NocoDB is a self-hostable, open-source Airtable alternative built as a TypeScript pnpm monorepo, pairing a NestJS and Knex backend that supports PostgreSQL, MySQL, and SQLite with a Nuxt-based Vue frontend for spreadsheet-style database views.
- Language
- TypeScript
- Database
- PostgreSQL
- Hosting
- Docker
- Running for
- 4 years 1 month
- Team
- 6-20 people
Why this architecture
The backend uses Knex as a database-agnostic query layer over pg, mysql2, and sqlite3 so the same NestJS service can target whichever database an operator already runs, while the frontend and SDK are separate workspace packages that let the grid UI and API client evolve without redeploying the whole app.
Tech stack by layer
10 technologies · audited Sep 17, 2026- VueImplements the nc-gui grid, form, and kanban view components.
- NuxtApplication framework wrapping the Vue frontend in packages/nc-gui.
- Vercel AI SDKPowers AI-assisted features in the frontend via the ai package and provider adapters.(inferred)
- NestJSStructures the nocodb backend service (controllers, modules, DI) in packages/nocodb.
- Vercel AI SDKBackend AI SDK integrations (@ai-sdk/openai, @ai-sdk/anthropic, and others) for AI-powered fields and automations.
- Socket.IOProvides realtime updates between the NestJS backend and connected clients.
- PostgreSQLSupported external database backend, connected through the pg driver.
- MySQLSupported external database backend, connected through the mysql2 driver.
- SQLiteDefault embedded database for the Docker quick-start and local development.
- RedisUsed for caching and throttler storage via nest-lab and ioredis.
NocoDB architecture diagram
Open SVGDiagram as text
- nc-gui (Nuxt · Vue) → nocodb backend (NestJS · Express): REST
- API clients (nocodb-sdk · REST) → nocodb backend (NestJS · Express): REST
- nc-gui (Nuxt · Vue) → Realtime (Socket.IO): live updates
- nocodb backend (NestJS · Express) → Database (SQLite / Postgres / MySQL (Knex)): Knex
- nocodb backend (NestJS · Express) → Redis (cache · throttling): cache
- nocodb backend (NestJS · Express) → Background jobs (Bull · schedule): enqueue
- nocodb backend (NestJS · Express) → AI providers (Vercel AI SDK): AI fields
Key architectural decisions
6 decisions- 01
Backend is a NestJS service with pluggable SQL drivers via Knex
packages/nocodb/package.json depends on @nestjs/core, @nestjs/common, and @nestjs/platform-express for the application structure, and on knex plus pg, mysql2, and sqlite3 as swappable database drivers, so the same backend targets Postgres, MySQL, or SQLite.
- 02
Frontend is a Nuxt application, not a plain Vue SPA
packages/nc-gui/package.json runs on nuxt dev and nuxt prepare (postinstall) rather than a bare Vite/Vue setup, and pulls in UnoCSS and ant-design-vue for styling and components alongside the custom grid and view UI.
- 03
BullMQ-family queueing and Redis-backed throttling handle background work
packages/nocodb/package.json lists bull for job queues and @nest-lab/throttler-storage-redis plus ioredis for rate limiting and caching, separating long-running import/export and automation jobs from the request/response cycle.
- 04
AI provider access goes through the Vercel AI SDK, not direct provider clients
packages/nocodb/package.json depends on the ai package plus @ai-sdk/openai, @ai-sdk/anthropic, @ai-sdk/google, @ai-sdk/azure, and other @ai-sdk/* adapters, giving AI-powered fields a single abstraction over multiple LLM providers.
- 05
The SDK is a separate published package consumed by both frontend and backend
packages/nocodb-sdk/package.json builds a standalone nocodb-sdk package (generated in part from a Swagger spec via swagger-typescript-api) that packages/nc-gui and packages/nocodb both depend on as a workspace package, keeping the API client in sync with the server.
- 06
Self-hosting is supported on Docker, DigitalOcean, and Helm/Kubernetes
The repository ships a .do/deploy.template.yaml for one-click DigitalOcean App Platform deployment and a charts/nocodb Helm chart for Kubernetes, in addition to the Docker Compose examples under docker-compose/.
How NocoDB is built
How NocoDB is structured
NocoDB is a pnpm workspace defined in pnpm-workspace.yaml, listing packages/nocodb-sdk, packages/nocodb-sdk-v2, packages/nc-gui, packages/nc-mail-templates, packages/nocodb, and packages/nc-secret-mgr as its member packages. packages/nocodb is the backend service, packages/nc-gui is the Nuxt-based frontend, and packages/nocodb-sdk is a generated TypeScript API client shared by both. The workspace also contains packages/noco-integrations for third-party service connectors, charts/nocodb for a Kubernetes Helm chart, docker-compose/ with example compose files, and .do/deploy.template.yaml for one-click deployment to DigitalOcean's App Platform.
Frontend
packages/nc-gui/package.json describes a Nuxt application ("dev": "nuxt dev", "postinstall": "nuxt prepare") rather than a plain Vue single-page app. Styling is handled by unocss (@unocss/nuxt, @unocss/preset-wind3, @unocss/preset-mini) alongside the ant-design-vue component library. Rich content editing uses the Tiptap ecosystem (@tiptap/vue-3, @tiptap/starter-kit, and numerous @tiptap/extension-* packages), diagram and flow views use @vue-flow/core, and charts use echarts via nuxt-echarts. AI-assisted UI features depend on @ai-sdk/react, part of the Vercel AI SDK. The frontend consumes the workspace's own nocodb-sdk and nocodb-sdk-v2 packages rather than hand-writing API calls.
Backend & APIs
packages/nocodb/package.json builds the backend on NestJS (@nestjs/common, @nestjs/core, @nestjs/platform-express, @nestjs/platform-socket.io, @nestjs/bull, @nestjs/schedule, @nestjs/throttler). Authentication uses Passport strategies (passport-jwt, passport-google-oauth20, passport-saml-metadata, @node-saml/passport-saml) and SAML/OIDC support (@govtechsg/passport-openidconnect). AI-powered fields and automations go through the Vercel AI SDK's ai package plus provider adapters (@ai-sdk/openai, @ai-sdk/anthropic, @ai-sdk/azure, @ai-sdk/google, @ai-sdk/groq, @ai-sdk/deepseek, @ai-sdk/amazon-bedrock) and the Model Context Protocol SDK (@modelcontextprotocol/sdk). Third-party integrations reach services like Slack (@slack/web-api), Jira (jira-client), Linear (@linear/sdk), and GitHub (@octokit/rest), and file storage backends include S3 (@aws-sdk/client-s3), Google Cloud Storage, and MinIO.
Data & persistence
The backend depends on knex (3.1.0) as its query builder, with pg, mysql2, and sqlite3 all listed as direct dependencies in packages/nocodb/package.json, letting Knex's driver abstraction route the same query layer to whichever database is configured. @databricks/sql, @clickhouse/client, and snowflake-sdk are also present, extending NocoDB's data-source connectors beyond the primary relational databases it runs on. Background job queuing uses bull (Redis-backed), and caching and rate-limit storage use ioredis together with @nest-lab/throttler-storage-redis and redlock for distributed locking.
Build, test & deploy
renovate.json at the repository root automates dependency update pull requests across the workspace. The backend is bundled with Rspack (@rspack/cli, @rspack/core) instead of Webpack directly, with a rspack.dev.config.js driving the watch:run scripts (including watch:run:mysql and watch:run:pg variants that boot the dev server against those databases specifically). Backend tests run on Jest (jest --runInBand --forceExit), while the SDK package (packages/nocodb-sdk) uses ts-jest. The frontend uses Vitest (@vitest/ui) for unit tests. CI workflows include jest-unit-test.yml, bats-test.yml for shell-script tests, ci-cd.yml for the main pipeline, and helm-release.yml for publishing the Helm chart.
Self-hosting notes
The README documents a Docker-with-SQLite quick start as the simplest self-hosting path, and the docker-compose/1_Auto_Upstall and docker-compose/examples directories provide ready-made Compose files for more complete setups. Beyond Docker, the repository provides a charts/nocodb Helm chart for Kubernetes deployments and a .do/deploy.template.yaml manifest for DigitalOcean's App Platform one-click deploy. Because the database layer is abstracted through Knex, self-hosters can start on the bundled SQLite database and later point the same backend at PostgreSQL or MySQL without changing application code, only connection configuration. Secret management for self-hosted instances is handled by a dedicated packages/nc-secret-mgr workspace package rather than being embedded directly in the main backend service, keeping credential handling isolated from the rest of the NestJS application.
Sources & repo audit
- Audited
- Sep 17, 2026
- Commit
- b2f7e0f
- License
- NOASSERTION
- packages/nocodb/package.json (NestJS, Knex, pg/mysql2/sqlite3, bull, ioredis)
- packages/nc-gui/package.json (Nuxt, UnoCSS, ant-design-vue)
- packages/nocodb-sdk/package.json (generated API client)
- pnpm-workspace.yaml (workspace packages and supply-chain settings)
Independent analysis of repository at github.com/nocodb/nocodb. Spotted an inaccuracy? Use the claim form to request a correction.
Show this stack on your README or website
[](https://stackitfast.com/project/nocodb)Paste it into your README. It shows your current stack and links to this page.
Scaffold it with your agent
Paste this prompt into Claude Code, Cursor, Windsurf or AGY to start a project with NocoDB's architecture.
- 1Copy the promptThe full markdown spec, with every layer and decision.
- 2Open your AI toolClaude Code, Cursor, Windsurf or Copilot, in a new repo.
- 3Paste and scaffoldUse it as the first instruction; review before you ship.
# MISSION: Scaffold "NocoDB" 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 **NocoDB**.
---
## 1. PROJECT SPECIFICATIONS & BENCHMARK
- **Reference Architecture**: NocoDB
- **What It Does**: NocoDB is a self-hostable, open-source Airtable alternative built as a TypeScript pnpm monorepo, pairing a NestJS and Knex backend that supports PostgreSQL, MySQL, and SQLite with a Nuxt-based Vue frontend for spreadsheet-style database views.
- **Domain & Category**: Smart Database Spreadsheet
- **Production Scale**: 6-20 people
- **Development Mode**: HYBRID
- **Architectural Rationale**: The backend uses Knex as a database-agnostic query layer over pg, mysql2, and sqlite3 so the same NestJS service can target whichever database an operator already runs, while the frontend and SDK are separate workspace packages that let the grid UI and API client evolve without redeploying the whole app.
- **Live Website Reference**: https://nocodb.com
- **Source Repository**: https://github.com/nocodb/nocodb
---
## 2. PRODUCTION TECH STACK
- **Full Stack Array**: TypeScript, Vue, Nuxt, NestJS, PostgreSQL, MySQL, SQLite, Redis, Socket.IO, Docker
- **Primary Language(s)**: TypeScript, Vue, JavaScript
- **License of the reference repo**: NOASSERTION
- **Frontend**: Vue — Implements the nc-gui grid, form, and kanban view components.; Nuxt — Application framework wrapping the Vue frontend in packages/nc-gui.; Vercel AI SDK — Powers AI-assisted features in the frontend via the ai package and provider adapters.
- **Backend & APIs**: NestJS — Structures the nocodb backend service (controllers, modules, DI) in packages/nocodb.; Vercel AI SDK — Backend AI SDK integrations (@ai-sdk/openai, @ai-sdk/anthropic, and others) for AI-powered fields and automations.; Socket.IO — Provides realtime updates between the NestJS backend and connected clients.
- **Data & persistence**: PostgreSQL — Supported external database backend, connected through the pg driver.; MySQL — Supported external database backend, connected through the mysql2 driver.; SQLite — Default embedded database for the Docker quick-start and local development.; Redis — Used for caching and throttler storage via nest-lab and ioredis.
- **Infrastructure & deploy**: Docker — Documented as the primary self-hosting method, including a SQLite-only quick-start image.; pnpm — Package manager for the workspace, enforced via a preinstall guard.
---
## 3. KEY ARCHITECTURAL DECISIONS (audited from https://github.com/nocodb/nocodb @ b2f7e0f)
1. **Backend is a NestJS service with pluggable SQL drivers via Knex**: packages/nocodb/package.json depends on @nestjs/core, @nestjs/common, and @nestjs/platform-express for the application structure, and on knex plus pg, mysql2, and sqlite3 as swappable database drivers, so the same backend targets Postgres, MySQL, or SQLite.
2. **Frontend is a Nuxt application, not a plain Vue SPA**: packages/nc-gui/package.json runs on nuxt dev and nuxt prepare (postinstall) rather than a bare Vite/Vue setup, and pulls in UnoCSS and ant-design-vue for styling and components alongside the custom grid and view UI.
3. **BullMQ-family queueing and Redis-backed throttling handle background work**: packages/nocodb/package.json lists bull for job queues and @nest-lab/throttler-storage-redis plus ioredis for rate limiting and caching, separating long-running import/export and automation jobs from the request/response cycle.
4. **AI provider access goes through the Vercel AI SDK, not direct provider clients**: packages/nocodb/package.json depends on the ai package plus @ai-sdk/openai, @ai-sdk/anthropic, @ai-sdk/google, @ai-sdk/azure, and other @ai-sdk/* adapters, giving AI-powered fields a single abstraction over multiple LLM providers.
5. **The SDK is a separate published package consumed by both frontend and backend**: packages/nocodb-sdk/package.json builds a standalone nocodb-sdk package (generated in part from a Swagger spec via swagger-typescript-api) that packages/nc-gui and packages/nocodb both depend on as a workspace package, keeping the API client in sync with the server.
6. **Self-hosting is supported on Docker, DigitalOcean, and Helm/Kubernetes**: The repository ships a .do/deploy.template.yaml for one-click DigitalOcean App Platform deployment and a charts/nocodb Helm chart for Kubernetes, in addition to the Docker Compose examples under docker-compose/.
---
## 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**:
- Isolate interactive UI state to leaf components. Keep core pages lightweight and performant.
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 (PostgreSQL, MySQL, SQLite, 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.Frequently asked about NocoDB
What tech stack does NocoDB use?
NocoDB is a TypeScript pnpm monorepo with a NestJS backend (packages/nocodb) using Knex over PostgreSQL, MySQL, or SQLite, and a Nuxt/Vue frontend (packages/nc-gui) styled with UnoCSS and ant-design-vue.
Does NocoDB need PostgreSQL, or can it run on SQLite?
Either. packages/nocodb/package.json bundles pg, mysql2, and sqlite3 drivers side by side through Knex, and the documented Docker quick-start runs entirely on SQLite.
Can NocoDB be self-hosted?
Yes. It ships Docker images, a docker-compose/ setup, a .do/deploy.template.yaml for DigitalOcean App Platform, and a charts/nocodb Helm chart for Kubernetes.
Does NocoDB support realtime updates?
Yes, the NestJS backend in packages/nocodb depends on Socket.IO for pushing realtime changes to connected clients.
Does NocoDB have built-in AI features?
It integrates the Vercel AI SDK (the ai package) with provider adapters like @ai-sdk/openai, @ai-sdk/anthropic, and @ai-sdk/google in packages/nocodb, and @ai-sdk/react in the frontend.
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.
Similar architectures
- ToolJetHybridLow-Code Developer Tool Platform · 6-20 peopleShares TypeScript · NestJS · PostgreSQL
- GiteaClassicLightweight Self-Hosted Git Service · 20+ peopleShares TypeScript · Vue · SQLite
- BaserowHybridNo-Code Database Platform · 6-20 peopleShares PostgreSQL · Vue · Nuxt
- NextcloudClassicSelf-Hosted Collaborative Productivity Suite · 20+ peopleShares TypeScript · Vue · MySQL
- AutheliaClassicAuthentication & SSO Proxy Companion · 6-20 PeopleShares TypeScript · PostgreSQL · MySQL
- PrismaClassicNext-Generation Node.js & TypeScript ORM · 1M+ MAUShares TypeScript · PostgreSQL · MySQL