From 02eafb2ec2f2c4b3a4758f888790c2be92e036b0 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 27 Jan 2026 11:47:13 +0000 Subject: [PATCH 01/18] chore: add claude md file --- CLAUDE.md | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000000..4a40249591 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,132 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Documentation + +For comprehensive product documentation, features, and API references: https://nocodb.com/llms.txt + +## Project Overview + +NocoDB is an open-source Airtable alternative that turns any database into a smart spreadsheet. This is the enterprise edition (EE) monorepo. + +Key capabilities: +- Transforms MySQL, PostgreSQL, SQL Server, SQLite & MariaDB into collaborative spreadsheets +- Rich field types: text, numerical, date-time, relational (Links), formula-based +- Multiple views: Grid, Form, Calendar, Kanban, Gallery, Map +- Auto-generated REST APIs +- Automation: workflows, webhooks, scripts +- NocoAI for AI capabilities, NocoSync for external data integration +- MCP (Model Context Protocol) server support + +## Monorepo Structure + +- **packages/nocodb** - Backend (NestJS + TypeScript) +- **packages/nc-gui** - Frontend (Nuxt 3 + Vue 3) +- **packages/nocodb-sdk** - JavaScript/TypeScript SDK +- **packages/nocodb-sdk-v2** - V2 SDK +- **packages/nc-sql-executor** - SQL execution service +- **packages/noco-integrations** - Integration plugins (Slack, Discord, AWS, etc.) +- **packages/nc-knex-dialects** - Custom Knex dialects (Snowflake, Databricks) +- **tests/playwright** - E2E testing suite + +## Essential Commands + +```bash +# Installation (pnpm is enforced - npm/yarn will fail) +pnpm bootstrap # Full EE bootstrap +pnpm bootstrap:ce # Community Edition bootstrap + +# Development +pnpm start:backend # Backend at http://localhost:8080 +pnpm start:frontend # Frontend at http://localhost:3000 +pnpm start:sql-executor # SQL executor service + +# Database containers for testing +pnpm start:pg # Start PostgreSQL +pnpm stop:pg +pnpm start:mysql # Start MySQL +pnpm stop:mysql + +# E2E Testing +pnpm start:playwright:pg # Backend + Frontend for E2E (PostgreSQL) +pnpm start:playwright:pg:ee # Enterprise Edition E2E +``` + +### Backend (packages/nocodb) + +```bash +pnpm start # Dev mode with watch +pnpm watch:run:ee # EE dev build +pnpm build:ee # Production EE build +pnpm lint # ESLint +pnpm test:unit # Mocha unit tests +pnpm test:unit:pg:ee # Unit tests with PostgreSQL + EE +``` + +### Frontend (packages/nc-gui) + +```bash +pnpm dev # Nuxt dev server +pnpm dev:ee # EE frontend dev +pnpm build:ee # Production EE build +pnpm lint # ESLint +pnpm test # Vitest unit tests +``` + +## Architecture + +### Backend (NestJS) + +- **src/controllers/** - REST API controllers (~98 controllers) +- **src/models/** - Data models (Base, Model, View, Column, User, Integration, etc.) +- **src/services/** - Business logic +- **src/db/** - Database layer with BaseModelSqlv2, CustomKnex, formula evaluation +- **src/ee/, src/ee-on-prem/, src/ee-cloud/** - Enterprise Edition code +- **src/run/** - Entry points + +### Frontend (Nuxt + Vue) + +- **pages/** - Route-based pages +- **components/** - Vue components (~34 directories) +- **composables/** - Vue composables (~95 files) +- **store/** - Pinia stores +- **lang/** - i18n (42+ languages) +- **ee/** - Enterprise Edition features +- Uses hash-based routing (SPA mode) + +### Database Model Hierarchy + +``` +Workspace → Base → Model (Table) → Column + → View (Grid, Gallery, Form, Kanban, Calendar, Map) +``` + +## Key Environment Variables + +- `NC_DB` - Database connection string +- `EE=true` - Enable Enterprise Edition +- `NC_AUTH_JWT_SECRET` - JWT secret +- `NC_DISABLE_TELE` - Disable telemetry + +## Build Memory Issues + +For large builds that run out of memory: +```bash +NODE_OPTIONS="--max-old-space-size=8192" pnpm build:ee +``` + +## Git Workflow + +- **develop** - Main development branch (target for PRs) +- **master** - Stable release snapshots only +- Branch naming: `feat/`, `fix/`, `enhancement/` +- Commits follow [Conventional Commits](https://www.conventionalcommits.org/): `feat:`, `fix:`, `docs:`, `chore:`, etc. + +## Tech Stack + +- **Backend**: NestJS, Knex, Socket.io, Bull (job queue), Redis +- **Frontend**: Nuxt 3, Vue 3, Pinia, WindiCSS, Ant Design Vue +- **Databases**: SQLite (default), PostgreSQL, MySQL, Snowflake, Databricks +- **Build**: Rspack (backend), Vite (frontend) +- **Testing**: Mocha (backend unit), Vitest (frontend unit), Playwright (E2E) From 86979b3188672abfd194fed92868e45d7dc2da91 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 27 Jan 2026 11:47:14 +0000 Subject: [PATCH 02/18] fix: show only v3 bases for converting to managed app --- .../components/workspace/project/create/ManagedApp.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/workspace/project/create/ManagedApp.vue b/packages/nc-gui/components/workspace/project/create/ManagedApp.vue index a97e1dea62..2eefaf561d 100644 --- a/packages/nc-gui/components/workspace/project/create/ManagedApp.vue +++ b/packages/nc-gui/components/workspace/project/create/ManagedApp.vue @@ -1,5 +1,5 @@ + + + + diff --git a/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/index.vue b/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/index.vue new file mode 100644 index 0000000000..b985df03fb --- /dev/null +++ b/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/index.vue @@ -0,0 +1,240 @@ + + + + + diff --git a/packages/nc-gui/components/workspace/project/create/ManagedApp.vue b/packages/nc-gui/components/workspace/project/create/ManagedApp.vue index 2eefaf561d..264cccacee 100644 --- a/packages/nc-gui/components/workspace/project/create/ManagedApp.vue +++ b/packages/nc-gui/components/workspace/project/create/ManagedApp.vue @@ -168,7 +168,7 @@ const { formState, isLoading, submit } = useProvideFormBuilderHelper({ model: 'visibility', category: FORM_BUILDER_NON_CATEGORIZED, options: [ - { label: 'Public', value: 'public', icon: 'eye' }, + // { label: 'Public', value: 'public', icon: 'eye' }, { label: 'Private', value: 'private', icon: 'lock' }, { label: 'Unlisted', value: 'unlisted', icon: 'ncEyeOff' }, ], diff --git a/packages/nc-gui/store/base.ts b/packages/nc-gui/store/base.ts index 8816bf6849..c08f1f68ca 100644 --- a/packages/nc-gui/store/base.ts +++ b/packages/nc-gui/store/base.ts @@ -18,8 +18,16 @@ export const useBase = defineStore('baseStore', () => { const basesStore = useBases() + const managedApp = ref(null) + + const currentVersion = ref(null) + + const liveVersion = ref(null) + const isManagedAppMaster = ref(false) + const isManagedAppInstaller = ref(false) + const baseId = computed(() => { // In shared base mode, use activeProjectId from basesStore which has the correct base ID if (route.value.params.typeOrId === 'base') { @@ -268,6 +276,10 @@ export const useBase = defineStore('baseStore', () => { return `${basUrl}${projectPage ? `?page=${projectPage}` : ''}` } + const loadManagedApp = async () => {} + + const loadCurrentVersion = async () => {} + watch( () => route.value.params.baseType, (n) => { @@ -343,6 +355,12 @@ export const useBase = defineStore('baseStore', () => { isPrivateBase, showBaseAccessRequestOverlay, isManagedAppMaster, + isManagedAppInstaller, + managedApp, + loadManagedApp, + currentVersion, + liveVersion, + loadCurrentVersion, } }) From 834cd760dca17cc70892660389ecb70dab960d82 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 27 Jan 2026 11:47:14 +0000 Subject: [PATCH 04/18] fix: some ui changes --- .../components/dlg/ConvertToManagedApp.vue | 2 +- packages/nc-gui/components/nc/Modal.vue | 2 +- .../smartsheet/topbar/ManagedAppModal.vue | 87 +++++++------------ .../topbar/ManagedAppStatus/MenuItem.vue | 2 +- .../topbar/ManagedAppStatus/index.vue | 69 ++++++++++----- .../ManagedAppVersionDeploymentsModal.vue | 6 +- packages/nc-gui/store/base.ts | 6 ++ packages/nc-gui/utils/baseUtils.ts | 17 ++++ packages/nocodb-sdk/src/lib/dateTimeHelper.ts | 11 ++- 9 files changed, 112 insertions(+), 90 deletions(-) diff --git a/packages/nc-gui/components/dlg/ConvertToManagedApp.vue b/packages/nc-gui/components/dlg/ConvertToManagedApp.vue index 383415e633..d803ae517f 100644 --- a/packages/nc-gui/components/dlg/ConvertToManagedApp.vue +++ b/packages/nc-gui/components/dlg/ConvertToManagedApp.vue @@ -127,7 +127,7 @@ watch(visible, (isVisible) => { size="sm" height="auto" centered - wrap-class-name="nc-modal-convert-to-managed-app " + wrap-class-name="nc-modal-convert-to-managed-app" nc-modal-class-name="!p-0" >
diff --git a/packages/nc-gui/components/nc/Modal.vue b/packages/nc-gui/components/nc/Modal.vue index 7bcd3dc6b1..253bbd30aa 100644 --- a/packages/nc-gui/components/nc/Modal.vue +++ b/packages/nc-gui/components/nc/Modal.vue @@ -149,7 +149,7 @@ if (stopEventPropogation.value) {
@@ -256,7 +246,7 @@ watch(
-
+
-
- -
-
-
{{ deploymentStats.statistics?.totalDeployments || 0 }}
-
Total Installs
-
+
{{ deploymentStats.statistics?.totalDeployments || 0 }}
+
Total Installs
-
- -
-
-
{{ deploymentStats.statistics?.activeDeployments || 0 }}
-
Active
-
+
{{ deploymentStats.statistics?.activeDeployments || 0 }}
+
Active
-
- -
-
-
{{ deploymentStats.statistics?.failedDeployments || 0 }}
-
Failed
-
+
{{ deploymentStats.statistics?.failedDeployments || 0 }}
+
Failed
-
- -
-
-
{{ deploymentStats.statistics?.totalVersions || 0 }}
-
Versions
-
+
{{ deploymentStats.statistics?.totalVersions || 0 }}
+
Versions
@@ -545,7 +515,7 @@ watch( // Deployments Tab Styles .nc-deployments-content { - @apply p-6; + @apply px-6 pb-6; } .nc-deployments-loading { @@ -553,11 +523,11 @@ watch( } .nc-deployment-stats { - @apply grid grid-cols-4 gap-4 mb-6; + @apply grid grid-cols-4 mb-6; } .nc-stat-card { - @apply bg-nc-bg-gray-extralight border-1 border-nc-border-gray-light rounded-xl p-4 transition-all duration-200 hover:(border-nc-border-gray-medium shadow-hover); + @apply flex flex-col gap-1 items-center justify-center border-r-1 border-nc-border-gray-light last:border-r-0 p-4; } .nc-stat-icon-wrapper { @@ -569,11 +539,11 @@ watch( } .nc-stat-value { - @apply text-3xl font-bold text-nc-content-gray-emphasis leading-none; + @apply text-subHeading1 font-normal; } .nc-stat-label { - @apply text-xs font-medium text-nc-content-gray-subtle2 uppercase tracking-wide; + @apply text-captionSm text-nc-content-gray-muted uppercase; } .nc-version-list-wrapper { @@ -713,5 +683,10 @@ watch( diff --git a/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/MenuItem.vue b/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/MenuItem.vue index f8f6e02b08..ec297295bc 100644 --- a/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/MenuItem.vue +++ b/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/MenuItem.vue @@ -1,6 +1,6 @@ diff --git a/packages/nc-gui/components/dlg/ManagedApp/Header.vue b/packages/nc-gui/components/dlg/ManagedApp/Header.vue new file mode 100644 index 0000000000..a55de64a1b --- /dev/null +++ b/packages/nc-gui/components/dlg/ManagedApp/Header.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/packages/nc-gui/components/dlg/ManagedApp/Index.vue b/packages/nc-gui/components/dlg/ManagedApp/Index.vue new file mode 100644 index 0000000000..b0b857f37f --- /dev/null +++ b/packages/nc-gui/components/dlg/ManagedApp/Index.vue @@ -0,0 +1,59 @@ + + + + + + + diff --git a/packages/nc-gui/components/workspace/project/create/ManagedApp.vue b/packages/nc-gui/components/workspace/project/create/ManagedApp.vue index 264cccacee..fad9b47b3c 100644 --- a/packages/nc-gui/components/workspace/project/create/ManagedApp.vue +++ b/packages/nc-gui/components/workspace/project/create/ManagedApp.vue @@ -1,16 +1,22 @@ + + + + diff --git a/packages/nc-gui/components/dlg/ManagedApp/Index.vue b/packages/nc-gui/components/dlg/ManagedApp/Index.vue index b0b857f37f..cbaa578717 100644 --- a/packages/nc-gui/components/dlg/ManagedApp/Index.vue +++ b/packages/nc-gui/components/dlg/ManagedApp/Index.vue @@ -4,7 +4,7 @@ interface Props { modalSize: 'small' | 'medium' | 'large' | keyof typeof modalSizes title?: string subTitle?: string - variant?: 'convertToManagedApp' + variant?: 'draftOrPublish' contentClass?: string maskClosable?: boolean } @@ -19,7 +19,7 @@ const emits = defineEmits(['update:visible']) const vVisible = useVModel(props, 'visible', emits) -const { modalSize } = toRefs(props) +const { modalSize, variant } = toRefs(props)