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
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /tables/{tableId}/records | List records |
| POST | /tables/{tableId}/records | Create record |
| PATCH | /tables/{tableId}/records | Update record |
| DELETE | /tables/{tableId}/records | Delete 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:
- Design tables first — fields, types, relationships
- Create views — filter, sort, aggregate for specific use cases
- Expose via API — NocoDB handles this automatically
- 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.