Skip to content

Commit 4e66b3e

Browse files
authored
Merge pull request #53 from efdevcon/faq
Faq + NocoDB with REST
2 parents 6852dae + a71b526 commit 4e66b3e

9 files changed

Lines changed: 1041 additions & 108 deletions

File tree

devcon/docs/nocodb-forms.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ Both routes render the same `FormPage` component. OTP is enforced if the viewId
2323
## How it works
2424

2525
1. Page fetches `/api/nocodb/{viewId}/schema/` to get form title + fields
26-
2. Schema API queries NocoDB's PostgreSQL meta DB (`nocodb-meta.ts`) to resolve viewId → base/table/fields
27-
3. Form fields (order, visibility, labels, required) come from `nc_form_view_columns_v2`
26+
2. Schema API calls NocoDB's REST meta endpoints (`nocodb-meta.ts`) to resolve viewId → base/table/fields
27+
3. Form fields (order, visibility, labels, required) come from `GET /api/v1/db/meta/views/:viewId/columns`
2828
4. Submissions go to `/api/nocodb/{viewId}/submit/` which uses the NocoDB SDK for row CRUD
2929

3030
## Key files
3131

32-
- `src/services/nocodb-meta.ts`PostgreSQL queries against NocoDB meta DB
32+
- `src/services/nocodb-meta.ts`REST meta API wrapper (form view + fields resolution)
3333
- `src/services/nocodb.ts` — NocoDB SDK wrapper (CRUD operations)
3434
- `src/config/nocodb-forms.ts` — slug → viewId mapping + flags
3535
- `src/components/domain/nocodb-form/FormPage.tsx` — shared form UI
@@ -45,6 +45,5 @@ Both routes render the same `FormPage` component. OTP is enforced if the viewId
4545

4646
## Environment
4747

48-
- `NOCODB_META_DB_URL` — PostgreSQL connection to NocoDB meta database
49-
- `NOCODB_BASE_URL` — NocoDB API base URL (for row CRUD)
48+
- `NOCODB_BASE_URL` — NocoDB API base URL (used for both meta and row CRUD)
5049
- `NOCODB_API_TOKEN` — NocoDB API token

devcon/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
"nodemailer": "^6.7.2",
8686
"openai": "4.95.1",
8787
"panzoom": "^9.4.3",
88-
"pg": "^8.12.0",
8988
"qrcode.react": "^1.0.1",
9089
"query-string": "^7.1.0",
9190
"rate-limiter-flexible": "^5.0.3",
@@ -130,7 +129,6 @@
130129
"@types/matter-js": "^0.19.6",
131130
"@types/node": "^20.10.5",
132131
"@types/nodemailer": "^6.4.4",
133-
"@types/pg": "^8.11.8",
134132
"@types/react": "^19",
135133
"@types/react-dom": "^19",
136134
"@types/react-slick": "^0.23.11",
Lines changed: 16 additions & 0 deletions
Loading

devcon/src/config/nocodb-forms.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export interface NocodbFormConfig {
55

66
export const nocodbForms: Record<string, NocodbFormConfig> = {
77
'student-application': {
8-
formViewId: 'vwgfemz67zunzvyo',
8+
formViewId: 'vwuuzk50m1lz4vkf',
99
requireOtp: true,
1010
},
1111
}

0 commit comments

Comments
 (0)