Skip to main content

Data Layer — NocoDB

The data layer is the source of truth for every OpenDart application. NocoDB sits on top of PostgreSQL and exposes all data through two access paths: REST API and MCP.

REST API

Every table, view, and query in NocoDB is automatically exposed as a RESTful endpoint. This is the primary access path for Flutter applications and n8n workflows.

Base URL

https://[your-nocodb-instance]/api/v2/

Common Endpoints

MethodEndpointPurpose
GET/tables/{tableId}/recordsList records
POST/tables/{tableId}/recordsCreate record
PATCH/tables/{tableId}/recordsUpdate record
DELETE/tables/{tableId}/recordsDelete record
GET/tables/{tableId}/views/{viewId}Query a view

Authentication

All API requests require an API token or JWT, configurable per table or project in NocoDB.

MCP Access

NocoDB supports the Model Context Protocol, allowing AI agents to discover and interact with the database schema semantically. This means an AI can:

  • List all available tables and their columns
  • Query records using natural language
  • Understand relationships between tables
  • Create, read, update, and delete data

MCP Endpoint

https://[your-nocodb-instance]/api/v2/mcp

Schema Design Philosophy

Every application starts with the data model:

  1. Design tables first — fields, types, relationships
  2. Create views — filter, sort, aggregate for specific use cases
  3. Expose via API — NocoDB handles this automatically
  4. Consume from Flutter & n8n — both talk the same REST API

Flutter does not need to go through n8n to reach data, and n8n does not need Flutter to trigger automation. NocoDB is the shared communication layer — everything else connects to it independently.