Browse Source

docs: draft 01

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/6467/head
Raju Udava 1 year ago
parent
commit
61a211ee99
  1. 465
      packages/noco-docs/docs/020.getting-started/010.installation.md
  2. 5
      packages/noco-docs/docs/020.getting-started/010.overview.md
  3. 64
      packages/noco-docs/docs/020.getting-started/020.environment-variables.md
  4. 72
      packages/noco-docs/docs/020.getting-started/030.upgrading.md
  5. 2
      packages/noco-docs/docs/020.getting-started/_category_.json
  6. 101
      packages/noco-docs/docs/030.setup-and-usages/010.dashboard.md
  7. 204
      packages/noco-docs/docs/030.setup-and-usages/020.table-operations.md
  8. 133
      packages/noco-docs/docs/030.setup-and-usages/030.column-operations.md
  9. 376
      packages/noco-docs/docs/030.setup-and-usages/040.column-types.md
  10. 43
      packages/noco-docs/docs/030.setup-and-usages/050.code-snippets.md
  11. 77
      packages/noco-docs/docs/030.setup-and-usages/060.link-to-another-record.md
  12. 103
      packages/noco-docs/docs/030.setup-and-usages/061.links.md
  13. 37
      packages/noco-docs/docs/030.setup-and-usages/070.lookup.md
  14. 39
      packages/noco-docs/docs/030.setup-and-usages/080.rollup.md
  15. 130
      packages/noco-docs/docs/030.setup-and-usages/090.formulas.md
  16. 35
      packages/noco-docs/docs/030.setup-and-usages/100.primary-key.md
  17. 41
      packages/noco-docs/docs/030.setup-and-usages/110.display-value.md
  18. 37
      packages/noco-docs/docs/030.setup-and-usages/120.sync-schema.md
  19. 92
      packages/noco-docs/docs/030.setup-and-usages/130.share-base.md
  20. 31
      packages/noco-docs/docs/030.setup-and-usages/140.share-view.md
  21. 53
      packages/noco-docs/docs/030.setup-and-usages/150.keyboard-maneuver.md
  22. 84
      packages/noco-docs/docs/030.setup-and-usages/160.views.md
  23. 70
      packages/noco-docs/docs/030.setup-and-usages/170.account-settings.md
  24. 14
      packages/noco-docs/docs/030.setup-and-usages/180.languages.md
  25. 33
      packages/noco-docs/docs/030.setup-and-usages/190.expanded-form.md
  26. 83
      packages/noco-docs/docs/030.setup-and-usages/200.import-airtable-to-sql-database-within-a-minute-for-free.md
  27. 44
      packages/noco-docs/docs/030.setup-and-usages/210.usage-information.md
  28. 98
      packages/noco-docs/docs/030.setup-and-usages/230.team-and-auth.md
  29. 67
      packages/noco-docs/docs/030.setup-and-usages/240.meta-management.md
  30. 14
      packages/noco-docs/docs/030.setup-and-usages/250.audit.md
  31. 18
      packages/noco-docs/docs/030.setup-and-usages/260.project-settings.md
  32. 5
      packages/noco-docs/docs/030.workspaces/010.overview.md
  33. 3
      packages/noco-docs/docs/030.workspaces/020.create.md
  34. 3
      packages/noco-docs/docs/030.workspaces/040.delete.md
  35. 3
      packages/noco-docs/docs/030.workspaces/050.configurations.md
  36. 2
      packages/noco-docs/docs/030.workspaces/_category_.json
  37. 3
      packages/noco-docs/docs/040.bases/010.base-overview.md
  38. 3
      packages/noco-docs/docs/040.bases/020.create-base.md
  39. 3
      packages/noco-docs/docs/040.bases/060.create-base-using-template.md
  40. 3
      packages/noco-docs/docs/040.bases/070.import-base-from-airtable.md
  41. 3
      packages/noco-docs/docs/040.bases/080.delete-base.md
  42. 3
      packages/noco-docs/docs/040.bases/090.actions-on-base.md
  43. 2
      packages/noco-docs/docs/040.bases/_category_.json
  44. 32
      packages/noco-docs/docs/040.developer-resources/010.accessing-apis.md
  45. 267
      packages/noco-docs/docs/040.developer-resources/020.rest-apis.md
  46. 68
      packages/noco-docs/docs/040.developer-resources/030.sdk.md
  47. 491
      packages/noco-docs/docs/040.developer-resources/040.webhooks.md
  48. 138
      packages/noco-docs/docs/040.developer-resources/050.upload-via-api.md
  49. 16
      packages/noco-docs/docs/050.engineering/010.architecture.md
  50. 23
      packages/noco-docs/docs/050.engineering/020.repository-structure.md
  51. 50
      packages/noco-docs/docs/050.engineering/030.development-setup.md
  52. 189
      packages/noco-docs/docs/050.engineering/040.unit-testing.md
  53. 218
      packages/noco-docs/docs/050.engineering/050.playwright.md
  54. 164
      packages/noco-docs/docs/050.engineering/060.builds-and-releases.md
  55. 78
      packages/noco-docs/docs/050.engineering/070.translation.md
  56. 3
      packages/noco-docs/docs/050.tables/010.table-overview.md
  57. 3
      packages/noco-docs/docs/050.tables/020.create.md
  58. 3
      packages/noco-docs/docs/050.tables/040.duplicate.md
  59. 3
      packages/noco-docs/docs/050.tables/050.delete.md
  60. 3
      packages/noco-docs/docs/050.tables/060.import-csv.md
  61. 3
      packages/noco-docs/docs/050.tables/070.import-excel.md
  62. 3
      packages/noco-docs/docs/050.tables/080.import-json.md
  63. 3
      packages/noco-docs/docs/050.tables/090.import-data.md
  64. 3
      packages/noco-docs/docs/050.tables/100.configurations.md
  65. 2
      packages/noco-docs/docs/050.tables/_category_.json
  66. 3
      packages/noco-docs/docs/060.fields/010.fields-overview.md
  67. 3
      packages/noco-docs/docs/060.fields/020.create.md
  68. 3
      packages/noco-docs/docs/060.fields/040.duplicate.md
  69. 3
      packages/noco-docs/docs/060.fields/050.delete.md
  70. 3
      packages/noco-docs/docs/060.fields/060.configurations.md
  71. 5
      packages/noco-docs/docs/060.fields/_category_.json
  72. 3
      packages/noco-docs/docs/070.records/010.rows-overview.md
  73. 3
      packages/noco-docs/docs/070.records/020.create.md
  74. 3
      packages/noco-docs/docs/070.records/040.duplicate.md
  75. 3
      packages/noco-docs/docs/070.records/050.delete.md
  76. 3
      packages/noco-docs/docs/070.records/060.comments.md
  77. 3
      packages/noco-docs/docs/070.records/070.configurations.md
  78. 5
      packages/noco-docs/docs/070.records/_category_.json
  79. 3
      packages/noco-docs/docs/080.views/010.overview.md
  80. 3
      packages/noco-docs/docs/080.views/020.create.md
  81. 3
      packages/noco-docs/docs/080.views/040.duplicate.md
  82. 3
      packages/noco-docs/docs/080.views/050.delete.md
  83. 3
      packages/noco-docs/docs/080.views/060.configurations.md
  84. 3
      packages/noco-docs/docs/080.views/090.view-types/010.grid.md
  85. 3
      packages/noco-docs/docs/080.views/090.view-types/020.gallery.md
  86. 3
      packages/noco-docs/docs/080.views/090.view-types/030.forms.md
  87. 3
      packages/noco-docs/docs/080.views/090.view-types/040.kanban.md
  88. 5
      packages/noco-docs/docs/080.views/090.view-types/_category_.json
  89. 5
      packages/noco-docs/docs/080.views/_category_.json
  90. 3
      packages/noco-docs/docs/090.collaboration/010.overview.md
  91. 5
      packages/noco-docs/docs/090.collaboration/_category_.json
  92. 3
      packages/noco-docs/docs/100.permissions/010.overview.md
  93. 5
      packages/noco-docs/docs/100.permissions/_category_.json
  94. 3
      packages/noco-docs/docs/110.automation/010.overview.md
  95. 5
      packages/noco-docs/docs/110.automation/020.Webhook/_category_.json
  96. 5
      packages/noco-docs/docs/110.automation/_category_.json
  97. 3
      packages/noco-docs/docs/120.account-settings/010.overview.md
  98. 5
      packages/noco-docs/docs/120.account-settings/_category_.json
  99. 0
      packages/noco-docs/docs/990.FAQs.md

465
packages/noco-docs/docs/020.getting-started/010.installation.md

@ -1,465 +0,0 @@
---
title: 'Installation'
description: 'Simple installation - takes about three minutes!'
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Simple installation - takes about three minutes!
## Prerequisites
- [Docker](https://www.docker.com/get-started) or [Node.js](https://nodejs.org/en/download) ( > v18.x )
## Quick try
### Docker
If you are a Docker user, you may try this way!
<Tabs>
<TabItem value="sqlite" label="SQLite">
```bash
docker run -d --name nocodb \
-v "$(pwd)"/nocodb:/usr/app/data/ \
-p 8080:8080 \
nocodb/nocodb:latest
```
</TabItem>
<TabItem value="mysql" label="MySQL">
```bash
docker run -d --name nocodb-mysql \
-v "$(pwd)"/nocodb:/usr/app/data/ \
-p 8080:8080 \
-e NC_DB="mysql2://host.docker.internal:3306?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
```
</TabItem>
<TabItem value="postgres" label="Postgres">
```bash
docker run -d --name nocodb-postgres \
-v "$(pwd)"/nocodb:/usr/app/data/ \
-p 8080:8080 \
-e NC_DB="pg://host.docker.internal:5432?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
```
</TabItem>
<TabItem value="sqlserver" label="SQL Server">
```bash
docker run -d --name nocodb-mssql \
-v "$(pwd)"/nocodb:/usr/app/data/ \
-p 8080:8080 \
-e NC_DB="mssql://host.docker.internal:1433?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
```
</TabItem>
</Tabs>
:::tip
To persist data in docker you can mount volume at `/usr/app/data/` since 0.10.6. In older version mount at `/usr/src/app`. Otherwise your data will be lost after recreating the container.
:::
:::tip
If you plan to input some special characters, you may need to change the character set and collation yourself when creating the database. Please check out the examples for [MySQL Docker](https://github.com/nocodb/nocodb/issues/1340#issuecomment-1049481043).
:::
### Docker Compose
We provide different docker-compose.yml files under [this directory](https://github.com/nocodb/nocodb/tree/master/docker-compose). Here are some examples.
<Tabs>
<TabItem value="mysql" label="MySQL">
```bash
git clone https://github.com/nocodb/nocodb
cd nocodb/docker-compose/mysql
docker-compose up -d
```
</TabItem>
<TabItem value="postgres" label="Postgres">
```bash
git clone https://github.com/nocodb/nocodb
cd nocodb/docker-compose/pg
docker-compose up -d
```
</TabItem>
<TabItem value="sqlserver" label="SQL Server">
```bash
git clone https://github.com/nocodb/nocodb
cd nocodb/docker-compose/mssql
docker-compose up -d
```
</TabItem>
</Tabs>
:::tip
Tip 1: To persist data in docker you can mount volume at `/usr/app/data/` since 0.10.6. In older version mount at `/usr/src/app`.
:::
:::tip
Tip 2: If you plan to input some special characters, you may need to change the character set and collation yourself when creating the database. Please check out the examples for [MySQL Docker Compose](https://github.com/nocodb/nocodb/issues/1313#issuecomment-1046625974).
:::
### NPX
You can run below command if you need an interactive configuration.
```bash
npx create-nocodb-app
```
#### Preview:
<img width="587" alt="image" src="https://user-images.githubusercontent.com/35857179/161526235-5ee0d592-0105-4a57-aa53-b1048dca6aad.png" />
### Homebrew
```bash
brew tap nocodb/nocodb
brew install nocodb
nocodb
```
### Executables
You can download executables directly and run without any extra dependancy. Use the right command based on your platform.
##### MacOS (x64)
```bash
curl http://get.nocodb.com/macos-x64 -o nocodb -L \
&& chmod +x nocodb \
&& ./nocodb
```
##### MacOS (arm64)
```bash
curl http://get.nocodb.com/macos-arm64 -o nocodb -L \
&& chmod +x nocodb \
&& ./nocodb
```
##### Linux (x64)
```bash
curl http://get.nocodb.com/linux-x64 -o nocodb -L \
&& chmod +x nocodb \
&& ./nocodb
```
##### Linux (arm64)
```bash
curl http://get.nocodb.com/linux-arm64 -o nocodb -L \
&& chmod +x nocodb \
&& ./nocodb
```
##### Windows (x64)
```bash
iwr http://get.nocodb.com/win-x64.exe
.\Noco-win-x64.exe
```
##### Windows (arm64)
```bash
iwr http://get.nocodb.com/win-arm64.exe
.\Noco-win-arm64.exe
```
### Node Application
We provide a simple NodeJS Application for getting started.
```bash
git clone https://github.com/nocodb/nocodb-seed
cd nocodb-seed
npm install
npm start
```
### AWS ECS (Fargate)
<details>
<summary>Click to Expand</summary>
#### Create ECS Cluster
```
aws ecs create-cluster \
--cluster-name <YOUR_ECS_CLUSTER>
```
#### Create Log group
```
aws logs create-log-group \
--log-group-name /ecs/<YOUR_APP_NAME>/<YOUR_CONTAINER_NAME>
```
#### Create ECS Task Definiton
Every time you create it, it will add a new version. If it is not existing, the version will be 1.
```bash
aws ecs register-task-definition \
--cli-input-json "file://./<YOUR_TASK_DEF_NAME>.json"
```
:::tip
This json file defines the container specification. You can define secrets such as NC_DB and environment variables here.
:::
Here's the sample Task Definition
```json
{
"family": "nocodb-sample-task-def",
"networkMode": "awsvpc",
"containerDefinitions": [{
"name": "<YOUR_CONTAINER_NAME>",
"image": "nocodb/nocodb:latest",
"essential": true,
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/<YOUR_APP_NAME>/<YOUR_CONTAINER_NAME>",
"awslogs-region": "<YOUR_AWS_REGION>",
"awslogs-stream-prefix": "ecs"
}
},
"secrets": [{
"name": "<YOUR_SECRETS_NAME>",
"valueFrom": "<YOUR_SECRET_ARN>"
}],
"environment": [{
"name": "<YOUR_ENV_VARIABLE_NAME>",
"value": "<YOUR_ENV_VARIABLE_VALUE>"
}],
"portMappings": [{
"containerPort": 8080,
"hostPort": 8080,
"protocol": "tcp"
}]
}],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "256",
"memory": "512",
"executionRoleArn": "<YOUR_ECS_EXECUTION_ROLE_ARN>",
"taskRoleArn": "<YOUR_ECS_TASK_ROLE_ARN>"
}
```
#### Create ECS Service
```bash
aws ecs create-service \
--cluster <YOUR_ECS_CLUSTER> \
--service-name <YOUR_SERVICE_NAME> \
--task-definition <YOUR_TASK_DEF>:<YOUR_TASK_DEF_VERSION> \
--desired-count <DESIRED_COUNT> \
--launch-type "FARGATE" \
--platform-version <VERSION> \
--health-check-grace-period-seconds <GRACE_PERIOD_IN_SECOND> \
--network-configuration "awsvpcConfiguration={subnets=["<YOUR_SUBSETS>"], securityGroups=["<YOUR_SECURITY_GROUPS>"], assignPublicIp=ENABLED}" \
--load-balancer targetGroupArn=<TARGET_GROUP_ARN>,containerName=<CONTAINER_NAME>,containerPort=<YOUR_CONTAINER_PORT>
```
:::tip
If your service fails to start, you may check the logs in ECS console or in Cloudwatch. Generally it fails due to the connection between ECS container and NC_DB. Make sure the security groups have the correct inbound and outbound rules.
:::
</details>
### GCP (Cloud Run)
<details>
<summary>Click to Expand</summary>
#### Pull NocoDB Image on Cloud Shell
Since Cloud Run only supports images from Google Container Registry (GCR) or Artifact Registry, we need to pull NocoDB image, tag it and push it in GCP using Cloud Shell. Here are some sample commands which you can execute in Cloud Shell.
```bash
# pull latest NocoDB image
docker pull nocodb/nocodb:latest
# tag the image
docker tag nocodb/nocodb:latest gcr.io/<MY_PROJECT_ID>/nocodb/nocodb:latest
# push the image to GCR
docker push gcr.io/<MY_PROJECT_ID>/nocodb/nocodb:latest
```
#### Deploy NocoDB on Cloud Run
```bash
gcloud run deploy --image=gcr.io/<MY_PROJECT_ID>/nocodb/nocodb:latest \
--region=us-central1 \
--allow-unauthenticated \
--platform=managed
```
</details>
### DigitalOcean (App)
<details>
<summary>Click to Expand</summary>
#### Create Apps
On Home page, Click on Create icon & Select Apps (Deploy your code).
![Screenshot 2022-02-19 at 12 17 43 PM](https://user-images.githubusercontent.com/86527202/154790558-f8fe5580-5a58-412c-9c2e-145587712bf2.png)
#### Choose Source: Docker Hub
![Screenshot 2022-02-19 at 12 22 01 PM](https://user-images.githubusercontent.com/86527202/154790563-b5b6d5b4-0bdc-4718-8cea-0a7ee52f283b.png)
#### Choose Source: Repository
Configure Source Repository as `nocodb/nocodb`. Optionally you can pick release tag if you are interested in specific NocoDB version.
![Screenshot 2022-02-19 at 12 23 11 PM](https://user-images.githubusercontent.com/86527202/154790564-1dcb5e33-3a57-471a-a44c-835a410a0cb7.png)
#### [Optional] Additional Configurations
![Screenshot 2022-02-19 at 12 24 44 PM](https://user-images.githubusercontent.com/86527202/154790565-c0234b2e-ad50-4042-90b6-4f8798f1d585.png)
#### Name your web service
Pick a name for your NocoDB application. This name will become part of URL subsequently
Pick nearest Region for cloud hosting
![Screenshot 2022-02-19 at 12 28 11 PM](https://user-images.githubusercontent.com/86527202/154790567-a6e65e4e-9aa0-4edb-998e-da8803ad6e23.png)
#### Finalize and Launch
- Select hosting plan for your NocoDB application
- Click "Launch APP"
![Screenshot 2022-02-19 at 12 29 23 PM](https://user-images.githubusercontent.com/86527202/154790570-62044713-5cca-4d06-82ec-f3cc257218a1.png)
Application will be build & URL will be live in a minute! The URL will be something like https://simply-nocodb-rsyir.ondigitalocean.app/
</details>
### Cloudron
<details>
<summary>Click to Expand</summary>
#### Navigate to App Store
Log into Cloudron and select App Store
![image](https://user-images.githubusercontent.com/35857179/194700146-aae90503-a8fd-4bc5-8397-39f0bc279606.png)
#### Search NocoDB
![image](https://user-images.githubusercontent.com/35857179/194700181-b5303919-70b8-4cf8-bebe-7e75aca601f3.png)
#### Click Install
![image](https://user-images.githubusercontent.com/35857179/194700192-d702f5c2-2afa-45c5-9823-4ebe9e141b01.png)
#### Configure NocoDB
![image](https://user-images.githubusercontent.com/35857179/194700230-c35e934f-bd93-4948-8f31-935483b30571.png)
#### Go to My App and Launch NocoDB
![image](https://user-images.githubusercontent.com/35857179/194700464-50098cb1-bf94-42bb-a63a-cc0aad671913.png)
</details>
### CapRover
<details>
<summary>Click to Expand</summary>
#### Login and Click One-Click Apps / Databases
![image](https://user-images.githubusercontent.com/35857179/194701420-7fe5c396-a488-456c-98de-6f2ee1151fc5.png)
#### Search NocoDB
![image](https://user-images.githubusercontent.com/35857179/194701537-63e7efc5-013b-4ca9-8659-56e9d536e7d0.png)
#### Configure NocoDB and Deploy
![image](https://user-images.githubusercontent.com/35857179/194701576-19519df5-2aa4-435d-8fc6-7bc684b9cfe1.png)
</details>
### Railway
<details>
<summary>Click to Expand</summary>
#### Navigate to Templates
Go to [Templates](https://railway.app/templates), Search NocoDB and click Deploy
![image](https://user-images.githubusercontent.com/35857179/194702833-1bea22ee-6dfa-4024-ac27-e33fe56e5500.png)
#### Configure NocoDB and Deploy
![image](https://user-images.githubusercontent.com/35857179/194702960-149393fe-b00f-4d84-9e54-22cb7616ba44.png)
</details>
### FreeBSD / FreeNAS / TrueNAS Jail
See [here](https://gist.github.com/Zamana/e9281d736f9e9ce5882c6f4b140a590e) provided by [C. R. Zamana](https://github.com/Zamana).
## Sample Demos
### Code Sandbox
<iframe width="100%" height="500" src="https://codesandbox.io/embed/vigorous-firefly-80kq5?hidenavigation=1&theme=dark" title="Code Sandbox" frameBorder="0" allow="clipboard-write"></iframe>
### Docker deploying with one command
<iframe width="100%" height="500" src="https://www.youtube.com/embed/K-UEecQyiOk" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen></iframe>
### Using NPX
<iframe width="100%" height="500" src="https://www.youtube.com/embed/v6Nn75P1p7I" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen></iframe>

5
packages/noco-docs/docs/020.getting-started/010.overview.md

@ -0,0 +1,5 @@
---
title: 'Overview'
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

64
packages/noco-docs/docs/020.getting-started/020.environment-variables.md

@ -1,64 +0,0 @@
---
title: 'Environment Variables'
description: 'Environment Variables for NocoDB!'
hide_table_of_contents: true
---
For production usecases, it is **recommended** to configure
- `NC_DB`,
- `NC_AUTH_JWT_SECRET`,
- `NC_PUBLIC_URL`,
- `NC_REDIS_URL`
| Variable | Comments | If absent |
|---|---|---|
| NC_DB | See our example database URLs [here](https://github.com/nocodb/nocodb#docker). | A local SQLite will be created in root folder if `NC_DB` is not provided |
| NC_DB_JSON | Can be used instead of `NC_DB` and value should be valid knex connection JSON | |
| NC_DB_JSON_FILE | Can be used instead of `NC_DB` and value should be a valid path to knex connection JSON | |
| DATABASE_URL | JDBC URL Format. Can be used instead of NC_DB. | |
| DATABASE_URL_FILE | Can be used instead of DATABASE_URL: path to file containing JDBC URL Format. | |
| NC_AUTH_JWT_SECRET | JWT secret used for auth and storing other secrets | A random secret will be generated |
| PORT | For setting app running port | `8080` |
| DB_QUERY_LIMIT_DEFAULT | Default pagination limit | 25 |
| DB_QUERY_LIMIT_MAX | Maximum allowed pagination limit | 1000 |
| DB_QUERY_LIMIT_MIN | Minimum allowed pagination limit | 1 |
| NC_TOOL_DIR | App directory to keep metadata and app related files | Defaults to current working directory. In docker maps to `/usr/app/data/` for mounting volume. |
| NC_PUBLIC_URL | Used for sending Email invitations | Best guess from http request params |
| NC_JWT_EXPIRES_IN | JWT token expiry time | `10h` |
| NC_CONNECT_TO_EXTERNAL_DB_DISABLED | Disable Project creation with external database | |
| NC_INVITE_ONLY_SIGNUP | Removed since version 0.99.0 and now it's recommended to use [super admin settings menu](/setup-and-usages/account-settings#enable--disable-signup). Allow users to signup only via invite url, value should be any non-empty string. | |
| NUXT_PUBLIC_NC_BACKEND_URL | Custom Backend URL | ``http://localhost:8080`` will be used |
| NC_REQUEST_BODY_SIZE | Request body size [limit](https://expressjs.com/en/resources/middleware/body-parser.html#limit) | `1048576` |
| NC_EXPORT_MAX_TIMEOUT | After NC_EXPORT_MAX_TIMEOUT csv gets downloaded in batches | Default value 5000(in millisecond) will be used |
| NC_DISABLE_TELE | Disable telemetry | |
| NC_DASHBOARD_URL | Custom dashboard url path | `/dashboard` |
| NC_GOOGLE_CLIENT_ID | Google client id to enable google authentication | |
| NC_GOOGLE_CLIENT_SECRET | Google client secret to enable google authentication | |
| NC_MIGRATIONS_DISABLED | Disable NocoDB migration | |
| NC_MIN | If set to any non-empty string the default splash screen(initial welcome animation) and matrix screensaver will disable | |
| NC_SENTRY_DSN | For Sentry monitoring | |
| NC_REDIS_URL | Custom Redis URL. Example: `redis://:authpassword@127.0.0.1:6380/4` | Meta data will be stored in memory |
| NC_DISABLE_ERR_REPORT | Disable error reporting | |
| NC_DISABLE_CACHE | To be used only while debugging. On setting this to `true` - meta data be fetched from db instead of redis/cache. | `false` |
| AWS_ACCESS_KEY_ID | For Litestream - S3 access key id | If Litestream is configured and `NC_DB` is not present. SQLite gets backed up to S3 |
| AWS_SECRET_ACCESS_KEY | For Litestream - S3 secret access key | If Litestream is configured and `NC_DB` is not present. SQLite gets backed up to S3 |
| AWS_BUCKET | For Litestream - S3 bucket | If Litestream is configured and `NC_DB` is not present. SQLite gets backed up to S3 |
| AWS_BUCKET_PATH | For Litestream - S3 bucket path (like folder within S3 bucket) | If Litestream is configured and `NC_DB` is not present. SQLite gets backed up to S3 |
| NC_SMTP_FROM | For SMTP plugin - Email sender address | |
| NC_SMTP_HOST | For SMTP plugin - SMTP host value | |
| NC_SMTP_PORT | For SMTP plugin - SMTP port value | |
| NC_SMTP_USERNAME | For SMTP plugin (Optional) - SMTP username value for authentication | |
| NC_SMTP_PASSWORD | For SMTP plugin (Optional) - SMTP password value for authentication | |
| NC_SMTP_SECURE | For SMTP plugin (Optional) - To enable secure set value as `true` any other value treated as false | |
| NC_SMTP_IGNORE_TLS | For SMTP plugin (Optional) - To ignore tls set value as `true` any other value treated as false. For more info visit https://nodemailer.com/smtp/ | |
| NC_S3_BUCKET_NAME | For S3 storage plugin - AWS S3 bucket name | |
| NC_S3_REGION | For S3 storage plugin - AWS S3 region | |
| NC_S3_ACCESS_KEY | For S3 storage plugin - AWS access key credential for accessing resource | |
| NC_S3_ACCESS_SECRET | For S3 storage plugin - AWS access secret credential for accessing resource | |
| NC_ADMIN_EMAIL | For updating/creating super admin with provided email and password | |
| NC_ATTACHMENT_FIELD_SIZE | For setting the attachment field size(in Bytes) | Defaults to 20MB |
| NC_ADMIN_PASSWORD | For updating/creating super admin with provided email and password. Your password should have at least 8 letters with one uppercase, one number and one special letter(Allowed special chars $&+,:;=?@#\|'.^*()%!_-" ) | |
| NODE_OPTIONS | For passing Node.js [options](https://nodejs.org/api/cli.html#node_optionsoptions) to instance | |
| NC_MINIMAL_DBS | Create a new SQLite file for each project. All the db files are stored in `nc_minimal_dbs` folder in current working directory. (This option restricts project creation on external sources) | |
| NC_DISABLE_AUDIT | Disable Audit Log | `false` |
| NC_AUTOMATION_LOG_LEVEL | Possible Values: `OFF`, `ERROR`, `ALL`. See [Webhooks](/developer-resources/webhooks#call-log) for details. | `OFF` |

72
packages/noco-docs/docs/020.getting-started/030.upgrading.md

@ -1,72 +0,0 @@
---
title: 'Upgrading'
description: 'Upgrading NocoDB : Docker, Node and Homebrew!'
---
By default, if `NC_DB` is not specified upon [installation](/getting-started/installation), then SQLite will be used to store metadata. We suggest users to separate the metadata and user data in different databases as pictured in our [architecture](/engineering/architecture).
## Docker
### Find, Stop & Delete NocoDB Docker Container
```bash
# find NocoDB container ID
docker ps
# stop NocoDB container
docker stop <YOUR_CONTAINER_ID>
# delete NocoDB container
docker rm <YOUR_CONTAINER_ID>
```
Note: Deleting your docker container without setting `NC_DB` or mounting to a persistent volume for a default SQLite database will result in losing your data. See examples below.
### Find & Remove NocoDB Docker Image
```bash
# find NocoDB image
docker images
# delete NocoDB image
docker rmi <YOUR_IMAGE_ID>
```
### Pull the latest NocoDB image with same environment variables
```bash
docker run -d -p 8080:8080 \
-e NC_DB="<YOUR_NC_DB_URL>" \
-e NC_AUTH_JWT_SECRET="<YOUR_NC_AUTH_JWT_SECRET_IF_GIVEN>" \
nocodb/nocodb:latest
```
Updating nocodb docker container is similar to updating [any other docker containers](https://www.whitesourcesoftware.com/free-developer-tools/blog/update-docker-images/).
### Example: Docker Upgrade
![Screen Shot 2021-09-16 at 09 23 07](https://user-images.githubusercontent.com/5435402/133578984-53c6b96b-3e8b-4a96-b6c2-36f3c09ffdde.png)
## Node
Updating docker container is similar to updating a npm package.
From your root folder
#### Uninstall NocoDB package
```bash
npm uninstall nocodb
```
#### Install NocoDB package
```bash
npm install --save nocodb
```
## Homebrew
Run following commands to upgrade Homebrew Nocodb version.
```bash
# Update the local homebrew formulas
brew update
# Upgrade nocodb package
brew upgrade nocodb
```

2
packages/noco-docs/docs/020.getting-started/_category_.json

@ -1,5 +1,5 @@
{
"label": "Getting Started",
"collapsible": true,
"collapsed": false
"collapsed": true
}

101
packages/noco-docs/docs/030.setup-and-usages/010.dashboard.md

@ -1,101 +0,0 @@
---
title: 'Dashboard'
description: 'Accessing the Dashboard!'
---
## Setup Your First Super Admin
Once you have started NocoDB, you can visit the dashboard via `example.com`. You will be redirected to `example.com/#/signup`.
Enter your work email and your password.
![signup](https://github.com/nocodb/nocodb/assets/86527202/f424f935-fef2-4080-8b67-3f6f1bd95c65)
:::info
Your password has at least 8 letters. No other constraints on case, numbers or special characters.
:::
On signup, landing page has a default project & a table created for you to quickly get started
![landing page](https://github.com/nocodb/nocodb/assets/86527202/cd09dbeb-f5e1-42e6-92bb-abd4b3ab48bf)
The data will be stored in `NC_DB`. If it is not specified, a local SQLite will be created and used.
:::info
NC_DB is an environment variable used to store the metadata.
:::
### Connecting to External Database
Click on project title in left sidebar to open the project dashboard. On the project dashboard, open `Data Sources` tab. Click on `+ New Source` button to add existing database.
:::tip
If you are running NocoDB on Docker and your local DB is running on your host machine, your Host Address would be host.docker.internal instead of localhost.
:::
![data source](/img/content/data-source.png)
You need to specify the project name, API type, and other database parameters.
![extDB connection modal](/img/content/extDB-connection-modal.png)
Currently it supports MySQL, Postgres, MSSQL and SQLite.
You can also configure associated SSL & advanced parameters.
<img width="689" alt="image" src="https://user-images.githubusercontent.com/35857179/189047293-05176c44-e162-495a-a7cd-e02377c1f42c.png" />
:::tip
You can click Edit Connection JSON and modify SSL settings in "ssl".
:::
```json
{
"client": "pg",
"connection": {
"host": "<YOUR_HOST>",
"port": "5432",
"user": "<YOUR_DB_USER>",
"password": "<YOUR_DB_PASSWORD>",
"database": "<YOUR_DB_NAME>",
"ssl": {
"require": true,
"rejectUnauthorized": false,
"sslMode": "no-verify"
}
}
}
```
:::tip
You can click Edit Connection JSON and specify the schema you want to use in "searchPath".
:::
```json
{
"client": "pg",
"connection": {
...
},
"searchPath": [ "<YOUR_TARGET_SCHEMA>" ]
}
```
Click `Test Database Connection` to see if the connection can be established or not. NocoDB creates a new **empty database** with specified parameters if the database doesn't exist.
<img width="505" alt="image" src="https://user-images.githubusercontent.com/35857179/194793513-feabf14f-1f62-4896-b06d-88548251511a.png" />

204
packages/noco-docs/docs/030.setup-and-usages/020.table-operations.md

@ -1,204 +0,0 @@
---
title: "Table Operations"
description: "Table Operations: Row, Column, Quick Import, Export & Import"
---
Once you have created a new NocoDB project you can open it, In the browser, the URL would be like `example.com/#/default/<project_id>`.
## Table
### Table Create
On project dashboard, click on `Add new table` button
![table-create-button](https://github.com/nocodb/nocodb/assets/86527202/0b1d0b89-b3c6-4c3c-8208-4b6afce67d23)
Provide a name for the table & click `Create Table` button.
![table-create-modal](https://github.com/nocodb/nocodb/assets/86527202/fceb6c48-e0d6-428c-bb16-d2da4e38a81f)
After the successful submission, the table will be created and open on a new grid.
![new-table-landing-page](https://github.com/nocodb/nocodb/assets/86527202/96ffae6f-c18f-4b80-81eb-847cfb8116e2)
New table can also be created by using `+` button on project tile in left sidebar
![new-table-on-hover](https://github.com/nocodb/nocodb/assets/86527202/5a4ce91b-f4bf-451c-8835-8e7144deec26)
### Table Rename
Right click on Table name on left sidebar, (OR)
Click on `...` to open `Table context menu`, select `Rename`.
Feed in the changes to the table name & press `Enter`
![table-context-menu](https://github.com/nocodb/nocodb/assets/86527202/67cb7563-5a10-4d91-bc83-b31ff185d18d)
### Table Duplicate
Right click on Table name on left sidebar, (OR)
Click on `...` to open `Table context menu`, select `Duplicate`
![table-context-menu](https://github.com/nocodb/nocodb/assets/86527202/67cb7563-5a10-4d91-bc83-b31ff185d18d)
Additionally, you can configure to duplicate
- `Include Data` : toggle this to include/exclude table records
- `Include Views` : toggle this to include/exclude table views
![table-duplicate-modal](https://github.com/nocodb/nocodb/assets/86527202/e668c382-530f-423c-9de7-f68896a6ba67)
### Table Delete
Right click on Table name on left sidebar, (OR)
Click on `...` to open `Table context menu`, select `Delete`
![table-context-menu](https://github.com/nocodb/nocodb/assets/86527202/67cb7563-5a10-4d91-bc83-b31ff185d18d)
Click on `Delete Table` to confirm
![table-delete-confirmation-modal](https://github.com/nocodb/nocodb/assets/86527202/a0d11ca6-0aed-4eaf-a855-c49ff987d546)
## Column
### Column Add
Click on `+` button to the right of Columns header, type `Column name`
![column-add](https://github.com/nocodb/nocodb/assets/86527202/d3350116-5047-4385-8eab-1fef4b3836ac)
Select a `type` for the column from the dropdown. Depending on the column type, you might find additional options to configure.
Click on `Save column` to finish creating column.
![column-add-type](https://github.com/nocodb/nocodb/assets/86527202/239bfbde-fd20-4f8e-966c-2c60507c195e)
#### Column create before OR after a specific column
You can also use context menu of an existing column to either insert before or after a specific column.
![column-context-menu - insert after before](https://github.com/nocodb/nocodb/assets/86527202/d15b62b4-5302-4c75-bd5b-e60ae8b81a65)
### Column Edit
Double click on Column name in column header to open `Column edit` modal
You can rename column & optionally change column-type.
![column-rename](https://github.com/nocodb/nocodb/assets/86527202/1a0f798e-6726-4810-9645-e531a88e495a)
Note:
- Changing column type might not be allowed in some scenarios & in some other, might lead to either loss or truncated data.
- Column name is also possible using Column context menu as described below
### Column Duplicate
Open `Column context menu` (click `v` on column header), select `Duplicate`
![column-duplicate](https://github.com/nocodb/nocodb/assets/86527202/8d1f36e6-5f6b-4f89-81d0-c0d3148bd056)
Note: Column duplicate only creates another column of same type & inserts it to the immediate right. Currently data in the column is not duplicated.
### Column Delete
Open `Column context menu` (click `v` on column header), select `Delete`
![column-delete](https://github.com/nocodb/nocodb/assets/86527202/2444124d-f12a-4bab-91ce-9b8c0625a263)
Click on `Delete Column` to confirm
![Column delete confirmation modal](https://github.com/nocodb/nocodb/assets/86527202/5675b2ef-9d2c-40fe-900b-d5dd58d1655d)
## Row
For adding new values to the table we need new rows, new rows can be added in two methods.
### Row Add (Using Form)
Click on `New Record` at the bottom of the grid (footbar), select `New Record - Form`
![new record-form](https://github.com/nocodb/nocodb/assets/86527202/c6e9acff-4d54-440a-9888-e24529747cf9)
Populate columns in the Expnaded form popup; click `Save`
![expanded record form](https://github.com/nocodb/nocodb/assets/86527202/ec264f05-8b0b-4029-adc0-a88932d69c9f)
### Row Add (Using Table Row at bottom of page)
![in grid insert](https://github.com/nocodb/nocodb/assets/86527202/cf0b6ccb-f598-4874-bb87-8fe291bab14e)
Click on any of the following options to insert a new record on the grid directly.
- `+`
- `New Record` : `New Record- Grid`
- Right click on any cell, click `Insert new row` from the cell context menu
Note that, any record inserted in the grid will always be appended to the end of the table by default.
### Row Add (Pressing Enter Key from Previous Row)
When you finish editing a cell and press Enter, the cell in the next row with the same column will be highlighted.
![image](https://user-images.githubusercontent.com/35857179/203271676-bab64ca4-e0e4-4deb-9a62-609a97158911.png)
### Row Edit
You can start editing by any of the following methods
- Double-click on cell to edit
- Click on cell and start typing (this way it will clear the previous content)
- Click on cell and press enter to start editing
- And it will automatically save on blur event or if inactive.
### Row Delete
Right-click on the row and then from the context menu select `Delete Row` option.
![delete row -1](https://github.com/nocodb/nocodb/assets/86527202/9eef834b-21cf-4828-90ec-3c2e86cd19db)
Bulk delete is also possible by selecting multiple rows by using the checkbox in first column and then `Delete Selected Rows` options from the right click context menu.
![delete row 2](https://github.com/nocodb/nocodb/assets/86527202/f83c702a-fa75-42a5-86eb-22ed85c0dec1)
## Quick Import
You can use Quick Import when you have data from external sources such as Airtable, CSV file or Microsoft Excel to an existing project by either
- Hover on `Project title` in tree-view, click `...` > `Quick Import From` > `Airtable` or `CSV file` or `Microsoft Excel` or `JSON file`
- Drag and drop CSV, JSON or Excel file to import
![image](/img/content/quick-import.png)
### Import Airtable into an Existing Project
- See [here](/setup-and-usages/import-airtable-to-sql-database-within-a-minute-for-free)
### Import CSV data into an Existing Project
- Hover on `Project title` in tree-view, click `...` > `Quick Import From` > `CSV file`
- Drag & drop or select files (at most 5 files) to upload or specify CSV file URL, and Click Import
- **Auto-Select Field Types**: If it is checked, column types will be detected. Otherwise, it will default to `SingleLineText`.
- **Use First Row as Headers**: If it is checked, the first row will be treated as header row.
- **Import Data**: If it is checked, all data will be imported. Otherwise, only table will be created.
![image](/img/content/import-csv.png)
- You can revise the table name by double-clicking it, column name and column type. By default, the first column will be chosen as `Display Value` and cannot be deleted.
![image](/img/content/import-csv-2.png)
- Click `Import` to start importing process. The table will be created and the data will be imported.
![image](/img/content/import-csv-3.png)
### Import Excel data into an Existing Project
- Hover on `Project title` in tree-view, click `...` > `Quick Import From` > `Excel file`
- Drag & drop or select files (at most 5 files) to upload or specify CSV file URL, and Click Import
- **Auto-Select Field Types**: If it is checked, column types will be detected. Otherwise, it will default to `SingleLineText`.
- **Use First Row as Headers**: If it is checked, the first row will be treated as header row.
- **Import Data**: If it is checked, all data will be imported. Otherwise, only table will be created.
![image](/img/content/import-xls.png)
- You can revise the table name by double-clicking it, column name and column type. By default, the first column will be chosen as `Display Value` and cannot be deleted.
![image](/img/content/import-xls-2.png)
- Click `Import` to start importing process. The table will be created and the data will be imported.
![image](/img/content/import-xls-3.png)
## Export Data
You can export your data from a table as a CSV file by clicking the `...` menu in toolbar, and hover on `Download`. Currently only CSV and XLSX formats are supported for export.
![image](/img/content/export.png)
## Import Data
You can export your data from a table as a CSV file by clicking the `...` menu in toolbar, and hover on `Upload`. Currently only CSV and XLSX formats are supported for import.
![image](/img/content/import.png)

133
packages/noco-docs/docs/030.setup-and-usages/030.column-operations.md

@ -1,133 +0,0 @@
---
title: "Column Operations"
description: "Column Operations: Fields, Sort & Filter"
---
## Fields
Click `Fields` to control the visibility of a field.
By default, all system fields will be hid. However, you can tick `Show system fields` to make them visible.
<img width="1268" alt="image" src="https://user-images.githubusercontent.com/86527202/262226113-6ad574c2-93d0-49ac-be28-01b336df8de4.png" />
### Re-order Columns
Column positions can be re-ordered. Open `Fields` menu, and re-order fields as needed by dragging and dropping the `drag icon`.
<img width="1268" alt="image" src="https://user-images.githubusercontent.com/86527202/262226232-0b30d4b2-3390-470f-bf01-72b5b922726b.png" />
### Hide / Unhide Columns
To hide / un-hide columns, open Fields menu, click on associated toggle button to hide / un-hide.
:::tip
You can create different grid views with different fields shown in each view.
:::
<img alt="image" src="https://user-images.githubusercontent.com/86527202/262226271-b9a323e9-39b8-418d-9b7c-3da0f2d17d89.png" />
<!-- #### Demo -->
<!-- <img src="https://github.com/dstala/nocodb-files/blob/2c4ca2ff31460ee5636262e88ba303e2d436ba54/ColumnHide.gif?raw=true" width="100%"/> -- />
<!-- img src="https://media2.giphy.com/media/8NXvWfHDoul72dwLhk/giphy.gif?cid=790b76116fa008b45c79bb91bfe611e324fa38cde21a255a&rid=giphy.gif&ct=g" width="60%"/ -->
## Sort
Sorting allows you to order contents alphabetically (A → Z) / (Z → A) (OR) in ascending / descending order. NocoDB allows nested sorting. You can choose column fields & order in which to apply nested sorting. Lookup, Formula, Nested Data are also supported in Sorting.
### Add / Edit sort
- Click on `Sort` button in the toolbar menu
- Select `Field` to sort by
![sort](https://github.com/nocodb/nocodb/assets/86527202/5665b5db-7d66-4d17-8307-4a8bf32360c8)
- Configure sort `direction`
![sort direction](https://github.com/nocodb/nocodb/assets/86527202/56a6d29b-de43-4aaf-b77e-41f32bb58f93)
- Multiple fields can be configured for subsequent level sorting
![sort nested](https://github.com/nocodb/nocodb/assets/86527202/4e9393d7-953c-4a3f-bb4e-3b0161042ae4)
Note: Field configured on the top will be used for first level sorting, followed by subsequent fields in top-down order
### Delete sort
- Click on `Sort` button in the toolbar
- Click on the bin icon to the right of the sort you wish to delete
![sort delete](https://github.com/nocodb/nocodb/assets/86527202/d469110b-12b2-4b8a-83ee-fe8819da2dc1)
## Filter
Filters allow you to restrict / organize your data on the view as per your needs. NocoDB allows nested filters. You can choose multiple columns and conditions to apply filter. Between filters, you can opt for either `and` or `or` mode operation. Lookup, Formula, Nested Data are also supported in Filtering.
### Add / Edit filter
Click on `Filter` button in the toolbar, select either `Add filter` or `Add filter group`
![filter add](https://github.com/nocodb/nocodb/assets/86527202/f312d8e5-98f1-4e34-ad82-460bb5eacef3)
Configure filter : `Column` `Operation` and `Value` (if applicable)
![filter level-1](https://github.com/nocodb/nocodb/assets/86527202/62ac5ea5-64c7-4ab4-93bc-c2897e1a9122)
Multiple filter conditions can be combined by using either `and` or `or` mode of operation
![filter nested](https://github.com/nocodb/nocodb/assets/86527202/1e9af5bf-c19f-49ed-8fc4-a62093f6ee01)
### Delete filter
To delete a filter, click on the bin icon to the right of the associated filter
![filter delete](https://github.com/nocodb/nocodb/assets/86527202/c8f5abac-a550-4152-ab51-5f0765cd188b)
### Grouped filters
You can also group several filters together using Filter Group.
![filter grouped](https://github.com/nocodb/nocodb/assets/86527202/582c29de-28cd-4414-b7db-4b1b1eea131e)
## Enable NULL and EMPTY Filters
NULL filters (`is null` & `is not null`) and EMPTY filters (`is empty` & `is not empty`) are hidden by default. If you wish to filter out either one only, you may enable `Show NULL and EMPTY Filter` in Project Settings.
![project settings](https://github.com/nocodb/nocodb/assets/86527202/49d40f16-f8bd-4925-a4d0-65efb2d8f73e)
![filters show null empty](https://github.com/nocodb/nocodb/assets/86527202/a383f5e8-f2b9-461b-b725-9b172ac9975b)
Otherwise, we can use Blank filters to filter out cells with NULL values and EMPTY values.
### Supported Filters
Currently, we support different types of filters for corresponding columns. Please refer the below matrix for details.
<iframe width="100%" height="700vh" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vTpCNKtA-szaXUKJEO5uuSIRnzUOK793MKnyBz9m2rQcwn7HqK19jPHeER-IIRWH9X56J78wfxXZuuv/pubhtml?gid=427284630&amp;single=true&amp;widget=true&amp;headers=false"></iframe>
## Group by
Group-by allows one to visually categorise records on grid into specific `Groups` & `Sub groups`. NocoDB allows three levels of record seggregation.
![group by](https://github.com/nocodb/nocodb/assets/86527202/d4bfcdee-85ed-4c98-92ac-12055f9715e4)
### Add / Edit group-by
- Click on `Group By` in the toolbar
- Choose field for the records to be grouped by
- Optionally- you can also sort groups, in either ascending or descending way.
- Add sub-groups of upto 3 levels
### Delete group-by
- Click on `Group By` in the toolbar
- Click on the bin icon to the right of the group you wish to delete
Note: To disable `Group by` & return back to standard spreadsheet grid view - you need to remove all the groups configured.
## Row Height
NocoDB allows you to change height of records displayed on spreadsheet grid to 4 different levels `Short` (default), `Medium`, `Tall`, and `Extra`. This allows you to bring more content per cell to be displayed, useful when working with lengthy text columns and multi select fields.
![Row height](https://github.com/nocodb/nocodb/assets/86527202/6f49e7b4-a3de-4325-a11e-3ffc670ddd2e)

376
packages/noco-docs/docs/030.setup-and-usages/040.column-types.md

@ -1,376 +0,0 @@
---
title: 'Column Types'
description: 'NocoDB Column Types Overview'
---
## Available Column Types
| Type | Description |
|------------------------------------------------------------------|----------------------------------------------------|
| [Links](#linktoanotherrecord) | Count of `Has Many` or `Many To Many` columns |
| [~~LinkToAnotherRecord~~](#linktoanotherrecord) (deprecated) | `Has Many` or `Many To Many` columns |
| [SingleLineText](#singlelinetext) | For short text |
| [LongText](#longtext) | For lengthy string content |
| [Attachment](#attachment) | File attachment column |
| [Checkbox](#checkbox) | Boolean value |
| [MultiSelect](#multiselect) | Multiple options can be selected once |
| [SingleSelect](#singleselect) | Single option select |
| [Date](#date) | Date selector |
| [Year](#year) | Year selector |
| [Time](#time) | Time selector |
| [PhoneNumber](#phonenumber) | Phone number field |
| [Email](#email) | Email field |
| [URL](#url) | Valid URL field |
| [Number](#number) | Any type of number |
| [Decimal](#decimal) | Fractional number |
| [Currency](#currency) | Currency value |
| [Percent](#percent) | Percentage |
| [Duration](#duration) | Duration |
| [Rating](#rating) | Rating |
| [Formula](#formula) | Formula based generated column |
| [Rollup](#rollup) | Performs calculations and aggregations |
| [DateTime](#datetime) | Date & Time selector |
| [QR Code](#qr-code) | QR Code visualization of another referenced column |
| [Barcode](#barcode) | Barcode visualization of another referenced column |
| [Geometry](#geometry) | Geometry column |
| [GeoData](#geodata) | GeoData column |
| [Json](#json) | Json column |
| [SpecificDBType](#specificdbtype) | Custom DB type option |
## Database Types
<!-- ### ID
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|_All types are available_|int|
|**PostgreSQL**|_All types are available_|int4|
|**SQL Server**|_All types are available_|int|
|**SQLite**|_All types are available_|integer| -->
### LinkToAnotherRecord
For more about Link To Another Record, please visit <a href="/setup-and-usages/link-to-another-record" target="_blank">here</a>.
<!-- ### ForeignKey
#### Available Database Types
|Database| Types|
|-----|----------|
|**MySQL**|_All types are available_|
|**PostgreSQL**|_All types are available_|
|**SQL Server**|_All types are available_|
|**SQLite**|_All types are available_| -->
### SingleLineText
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|char, varchar, nchar, text, tinytext, mediumtext, longtext|varchar|
|**PostgreSQL**|char, character, character varying, text|character varying|
|**SQL Server**|char, ntext, text, varchar, nvarchar|varchar|
|**SQLite**|character, text, varchar|varchar|
### LongText
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|char, varchar, nchar, text, tinytext, mediumtext, longtext|text|
|**PostgreSQL**|char, character, character varying, text|text|
|**SQL Server**|char, ntext, text, varchar, nvarchar|text|
|**SQLite**|character, text, varchar|text|
### Attachment
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|json, char, varchar, nchar, text, tinytext, mediumtext, longtext| text |
|**PostgreSQL**|json, char, character, character varying, text| text |
|**SQL Server**|char, ntext, text, varchar, nvarchar| text |
|**SQLite**|character, text, varchar|text|
### Checkbox
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|int, smallint, mediumint, bigint, bit, boolean, serial, tinyint|tinyint|
|**PostgreSQL**|bit, bool, int2, int4, int8, boolean, smallint, int, integer, bigint, bigserial, char, int4range, int8range, serial, serial2, serial8|bool|
|**SQL Server**|bigint, bit, int, tinyint|tinyint|
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8, boolean||
### MultiSelect
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|set, text, tinytext, mediumtext, longtext|set|
|**PostgreSQL**|text|text|
|**SQL Server**|text, ntext|text|
|**SQLite**|text, varchar|text|
### SingleSelect
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|enum, text, tinytext, mediumtext, longtext|enum|
|**PostgreSQL**|text|text|
|**SQL Server**|text, ntext|text|
|**SQLite**|text, varchar|text|
### Date
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|date, datetime, timestamp, varchar|varchar|
|**PostgreSQL**||date, timestamp, timestamp without time zone, timestamptz, timestamp with time zone | date
|**SQL Server**|date|date|
|**SQLite**|date, varchar|varchar|
### Year
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|year|year|
|**PostgreSQL**|int|int|
|**SQL Server**|int|int|
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8|year|
### Time
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|time|time|
|**PostgreSQL**|time, time without time zone, timestamp, timestamp without time zone, timestamptz, timestamp with time zone, timetz, time with time zone|time|
|**SQL Server**|time|time|
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8|time|
### PhoneNumber
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|varchar|varchar|
|**PostgreSQL**|character varying|character varying|
|**SQL Server**|varchar|varchar|
|**SQLite**|varchar, text|varchar|
### Email
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|varchar|varchar|
|**PostgreSQL**|character varying|character varying|
|**SQL Server**|varchar|varchar|
|**SQLite**|varchar, text|varchar|
### URL
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|text, tinytext, mediumtext, longtext, varchar|varchar|
|**PostgreSQL**|character varying, text|character varying|
|**SQL Server**|varchar, text|varchar|
|**SQLite**|varchar, text|varchar|
### Number
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|int, smallint, mediumint, bigint, bit, float, decimal, double, serial|int|
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, float4, float8, smallint, smallserial|int8|
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|int|
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8, numeric, real, double, double precision, float|integer|
### Decimal
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|float, decimal, double, serial|decimal|
|**PostgreSQL**|double precision,float4,float8|decimal|
|**SQL Server**|decimal, float|decimal|
|**SQLite**|real, double, double precision, float, numericdecimal|
### Currency
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|decimal, float, double, serial', 'int, smallint, mediumint, bigint, bit|decimal|
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, money', 'float4, float8|decimal|
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|decimal|
|**SQLite**|real, double, double precision, float, int, integer, tinyint, smallint, mediumint, bigint, int2, int8, numeric|double precision|
### Percent
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|decimal, float, double, serial', 'int, smallint, mediumint, bigint, bit|double|
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, float4, float8, smallint, smallserial|double|
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|double|
|**SQLite**|real, double, double precision, float, int, integer, tinyint, smallint, mediumint, bigint, int2, int8, numeric|double|
### Duration
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|decimal, float, double, serial', 'int, smallint, mediumint, bigint, bit|int|
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, float4, float8, smallint, smallserial|int8|
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|int|
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8|integer|
### Rating
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|decimal, float, double, serial', 'int, smallint, mediumint, bigint, bit|float|
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, float4, float8, smallint, smallserial|float8|
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|float|
|**SQLite**|real, double, double precision, float, int, integer, tinyint, smallint, mediumint, bigint, int2, int8, numeric|float|
### Formula
For more about Formulas, please visit <a href="/setup-and-usages/formulas" target="_blank">here</a>.
### QR-Code
Encodes the value of a reference column as QR code. The following column types are supported for the for reference column:
* Formula
* Single Line Text
* Long Text
* Phone Number
* URL
* Email
Since it's a virtual column, the cell content (QR code) cannot be changed directly.
### Barcode
Encodes the value of a reference column as Barcode. Supported barcode formats: CODE128, EAN, EAN-13, EAN-8, EAN-5, EAN-2, UPC (A), CODE39, ITF-14, MSI, Pharmacode, Codabar. The following column types are supported for the for reference column:
* Formula
* Single Line Text
* Long Text
* Phone Number
* URL
* Email
Since it's a virtual column, the cell content (Barcode) cannot be changed directly.
### Rollup
For more about Rollup, please visit <a href="/setup-and-usages/rollup" target="_blank">here</a>.
### DateTime
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|datetime, timestamp, varchar|datetime|
|**PostgreSQL**|timestamp, timestamp without time zone, timestamptz, timestamp with time zone|datetime|
|**SQL Server**|datetime, datetime2, datetimeoffset|datetime|
|**SQLite**|datetime, timestamp|datetime|
<!-- ### CreateTime
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|datetime, timestamp, varchar|datetime|
|**PostgreSQL**|timestamp, timestamp without time zone, timestamptz, timestamp with time zone|datetime|
|**SQL Server**|datetime, datetime2, datetimeoffset|datetime|
|**SQLite**|datetime, timestamp|datetime| -->
### Geometry
#### Available Database Types
|Database| Types|
|-----|----------|
|**MySQL**|geometry, point, linestring, polygon, multipoint, multilinestring, multipolygon|
|**PostgreSQL**|polygon, point, circle, box, line, lseg, path, circle|
|**SQL Server**|geometry|
|**SQLite**|text|
### GeoData
Encodes a geographic location which consists of a latitude and a longitude.
Both are internally stored as one string, where latitude and longitude are separated by ';'
Example: "52.2134;29.1442"
#### Available Database Types
|Database| Types|
|-----|----------|
|**MySQL**|char, varchar, nchar, text, tinytext, mediumtext, longtext|
|**PostgreSQL**|char, character, character varying, text|
|**SQL Server**|decimal, float|
|**SQLite**|character, text, varchar|
### JSON
#### Available Database Types
|Database| Types|
|-----|----------|
|**MySQL**|json|
|**PostgreSQL**|json|
|**SQL Server**|text, ntext|
|**SQLite**|text|
### SpecificDBType
#### Available Database Types
|Database| Types|
|-----|----------|
|**MySQL**|_All types are available_|
|**PostgreSQL**|_All types are available_|
|**SQL Server**|_All types are available_|
|**SQLite**|_All types are available_|

43
packages/noco-docs/docs/030.setup-and-usages/050.code-snippets.md

@ -1,43 +0,0 @@
---
title: 'Code Snippets'
description: 'Code Snippets Examples in different ways'
---
## Overview
In the table topbar, toggle to `Details` tab, click `APIs`.
Tab body will display sample code snippet for List API.
![code snippet](https://github.com/nocodb/nocodb/assets/86527202/fb281926-b066-48b2-9b91-8b628a3c09b4)
## Supported Snippet
### Shell
- cURL
- wget
### Javascript
- Axios
- Fetch
- jQuery
- XHR
### Node
- Axios
- Fetch
- Request
- Native
- Unirest
### NocoDB SDK
- Javascript
- Node
### PHP
### Python
- http.client
- request
### Ruby
### Java
### C

77
packages/noco-docs/docs/030.setup-and-usages/060.link-to-another-record.md

@ -1,77 +0,0 @@
---
title: "Link To Another Record"
description: "Understanding Link To Another Record (LTAR) Columns!"
---
### Relationship types:
- One to one
- A Table record in first table is related to only one record of second table.
- Example: Country has a capital city
- One to many
- A Table record in first table is related to more than one record of second table. But second table record maps to only one entry of first table
- NocoDB refers to this category of relationship as **has many**
- For every **has many** relation defined, NocoDB augments **belongs to** relationship column in the other table automatically
- Example: Country **has many** Cities. (other way mapping > City **belongs to** Country )
- Many to many
- A Table record in first table is related to more than one record of second table; second table record can also map to more than on record of first table.
- NocoDB refers to this category of relationship as **many to many**
- For every **many to many** relation defined between tables, NocoDB augments **many to many** relationship column in the other table automatically
- Example: Film **has many** Actors. Actor **has many** Films (works on many films)
Further details of relationship types can be found [here](https://afteracademy.com/blog/what-are-the-different-types-of-relationships-in-dbms)
Relationships between table records can be established by using **LinkToAnotherRecord** column type.
Workflow details are captured below
## Adding a relationship
<img width="1016" alt="image" src="https://user-images.githubusercontent.com/35857179/189105583-20014dd9-e5a6-4f27-b03c-97fad9096b5f.png" />
### 1. Create column
Click on '+' button at end of column headers
### 2. Update column name
Input name in the text box provided
### 3. Select column type
Select Column type as "LinkToAnotherRecord" from the drop-down menu
### 4. Choose relationship type
- 'Has Many' corresponds to the 'One-to-many' relationships
- 'Many To Many' corresponds to the 'Many-to-many' relationships
### 5. Select child table from drop down menu
### 6. Click on 'Save'
A new column will get created in both the parent table & child table
## Updating linked records
### 1. Open link record tab
Click on the '+' icon in corresponding row - cell
<img width="750" alt="image" src="https://user-images.githubusercontent.com/35857179/189106326-90e46156-798d-4a01-a4eb-4e991ce94c03.png" />
### 2. Select from the option displayed
Use 'Filter box' to narrow down on search items
You can opt to insert a new record as well, using "+ New Record" button
<img width="1014" alt="image" src="https://user-images.githubusercontent.com/35857179/189106494-4b49a200-a44f-41ae-8b54-93b18d867a04.png" />
### 3. Column mapping showing "Has Many" relationship
Sheet1 'has many' Sheet2
<img width="756" alt="image" src="https://user-images.githubusercontent.com/35857179/189106702-3b8d7a50-08f4-4a04-b2cb-16db0cf667b3.png" />
### 4. Column mapping for "Belongs to" relationship [Automatically updated]
Sheet2 'belongs to' Sheet1
<img width="574" alt="image" src="https://user-images.githubusercontent.com/35857179/189106731-59e5bc3c-bcc5-4796-b5b2-d9b5418bfe2b.png" />

103
packages/noco-docs/docs/030.setup-and-usages/061.links.md

@ -1,103 +0,0 @@
---
title: "Links"
description: "Understanding Link Columns!"
---
### Supported relationship types:
- One to many
- A Table record in first table is related to more than one record of second table. But second table record maps to only one entry of first table
- NocoDB refers to this category of relationship as **has many**
- For every **has many** relation defined, NocoDB augments **belongs to** relationship column in the adjacent table automatically
- Example: Country **has many** Cities. (other way mapping > City **belongs to** Country )
- Many to many
- A Table record in first table is related to more than one record of second table; second table record can also map to more than on record of first table.
- NocoDB refers to this category of relationship as **many to many**
- For every **many to many** relation defined between tables, NocoDB augments **many to many** relationship column in the other table automatically
- Example: Film **has many** Actors. Actor **has many** Films (works on many films)
Further details of relationship types can be found [here](https://afteracademy.com/blog/what-are-the-different-types-of-relationships-in-dbms)
From Release v0.111.0, table records can be connected through relationships using the **Links** column type.
It is important to note that, earlier supported column type **LinkToAnotherRecord** for creating relations is considered deprecated. While the old datatype is still supported for backward compatibility, it is no longer possible to create new fields of that type.
The main distinction between these two column types lies in how the contents are displayed within the cell when links are established between two tables. With the **LinkToAnotherRecord** column type, the cell displays the **Primary value** of the related records. On the other hand, the **Links** column type only shows the **count** of related records.
The decision to switch over to new column type was made to ensure better performance and scalability of the application, more so when the records & the number of records in the related table is large.
Child list to display the related records can be accessed by clicking on the link count displayed on the cell.
Except for the column type, the following procedures remain same as before
- Create, update & delete a relationship column,
- Link & unlink a record,
- Create a lookup and rollup columns
Workflow details are captured below.
## Adding a relationship
![Links](https://github.com/nocodb/nocodb/assets/86527202/97203ff1-29e1-46de-9987-18a14e7b7bb3)
1. Create column
Click on '+' button at end of column headers
2. Update column name
Input name in the text box provided
3. Select column type
Select Column type as "Links" from the drop-down menu
4. Choose relationship type
- 'Has Many' corresponds to the 'One-to-many' relationships
- 'Many To Many' corresponds to the 'Many-to-many' relationships
5. Select child table from drop down menu
6. Click on 'Save'
A new column will get created in both the parent table & child table
## Linking records
### 1. Open link record tab
Click on the '+' icon in corresponding row - cell
![links add](https://github.com/nocodb/nocodb/assets/86527202/25132434-606e-4c9c-aa66-e0753d6ca49a)
### 2. Select from the option displayed
Use 'Filter box' to narrow down on search items.
You can opt to insert a new record as well, using "+ New Record" button.
You can use `ALT + Click` to insert multiple options together.
![links child list](https://github.com/nocodb/nocodb/assets/86527202/c10912b2-a202-4cb0-b4be-daeead1ecef3)
### 3. Column display for "Has Many" relationship
Country 'has many' City
![links has many](https://github.com/nocodb/nocodb/assets/86527202/92a72ea6-6acf-4c4d-aa0e-86dc3644905a)
Display remains similar for "Many to Many" relationship as well
### 4. Column display for "Belongs to" relationship [Automatically updated]
City 'belongs to' Country.
Note: Primary value is still used as cell display value for "Belongs to" as it can have only one associated record.
![links belongs to](https://github.com/nocodb/nocodb/assets/86527202/cb16f5c8-1403-4d89-97b6-6b2de7e9729d)
## Unlinking records
1. Click on link count to open Child modal
2. Click on Unlink icon against required item
![links unlink](https://github.com/nocodb/nocodb/assets/86527202/f8dc91a5-09ad-46aa-bcc2-5484db034aba)
## Link label reconfiguration
Use column edit menu for **Links** to reconfigure display label
![links label config](https://github.com/nocodb/nocodb/assets/86527202/1fb02fd6-6dea-4423-a365-f8db2cdc7a1f)

37
packages/noco-docs/docs/030.setup-and-usages/070.lookup.md

@ -1,37 +0,0 @@
---
title: "Lookup"
description: "Understanding Lookup Column!"
---
### Example organization structure
Consider an organization with
- 5 departments (company departments), each department has a team name & associated team code. Each `Team` **has many** `Employees` - relationship has been defined using `LinkToAnotherRecord` or `Links`column
- 5 employees working at different departments
![company-employee-table](https://github.com/nocodb/nocodb/assets/86527202/cbfb6278-9016-4913-b3c0-4a6549c660ac)
<!-- ![Screenshot 2022-09-09 at 12 18 40 PM](https://user-images.githubusercontent.com/86527202/189291758-21c81ec6-7967-45f1-b49c-b3b6f2701edc.png) -->
<!-- ![Screenshot 2022-09-09 at 12 19 16 PM](https://user-images.githubusercontent.com/86527202/189291766-f619078e-0881-4531-a3f8-ede22269f6fc.png) -->
Now, let's explore procedure to retrieve team-code information in Employee table using **LOOKUP** columns
### Configuring a lookup column
- Add new column : Click on '+' icon to the left of column headers in Employee table
- Feed column name
- Select column type as 'Lookup'
- Choose child table
- Select child column
- Click on 'Save'
![lookup create](https://github.com/nocodb/nocodb/assets/86527202/45f2757e-9cc5-4eff-903d-d59ad812abb0)
Required information is now populated in the newly created column
![lookup display](https://github.com/nocodb/nocodb/assets/86527202/586fffab-0dfa-4eef-97ec-521495f4979b)
## Additional notes
- Nested 'Lookup' supported: a Lookup field can have its child column datatype as Lookup (or Rollup).

39
packages/noco-docs/docs/030.setup-and-usages/080.rollup.md

@ -1,39 +0,0 @@
---
title: "Rollup"
description: "Understanding Rollup Column!"
---
Sample Organization structure:
- 5 Departments, each department has a team name & associated team code
- 5 employees working at different Departments
- Teams **has many** Employees : relationship has been defined
![company-employee-table](https://github.com/nocodb/nocodb/assets/86527202/cbfb6278-9016-4913-b3c0-4a6549c660ac)
### RollUp AGGREGATION functions supported
- Count
- Minimum
- Maximum
- Average
- Sum
- Count Distinct
- Sum Distinct
- Average Distinct
Now, we can explore how to extract cumulative information using **"ROLLUP"** columns
## Adding a rollup column
- Click on '+' icon to the left of column headers
- Feed column name
- Select Column type as 'Rollup'
- Choose Child Table
- Choose on Child column for aggregation
- Select Aggregate function
- Click on Save
![Rollup](https://github.com/nocodb/nocodb/assets/86527202/e93b0593-d0a3-4825-aad6-0c99c6433428)
Rollup column will be populated with appropriate information

130
packages/noco-docs/docs/030.setup-and-usages/090.formulas.md

@ -1,130 +0,0 @@
---
title: "Formulas"
description: "NocoDB Formulas Syntaxes and Functions"
---
## Adding formula column
![Formula](https://github.com/nocodb/nocodb/assets/86527202/f18d6a52-0ad6-4c0f-b9e4-9e1e1bafd695)
- Click on '+' (Add column)
- Populate column Name
- Select column Type as 'Formula'
- Insert required formula
- You can use explicit numerical values/ strings as needed, e.g. `123` (numeric) or `"123"` (string).
- You can reference column names in equation with `{}`, e.g. `{column_name}`, if the column name conflicts with literals
- Table below lists supported formula & associated syntax
- Nested formula (formula equation referring to another formula column) is supported
- Click on 'Save'
## Editing formula column
Unlike other column types, formula cells cannot be modified by double-clicking since the value is generated based on the formula. Instead, the vaule can be changed by updating the formula in the column setting.
<img width="253" alt="image" src="https://user-images.githubusercontent.com/35857179/189109486-4d41f2b7-0a19-46ef-8bb4-a8d1aabd3592.png" />
## Available Formula Features
### Numeric Functions
| Name | Syntax | Sample | Output |
|-------------|----------------------------|----------------------------------|------------------------------------------------------------------|
| **ABS** | `ABS(value)` | `ABS({Column})` | Absolute value of the input parameter |
| **ADD** | `ADD(value1,[value2,...])` | `ADD({Column1}, {Column2})` | Sum of input parameters |
| **AVG** | `AVG(value1,[value2,...])` | `AVG({Column1}, {Column2})` | Average of input parameters |
| **CEILING** | `CEILING(value)` | `CEILING({Column})` | Rounded next largest integer value of input parameter |
| **EXP** | `EXP(value)` | `EXP({Column})` | Exponential value of input parameter (`e^x`) |
| **FLOOR** | `FLOOR(value)` | `FLOOR({Column})` | Rounded largest integer less than or equal to input parameter |
| **INT** | `INT(value)` | `INT({Column})` | Integer value of input parameter |
| **LOG** | `LOG([base], value)` | `LOG(10, {Column})` | Logarithm of input parameter to the base (default = e) specified |
| **MAX** | `MAX(value1,[value2,...])` | `MAX({Column1}, {Column2}, {Column3})` | Maximum value amongst input parameters |
| **MIN** | `MIN(value1,[value2,...])` | `MIN({Column1}, {Column2}, {Column3})` | Minimum value amongst input parameters |
| **MOD** | `MOD(value1, value2)` | `MOD({Column}, 2)` | Remainder after integer division of input parameters |
| **POWER** | `POWER(base, exponent)` | `POWER({Column}, 3)` | `base` to the `exponent` power, as in `base ^ exponent` |
| **ROUND** | `ROUND(value, precision)` | `ROUND({Column}, 3)` | Round input `value` to decimal place specified by `precision` (Nearest integer if `precision` not provided) |
| **SQRT** | `SQRT(value)` | `SQRT({Column})` | Square root of the input parameter |
### Numeric Operators
| Operator | Sample | Description |
| -------- | ----------------------- | -------------------------------- |
| `+` | `{Column1} + {Column2} + 2` | Addition of numeric values |
| `-` | `{Column1} - {Column2}` | Subtraction of numeric values |
| `*` | `{Column1} * {Column2}` | Multiplication of numeric values |
| `/` | `{Column1} / {Column2}` | Division of numeric values |
> **Tip** : To change the order of arithmetic operation, you can use round bracket parenthesis ().
Example: ({Column1} + ({Column2} * {Column3}) / (3 - $Column4$ ))
### String Functions
| Name | Syntax | Sample | Output |
|-------------|----------------------------------|---------------------------------|---------------------------------------------------------------------------|
| **CONCAT** | `CONCAT(str1, [str2,...])` | `CONCAT({Column1}, ' ', {Column2})` | Concatenated string of input parameters |
| **LEFT** | `LEFT(str1, n)` | `LEFT({Column}, 3)` | `n` characters from the beginning of input parameter |
| **LEN** | `LEN(str)` | `LEN({Column})` | Input parameter character length |
| **LOWER** | `LOWER(str)` | `LOWER({Column})` | Lower case converted string of input parameter |
| **MID** | `MID(str, position, [count])` | `MID({Column}, 3, 2)` | Alias for `SUBSTR` |
| **REPEAT** | `REPEAT(str, count)` | `REPEAT({Column}, 2)` | Specified copies of the input parameter string concatenated together |
| **REPLACE** | `REPLACE(str, srchStr, rplcStr)` | `REPLACE({Column}, 'int', 'num')` | String, after replacing all occurrences of `srchStr` with `rplcStr` |
| **RIGHT** | `RIGHT(str, n)` | `RIGHT({Column}, 3)` | `n` characters from the end of input parameter |
| **SEARCH** | `SEARCH(str, srchStr)` | `SEARCH({Column}, 'str')` | Index of `srchStr` specified if found, 0 otherwise |
| **SUBSTR** | `SUBTR(str, position, [count])` | `SUBSTR({Column}, 3, 2)` | Substring of length 'count' of input string, from the postition specified |
| **TRIM** | `TRIM(str)` | `TRIM({Column})` | Remove trailing and leading whitespaces from input parameter |
| **UPPER** | `UPPER(str)` | `UPPER({Column})` | Upper case converted string of input parameter |
| **URL** | `URL(str)` | `URL({Column})` | Convert to a hyperlink if it is a valid URL |
### Date Functions
| Name | Syntax | Sample | Output | Remark |
|---|---|---|---|---|
| **NOW** | `NOW()` | `NOW()` | 2022-05-19 17:20:43 | Returns the current time and day |
| | `IF(NOW() < {DATE_COL}, "true", "false")` | `IF(NOW() < date, "true", "false")` | If current date is less than {DATE_COL}, it returns true. Otherwise, it returns false. | DateTime columns and negative values are supported. |
| **DATEADD** | `DATEADD(date \| datetime, value, ["day" \| "week" \| "month" \| "year"])` | `DATEADD(date, 1, 'day')` | Supposing {DATE_COL} is 2022-03-14. The result is 2022-03-15. | DateTime columns and negative values are supported. Example: `DATEADD(DATE_TIME_COL, -1, 'day')` |
| | | `DATEADD(date, 1, 'week')` | Supposing {DATE_COL} is 2022-03-14 03:14. The result is 2022-03-21 03:14. | DateTime columns and negative values are supported. Example: `DATEADD(DATE_TIME_COL, -1, 'week')` |
| | | `DATEADD(date, 1, 'month')` | Supposing {DATE_COL} is 2022-03-14 03:14. The result is 2022-04-14 03:14. | DateTime columns and negative values are supported. Example: `DATEADD(DATE_TIME_COL, -1, 'month')` |
| | | `DATEADD(date, 1, 'year')` | Supposing {DATE_COL} is 2022-03-14 03:14. The result is 2023-03-14 03:14. | DateTime columns and negative values are supported. Example: `DATEADD(DATE_TIME_COL, -1, 'year')` |
| | | `IF(NOW() < DATEADD(date,10,'day'), "true", "false")` | If the current date is less than {DATE_COL} plus 10 days, it returns true. Otherwise, it returns false. | DateTime columns and negative values are supported. |
| | | `IF(NOW() < DATEADD(date,10,'day'), "true", "false")` | If the current date is less than {DATE_COL} plus 10 days, it returns true. Otherwise, it returns false. | DateTime columns and negative values are supported. |
| **DATETIME_DIFF** | `DATETIME_DIFF(date, date, ["milliseconds" \| "ms" \| "seconds" \| "s" \| "minutes" \| "m" \| "hours" \| "h" \| "days" \| "d" \| "weeks" \| "w" \| "months" \| "M" \| "quarters" \| "Q" \| "years" \| "y"])` | `DATETIME_DIFF("2022/10/14", "2022/10/15", "second")` | Supposing {DATE_COL_1} is 2017-08-25 and {DATE_COL_2} is 2011-08-25. The result is 86400. | Compares two dates and returns the difference in the unit specified. Positive integers indicate the second date being in the past compared to the first and vice versa for negative ones. |
| | | `WEEKDAY(NOW(), "sunday")` | If today is Monday, it returns 1 | Get the week day of NOW() with the first day set as sunday |
| **WEEKDAY** | `WEEKDAY(date, [startDayOfWeek])` | `WEEKDAY(NOW())` | If today is Monday, it returns 0 | Returns the day of the week as an integer between 0 and 6 inclusive starting from Monday by default. You can optionally change the start day of the week by specifying in the second argument |
| | | `WEEKDAY(NOW(), "sunday")` | If today is Monday, it returns 1 | Get the week day of NOW() with the first day set as sunday |
### Logical Operators
| Operator | Sample | Description |
| -------- | -------------------- | ------------------------ |
| `<` | `{Column1} < {Column2}` | Less than |
| `>` | `{Column1} > {Column2}` | Greater than |
| `<=` | `{Column1} <= {Column2}` | Less than or equal to |
| `>=` | `{Column1} >= {Column2}` | Greater than or equal to |
| `==` | `{Column1} == {Column2}` | Equal to |
| `!=` | `{Column1} != {Column2}` | Not equal to |
### Conditional Expressions
| Name | Syntax | Sample | Output |
|------------|------------------------------------------------|---------------------------------------------|-------------------------------------------------------------|
| **IF** | `IF(expr, successCase, elseCase)` | `IF({Column} > 1, Value1, Value2)` | successCase if `expr` evaluates to TRUE, elseCase otherwise |
| **SWITCH** | `SWITCH(expr, [pattern, value, ..., default])` | `SWITCH({Column}, 1, 'One', 2, 'Two', '--')` | Switch case value based on `expr` output |
| **AND** | `AND(expr1, [expr2,...])` | `AND({Column} > 2, {Column} < 10)` | TRUE if all `expr` evaluate to TRUE |
| **OR** | `OR(expr1, [expr2,...])` | `OR({Column} > 2, {Column} < 10)` | TRUE if at least one `expr` evaluates to TRUE |
Logical operators, along with Numerical operators can be used to build conditional `expressions`.
Examples:
```
IF({marksSecured} > 80, "GradeA", "GradeB")
```
```
SWITCH({quarterNumber},
1, 'Jan-Mar',
2, 'Apr-Jun',
3, 'Jul-Sep',
4, 'Oct-Dec',
'INVALID'
)
```

35
packages/noco-docs/docs/030.setup-and-usages/100.primary-key.md

@ -1,35 +0,0 @@
---
title: "Primary Key"
description: "Understanding Primary Key in NocoDB!"
---
## What is a Primary Key ?
- A primary key is a special database table column designated to uniquely identify each table record.
## What is the use of Primary Key ?
- As it uniquely identifies an individual record of a table, it is used internally by NocoDB for all operations associated with a record
## Primary Key in NocoDB
- Primary Key that gets defined / used in NocoDB depends on how underlying table was created. Summary is captured below
1. From UI, Create new table / Import from Excel / Import from CSV
1. An `ID` [datatype: Integer] system field created by default during table creation is used as primary key
2. Additional system fields `created-at`, `updated-at` are inserted by default & can be omitted optionally; these fields can be deleted after table creation
2. Connect to existing external database
1. Existing `primary key` field defined for a table is retained as is; NocoDB doesn't insert a new ID field
2. Additional system fields `created-at`, `updated-at` are not inserted by default
3. Import from Airtable
1. Airtable record ID is marked as primary key for imported records, and is mapped to field `ncRecordId` [datatype: varchar]
2. If a new record is inserted after migration & if ncRecordId field was omitted during record insertion - auto generated string will be inserted by NocoDB
3. Computed hash value for the entire record is stored in system field `ncRecordHash`
4. Additional system fields `created-at`, `updated-at` are not inserted by default
4. Create new table using SDK / API
1. No default primary key field is introduced by NocoDB. It has to be explicitly specified during table creation (using attribute `pk: true`)
## What if Primary Key was missing?
It is possible to have a table without any primary key.
- External database table can be created without primary key configuration.
- New table can be created using SDK / API without primary key
In such scenario's, new records can be created in NocoDB for this table, but records can't be updated or deleted [as there is now way for NocoDB to uniquely identify these records]
## Can I change the Primary Key to another column within tables ?
- You can't update Primary Key from NocoDB UI. You can reconfigure it at database level directly & trigger `meta sync` explicitly.

41
packages/noco-docs/docs/030.setup-and-usages/110.display-value.md

@ -1,41 +0,0 @@
---
title: "Display Value"
description: "Understanding Display Value in NocoDB!"
---
## What is a Display Value ?
- Display Value as the name stands is the primary or main value within a row of a table that you generally associate that row with.
- It should be usually associated with a column which is uniquely identifiable. However, this uniqueness is not enforced at the database level.
- Before v0.105.0, Display Value was known as Primary Value.
## What is the use of Display Value ?
- Within a spreadsheet, Display Value are always highlighted so that it is easier to recognise what row we are in.
- And when LinkToAnotherRecord is created between two tables - it is the Display Value that appears in LinkToAnotherRecord column.
#### Example : Display Value highlighted in Actor table
![display value](https://github.com/nocodb/nocodb/assets/86527202/f3773b9b-cd0e-411c-843f-9e37796a6600)
#### Example : Display Value associated when Links field
The value shown in `Link Records` modal when adding a new link is associated records `Display value`
![display value- links field](https://github.com/nocodb/nocodb/assets/86527202/69eb206f-3796-4587-97cd-0c389053a20a)
## How to set Display Value ?
Click down arrow in the target column. Click `Set as Display Value`.
![display value set](https://github.com/nocodb/nocodb/assets/86527202/d5f09946-5654-46fe-8ecb-107fc9714219)
## How is Display Value identified for existing database tables ?
- It is usually the first column after the primary key which is not a number.
- If there is no column which is not a number then the column adjacent to primary key is chosen.
## Can I change the Display Value to another column within tables ?
- Yes, you can use the same way mentioned above to set Display Value.

37
packages/noco-docs/docs/030.setup-and-usages/120.sync-schema.md

@ -1,37 +0,0 @@
---
title: 'Sync Schema'
description: 'Schema changes made to database from outside NocoDB GUI can be synced'
---
## How to sync schema changes to NocoDB
NocoDB allows you to sync schema changes if you have made changes outside NocoDB GUI. However, it has to be noted then you will have to bring your own schema migrations for moving from one environment to other.
Below are the steps to sync schema changes.
### 1. From the `Project dashboard` > `Data Sources`, click `Sync Metadata`
![sync metadata 2](https://github.com/nocodb/nocodb/assets/86527202/4a553142-8029-4890-bb97-ff37396fb578)
### 2. Changes carried outside GUI, identified by NocoDB are listed under `Sync state`
![sync metadata](https://github.com/nocodb/nocodb/assets/86527202/2cc77704-300d-47da-a570-d01e5ab076c1)
- If changes made to the database are not visible, click `Reload`
- Identified schema changes are identified for each table in `red`
- `Sync now` button gets activated, if Schema changes are identified by NocoDB
![image](https://user-images.githubusercontent.com/35857179/219831855-bcac229c-41b6-4689-b7e1-c3cdfe23a0a1.png)
### 4. Click `Sync Now` to complete Schema sync procedure
#### Notes
1. Column rename operation will be treated like `column delete` & `column create` operation.
2. Only table schema changes identified will be listed under `Sync state`. Any changes to records are automatically synchronized.

92
packages/noco-docs/docs/030.setup-and-usages/130.share-base.md

@ -1,92 +0,0 @@
---
title: "Share Base"
description: "Procedures to share a base & generating embedded iframe"
---
## Generate Share base
- Open Project
- Click on `Share` button to the top right in the top navigation bar
![share button](https://github.com/nocodb/nocodb/assets/86527202/44d85978-ad27-40a6-9fd5-ea17a0bd3a79)
- Under `Shared base` section and toggle `Enable public access` to enable shared base
![Share base modal](https://github.com/nocodb/nocodb/assets/86527202/4fc4e98a-d180-476d-8b5a-6a5903f081fc)
- Share base link generated is displayed over & can be used to share this project to others. Click `Copy Link` to copy URL
![shared base enable access](https://github.com/nocodb/nocodb/assets/86527202/c5d18e7d-69cb-474c-94f2-d863d8cbc2b3)
## Modify Share base
Modifying `Share base` will invalidate the `Share base` link generated previously and will generate a new link.
- Open Project base
- Click on 'Share' button on top right tool bar
- Toggle ``Enable public access`` to disable base share
- Toggle ``Enable public access`` to re-enable base share & generate a new link
## Disable Share base
Disabling `Share base` will invalidate the generated `Share base` link
- Open Project base
- Click on 'Share' button on top right tool bar
- Toggle ``Enable public access`` to disable base share
## Share base Access Permissions
Shared base can be configured as
- Viewer - User with the link will get **READ ONLY** access to the project data.
- Editor - User with the link will get **READ & WRITE** access to the project data.
Toggle `Enable Editor Access` button to configure permissions as desired
## Embeddable Frame
NocoDB interface can be embedded into existing applications easily by making use of [HTML IFRAME](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)) attribute.
### Generate embeddable HTML code
- Open Project base
- Click on 'Share' button on top right tool bar
- Under 'Shared base link' tab
- Click on button to copy 'Embeddable HTML code'
Example:
```html
<iframe
class="nc-embed"
src="https://nocodb-nocodb-rsyir.ondigitalocean.app/dashboard/#/nc/base/e3bba9df-4fc1-4d11-b7ce-41c4a3ad6810?embed"
frameBorder="0"
width="100%"
height="700"
style="background: transparent; border: 1px solid #ddd"
>
</iframe>
```
### Embed into application's HTML Body
Sample code with embedded iframe generated above
```html
<!DOCTYPE html>
<html>
<body>
<iframe
class="nc-embed"
src="http://localhost:3000/#/nc/base/7d4b551c-b5e0-41c9-a87b-f3984c21d2c7?embed"
frameBorder="0"
width="100%"
height="700"
style="background: transparent; "
></iframe>
</body>
</html>
```

31
packages/noco-docs/docs/030.setup-and-usages/140.share-view.md

@ -1,31 +0,0 @@
---
title: "Share View"
description: "Procedures to share a view"
---
## Generate Share View
- Open a table or a view
- Click `Share` button on the top right of the toolbar
![share button](https://github.com/nocodb/nocodb/assets/86527202/86d7d8c7-9ed8-4429-a9b8-d08c777e9579)
- Toggle `Enable public viewing` to create shared view link
![shared view](https://github.com/nocodb/nocodb/assets/86527202/5af71246-72cc-4516-ba35-590035f73d8e)
- You can enable `Restrict access with a password` if you want a password-protected view
- Or you can toggle `Allow Download` button to enable or disable download CSV/XLSX options in the shared view link
## Access Share View
- Access the link. If it is password-protected, enter the password to unlock.
![image](https://user-images.githubusercontent.com/35857179/194690379-e3d89df6-d9c1-4d9d-9e8c-7e59c3978d31.png)
- Otherwise, you should see the share view.
![image](https://user-images.githubusercontent.com/35857179/194690389-5b78e236-aacc-49c2-898e-110f95edd1e5.png)

53
packages/noco-docs/docs/030.setup-and-usages/150.keyboard-maneuver.md

@ -1,53 +0,0 @@
---
title: 'Keyboard Maneuver'
description: 'Keyboard shortcuts'
---
## Shortcuts
| Key | Behaviour |
|----------:|:------------------------|
| `ALT` `t` | Insert new table |
| `ALT` `r` | Insert new row |
| `ALT` `c` | Insert new column |
| `ALT` `f` | Toggle fullscreen mode |
| `ALT` `i` | Invite a member to team |
| `ALT` `,` | Open `Team & Settings` menu |
## Grid view
| Key | Behaviour |
|----------------:|:-------------------------------------------------------------------------------------|
| `⌘` `↑` | Jump to first record in this column (in same page) |
| `⌘` `↓` | Jump to last record in this column (in same page) |
| `⌘` `C` | Copy cell contents |
| `Enter` | Switch cell in focus to EDIT mode; opens modal/picker if cell is associated with one |
| `Esc` | Exit cell EDIT mode |
| `Delete` | Clear cell |
| `Space` | Expand current row |
| `←` `→` `↑` `↓` | General cell navigation |
| `Tab` | Move to next cell horizontally; if on last cell, move to next row beginning |
## Column type specific
| Datatype | Key | Behaviour |
|:----------------------:|------------:|:-----------------------------------|
| Text / Numerical cells | `←` `→` | Move cursor to the left / right |
| | `↑` `↓` | Move cursor to the beginning / end |
| Single Select | `↑` `↓` | Move between options |
| | `Enter` | Select option |
| Multi Select | `↑` `↓` | Move between options |
| | `Enter` | Select / deselect option |
| DateTime | `Ctrl` `;` | Select current date time |
| Link | `↑` `↓` | Move between options |
| | `Enter` | Link current selection |
| Checkbox | `Enter` | Toggle |
| Rating | `<0 ~ Max>` | Enter number to toggle rating |
## Expanded form
| Key | Behaviour |
|------------:|:-------------------------------|
| `⌘` `Enter` | Save current expanded form item |

84
packages/noco-docs/docs/030.setup-and-usages/160.views.md

@ -1,84 +0,0 @@
---
title: 'Views'
description: 'Understanding Views in NocoDB!'
---
## What's a View?
In a table, you can use different views to display your data. You can show specific fields in a View. You can also apply Sorting or Filtering to the View. Each View is independent, which means the configuration applying to View 1 will not apply to View 2.
To navigate different views, we can select the target one in the view sidebar. By default, Grid View will be created for you after creating the table. You can create multiple views of a type, as long as they have unique View names.
## View Types
### Grid View
Grid View, as a default type of view, allows you to display your data in a spreadsheet-like interface.
![1010-2 Grid](/img/content/grid.png)
### Form View
Form View allows you to arrange fields in a form to input data.
![1010-2 Form](/img/content/form.png)
You can drag-drop columns from the form to form-field-menu-bar as required.
### Gallery View
Gallery View allows you to display images as thumbnails with other fields just like a gallery.
![1010-2 Gallery](/img/content/gallery.png)
### Kanban View
Kanban View allows you to visualise your data using cards at various stacks.
![1010-2 Kanban](/img/content/kanban.png)
## View Permission Types
We can apply permission to each View. By default, Collaborative Views will be used. To see or change the view type, expand `view-tool-bar-menu` as shown below.
![locked view](https://github.com/nocodb/nocodb/assets/86527202/41b28e3b-f8c3-46b7-8e9e-894706379a1c)
### Collaborative Views (default)
- Collaborators with edit permissions or higher can change the view configurations
### Locked Views
- No one can edit view configurations until it is Unlocked
- All collaborators can only READ data from such views
### Personal Views
- Only you can edit the view configuration.
- Your personal views are hidden for other collaborators
- Are not available currently; will be enabled in future release
## View Operations
![view operations](https://github.com/nocodb/nocodb/assets/86527202/c210de4a-7bc2-4b21-bc64-e68c52c1ba21)
### Create a View
Click `+` in View-menu sidebar
### Rename a View
Double click on `view-name`, edit, click `enter`.
### Delete a View
Hover the target View and click the delete icon
> You cannot delete the very first Grid View (termed as `Default view`).
### Duplicate a View
Hover the target View and click the copy icon
### Reorder a View
Hover the target View and re-order it as needed by drag-drop the drag icon

70
packages/noco-docs/docs/030.setup-and-usages/170.account-settings.md

@ -1,70 +0,0 @@
---
title: 'Account Settings'
description: 'NocoDB provides Account Settings for managing your account or more for super admin'
---
## Overview
Account Settings allow you to manage your account such as your password or tokens.
![accounts access](https://github.com/nocodb/nocodb/assets/86527202/4f5e73a0-b4f7-47dc-9f2c-b6316e300bd5)
## Reset Password
![accounts reset pwd](https://github.com/nocodb/nocodb/assets/86527202/2817b902-c790-4e16-a1c6-6391a49fca30)
## Token Management
- Newly created tokens are associated with the created user and it will have all permissions that particular user has.
- Existing token will work as it is and only be visible to the super admin.
![Screenshot 2023-08-22 at 4 58 49 PM](https://github.com/nocodb/nocodb/assets/86527202/7513fa37-8427-49c9-96b6-632cb3b14d2d)
If you are a super admin, you can also manage all user roles in organization level.
## User Management
Permissions within NocoDB are divided into two levels: Organisation level and Project level.
### Organisation Level Permissions:
- `Org Level Creator`: Allows users to create new projects and access invited projects.
- `Org Level Viewer`: Allows users to access invited projects but does not permit the creation of new projects.
![Screenshot 2023-08-22 at 5 01 41 PM](https://github.com/nocodb/nocodb/assets/86527202/adf3610d-505d-44a2-9460-c33d23e89c66)
![Screenshot 2023-08-22 at 5 01 30 PM](https://github.com/nocodb/nocodb/assets/86527202/e32a5739-2b84-45c4-a1a2-d2823448eda7)
### Project Level Permissions:
- `Owner`: The user who created the project. A project can have only one owner. The owner persists until the project exists and the role is non-transferable. The owner has access to carry out any operations within the project, including deleting it.
- `Creator`: Has access to carry out any operations within the project except deleting the project and removing the "Owner."
- `Editor`: Can modify data but cannot modify the schema (add/remove columns, tables, users, and such).
- `Commenter`: Can neither modify data nor schema, can only see data and can mark row-level comments.
- `Viewer`: Can only see data.
Additional access details for project level permissions can be found [here](https://docs.nocodb.com/setup-and-usages/team-and-auth#advanced-options--configurations).
Please note that the above-mentioned Project Level Permissions are additional to the already defined Organisation Level Permissions.
In addition to the previously defined permissions, NocoDB also includes the role of "Super Admin." The "Super Admin" is the first user to sign up on this NocoDB installation. An organisation can have only one "Super Admin" and this role is non-transferable. The "Super Admin" will have the equivalent permissions of an "Org Level Creator" and "Owner" for all projects within the organisation.
## Enable / Disable Signup
Signup without an invitation is disabled by default and can be managed from UI by a super admin.
![Screenshot 2023-08-22 at 5 01 41 PM](https://github.com/nocodb/nocodb/assets/86527202/68ade5b3-5d5e-4d4b-8017-9990aeedfd34)
## App Store
![Screenshot 2023-08-22 at 5 02 26 PM](https://github.com/nocodb/nocodb/assets/86527202/e739a4b6-6ab6-4ee7-aac3-073d3aaf20ac)
We provide different integrations in three main categories.
| Category | App Name |
|---|---|
| Chat | Microsoft Teams <br/> Discord <br/> Twilio <br/> Whatsapp Twilio<br/> Mattermost<br/> Slack |
| Email | SMTP<br/> MailerSend<br/> AWS SES |
| Storage | AWS S3 <br/> Minio <br/> Google Cloud Storage <br/> Spaces <br/> Backblaze B2 <br/> Vultr Object Storage <br/> OvhCloud Object Storage <br/> Linode Object Storage <br/> UpCloud Object Storage <br/> Scaleway Object Storage |

14
packages/noco-docs/docs/030.setup-and-usages/180.languages.md

@ -1,14 +0,0 @@
---
title: 'Languages'
description: 'Multiple languages on Dashboard!'
---
NocoDB supports multiple languages on dashboard. By default, English will be used. However, if you prefer to display in other languages, you can do the following steps to change the language.
Open `Global Menu` (click on NocoDB on left top to access Global menu)
![language](https://github.com/nocodb/nocodb/assets/86527202/1b62dc7f-72c8-41ce-be43-7f4dd62be824)
and select the one you prefer.
If you want to help translate, please check out <a href ="../engineering/translation" target="_blank">i18n</a>. If you want to request a new language, please create an issue on <a href="https://github.com/nocodb/nocodb/issues" target="_blank">Github</a>.

33
packages/noco-docs/docs/030.setup-and-usages/190.expanded-form.md

@ -1,33 +0,0 @@
---
title: 'Expanded Form'
description: 'NocoDB provides Expanded Form to let you edit your data easily'
---
## Overview
Expanded Form allows you to edit a row data in a form. It also shows the activity feed such as user comments or revision history. It can be also shared by others by copying the record URL.
![expanded record](https://github.com/nocodb/nocodb/assets/86527202/fbefba54-9b88-44ba-a3bf-8853d849e88f)
## Expanding a Record
In a grid view, we can hover a row record and a doulbe arrow will be shown. By clicking it, the expanded form will be opened.
![expand record icon](https://github.com/nocodb/nocodb/assets/86527202/7df9ceb3-b9cf-4891-9e88-ab074a07393f)
Alternatively, we can highlight a cell and press the space bar. The expanded form for the correpsonding row will be opened.
## Activity Feed
In an expanded form comment section, disable `Comments only` checkbox to show the activity feed.
![expand record activity feed](https://github.com/nocodb/nocodb/assets/86527202/8f7f0f70-2f27-444c-95e4-f359f34319a9)
## Copy Record URL
In an expanded form, we can click `Copy Record URL` to share the record form to other authorized users.
![expand record copy record url](https://github.com/nocodb/nocodb/assets/86527202/5ce70067-444b-4caf-b491-3566a4c091ea)

83
packages/noco-docs/docs/030.setup-and-usages/200.import-airtable-to-sql-database-within-a-minute-for-free.md

@ -1,83 +0,0 @@
---
title: 'Import Airtable to NocoDB'
description: 'A complete import of your Airtable to any MySQL, Postgres, SQLite and SQL server databases within minutes'
---
NocoDB allows a complete import of your Airtable to any MySQL, Postgres, SQLite and SQL server databases within minutes.
:::info
Import from Airtable is in beta version. See [Importing Airtable To NocoDB](https://github.com/nocodb/nocodb/discussions/2122) for the migration notes.
:::
## Get Airtable Credentials
:::info
You need to retrieve API key and Shared Base ID / URL from Airtable.
:::
### Retrieve API Key
- Copy your Airtable API Key from [Airtable Accounts](https://airtable.com/account) page
![Screenshot 2022-05-16 at 1 50 07 PM](https://user-images.githubusercontent.com/86527202/168569905-48c16d6d-c44a-4337-be49-0ac3dc1f7b75.png)
### Retrieve Share Base ID / URL
See [here](https://support.airtable.com/hc/en-us/articles/205752117-Creating-a-base-share-link-or-a-view-share-link#basesharelink) for detailed procedures.
1. Open `Share` menu in your Project / Base
![Screenshot 2022-05-16 at 3 47 27 PM](https://user-images.githubusercontent.com/86527202/168572054-533b8c19-d76e-4add-b876-f1e0570ac33c.png)
2. Open tab `Share Publicly`
3. Enable `Turn on full base access`
4. Copy generated shared base URL
![Screenshot 2022-05-16 at 3 41 54 PM](https://user-images.githubusercontent.com/86527202/168572062-5dee065d-2394-426d-8f43-77ecc0c9b73f.png)
## Import Airtable to NocoDB
:::info
Prerequisites: <br/> - A NocoDB Project <br/> - Airtable Credentials
:::
Below are 3 simple steps
1. Go to your Project dashboard, click on `Import Data`
![import data](https://github.com/nocodb/nocodb/assets/86527202/e5ca7748-5918-4fec-a2f5-6ffa7ab753f8)
2. Select `Airtable`
![import data airtable](https://github.com/nocodb/nocodb/assets/86527202/c9f4aab6-4de3-4e24-808a-27d4f10104ce)
3. Input API key & Shared Base ID / URL (retrieved from `Get Airtable Credentials` above).
- <1> API Key
- <2> Share Base ID
- <3> Configuration option
- Import Data: disable this option to import only table & view schema's
- Import Secondary Views: disable this option to import only primary grid view per table
- Import Rollup Columns: disable this option to skip Rollup column import
- Import Lookup Columns: disable this option to skip Lookup column import
- Import Attachments Columns: disable this option to skip Attachment column import
- \<Not supported yet\> Import Formula Columns: disable this option to skip Formula (computation) column import
![Screenshot 2022-09-14 at 9 30 14 AM](https://user-images.githubusercontent.com/86527202/190057133-92807b16-4f2b-4c58-8bae-a2cfe677ee62.png)
<!-- ![image](https://user-images.githubusercontent.com/35857179/168779663-5bb1dac8-01bd-43fb-8638-318a66a0f4bf.png) -->
3. Click `Import` and you will see the status
4. Wait until `Go To Dashboard` button is activated on the modal. Import details are captured in log window.
![Screenshot 2022-09-14 at 9 33 42 AM](https://user-images.githubusercontent.com/86527202/190057152-be9ec6cb-e414-465c-8967-d1ad40478ce1.png)
<!-- ![image](https://user-images.githubusercontent.com/35857179/168779906-6163b23e-4bcc-4991-8a77-b2fa94e5dcf3.png) -->

44
packages/noco-docs/docs/030.setup-and-usages/210.usage-information.md

@ -1,44 +0,0 @@
---
title: 'Usage Information'
description: 'Non-sensitive and anonymous usage information'
---
NocoDB is a fast growing open source project which is UI heavy and we are committed to providing a solution that exceeds the expectations of the users and community.
We are also committed to continuing to develop and make NocoDB even better than it is today.
To that end, NocoDB contains a feature in which anonymous and otherwise non-sensitive data is collected.
This anonymous and non-sensitive data gives a better understanding of how users are interacting and using the product.
## Context
We will always continue to do hands-on UI/UX testing, surveys, issue tracking and roadmap.
Otherwise talk with the Community while striving to understand
and deliver what is being asked for and what is needed, by any means available.
However, these above actions alone are often insufficient
- To maintain an overall picture of the product usage.
- Prioritising the efforts.
- Impact of any breaking changes.
- To understand whether UI improvements are helpful to users.
## What we collect ?
We collect actions made on models (project, table, view, sharedView, user, hook, image, sharedBase etc) periodically with :
- System information (OS, node version, docker or npm)
- Environment (dev, staging, production)
- Instance information (Unique machine ID, database type, count of projects and users)
- Failures.
Our UI Dashboard is a Vuejs-Nuxtjs app. Actions taken on UI with completely anonymized route names are sent as payload.
## What we DO NOT collect ?
We do not collect any private or sensitive information, such as:
- Personally identifiable information
- Credential information (endpoints, ports, DB connections, username/password)
- Database/User data
## Opt-out
To disable usage information collection please set following environment variable.
> NC_DISABLE_TELE=true

98
packages/noco-docs/docs/030.setup-and-usages/230.team-and-auth.md

@ -1,98 +0,0 @@
---
title: 'Team & Auth'
description: 'Breakdown of roles & permissions for team user management'
---
## Accessing Collaboration menu
- Click on `Collaborators` tab from the `Project Dashboard`
![Collaorators](https://github.com/nocodb/nocodb/assets/86527202/548769b8-8678-4827-85cd-2c0af57ce876)
## User Management
### How to Add a User
Go to `Collaborators`, Enter the user's `E-mail`. Select `User Role`, and Click `Invite`.
![collaborators invite](https://github.com/nocodb/nocodb/assets/86527202/6b16b106-5b55-442c-bc1a-ab59977b330a)
> **Tip**: You can add multiple comma (,) seperated emails
If you do not have an SMTP sender configured, make sure to copy the invite link and manually send it to your collaborator.
![Collaborators- invite link](https://github.com/nocodb/nocodb/assets/86527202/704b4b38-ba39-40f6-ac0d-8d75811869c9)
### How to Update user permissions
Go to `Collaborators`, from the drop down for the user - change permissions as desired
![Collaborators update](https://github.com/nocodb/nocodb/assets/86527202/e2d4037d-e15e-47ca-8cc6-56e53cb53f88)
------
### User Role Permissions
### Advanced Options & Configurations
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
| Audit | ✅ | ✅ | ❌ | ❌ | ❌ |
| App Store | ✅ | ❌ | ❌ | ❌ | ❌ |
| Team & Auth | ✅ | ❌ | ❌ | ❌ | ❌ |
| Project Metadata | ✅ | ❌ | ❌ | ❌ | ❌ |
| New user: Add Owner | ✅ | ❌ | ❌ | ❌ | ❌ |
| New user: Add Creator | ✅ | ❌ | ❌ | ❌ | ❌ |
| New user: Add Editor | ✅ | ✅ | ❌ | ❌ | ❌ |
| New user: Add Commenter | ✅ | ✅ | ❌ | ❌ | ❌ |
| New user: Add Viewer | ✅ | ✅ | ❌ | ❌ | ❌ |
| View existing users | ✅ | ✅ | ❌ | ❌ | ❌ |
| Preview mode | ✅ | ✅ | ❌ | ❌ | ❌ |
### Schema Options
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
| Add table | ✅ | ✅ | ❌ | ❌ | ❌ |
| Delete table | ✅ | ✅ | ❌ | ❌ | ❌ |
| Modify table | ✅ | ✅ | ❌ | ❌ | ❌ |
| Add column | ✅ | ✅ | ❌ | ❌ | ❌ |
| Delete column | ✅ | ✅ | ❌ | ❌ | ❌ |
| Modify column | ✅ | ✅ | ❌ | ❌ | ❌ |
### Record Options
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
| Add row | ✅ | ✅ | ✅ | ❌ | ❌ |
| Delete row | ✅ | ✅ | ✅ | ❌ | ❌ |
| Modify row/ cell | ✅ | ✅ | ✅ | ❌ | ❌ |
| Expand row | ✅ | ✅ | ✅ | ❌ | ❌ |
| Right click on cell (add/edit row) | ✅ | ✅ | ✅ | ❌ | ❌ |
| View table data (cell) contents | ✅ | ✅ | ✅ | ✅ | ✅ |
### Comments
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
| View comments from others | ✅ | ✅ | ✅ | ✅ | ❌ |
| Add comments | ✅ | ✅ | ✅ | ✅ | ❌ |
### Views
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
| Create new view | ✅ | ✅ | ❌ | ❌ | ❌ |
| Share view | ✅ | ✅ | ❌ | ❌ | ❌ |
### Project Generals
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
| Created views access | ✅ | ✅ | ✅ | ✅ | ✅ |
| Filter fields/ Column | ✅ | ✅ | ✅ | ✅ | ✅ |
| Filter fields/ Query | ✅ | ✅ | ✅ | ✅ | ✅ |
| Sort fields | ✅ | ✅ | ✅ | ✅ | ✅ |
| Theme | ✅ | ✅ | ✅ | ✅ | ✅ |
| Auth token | ✅ | ✅ | ✅ | ✅ | ✅ |
| Project Info | ✅ | ✅ | ✅ | ✅ | ✅ |
| Swagger API | ✅ | ✅ | ✅ | ✅ | ✅ |

67
packages/noco-docs/docs/030.setup-and-usages/240.meta-management.md

@ -1,67 +0,0 @@
---
title: 'Data Sources'
description: 'NocoDB Data-Source sync, access control & re-config'
---
## Overview
`Data Sources` tab includes following functionalities
- Connect/manage external data source
- UI Access Control
- Relations
Note that, currently only one external data source can be added per project.
## Accessing Data Sources
Click `Data Sources` tab in `Project dashboard`
![data source](https://github.com/nocodb/nocodb/assets/86527202/fde9de36-93cd-4b9a-adbe-48666daa009d)
## Sync Metadata
Go to `Data Sources`, click ``Sync Metadata``, you can see your metadata sync status. If it is out of sync, you can sync the schema. See [Sync Schema](/setup-and-usages/sync-schema) for more.
![sync metadata](https://github.com/nocodb/nocodb/assets/86527202/2df4687f-c349-4fd5-a50c-9c6161d87795)
## UI Access Control
Go to `Data Sources`, click ``UI ACL``, you can control the access to each table by roles.
![ui acl](https://github.com/nocodb/nocodb/assets/86527202/2368a543-b985-4adc-8650-5447bf7ee55b)
## Relations
Go to `Data Sources`, click ``Relations``, you can see the ERD of your database.
![relations](https://github.com/nocodb/nocodb/assets/86527202/c3775d27-f75d-4263-8903-dd66427de4b4)
### Junction table names within Relations
- Enable `Show M2M Tables` within `Project Settings` menu
- Double click on `Show Columns` to see additional checkboxes get enabled.
- Enabling which you should be able to see junction tables and their table names.
![image](https://user-images.githubusercontent.com/35857179/219832436-9c1311c3-854c-4b31-9c94-8035dfba2a2b.png)
## Edit external database configuration parameters
Go to `Data Sources`, click ``Edit`` icon, you can re-configure database credentials.
Please make sure database configuration parameters are valid. Any incorrect parameters could lead to schema loss!
![edit db config](https://github.com/nocodb/nocodb/assets/86527202/8a609529-e4b9-4869-95ce-90bc1b4cfe4d)
## Unlink data source
Go to `Data Sources`, click ``Delete`` against the data source that you wish to un-link.
![datasource unlink](https://github.com/nocodb/nocodb/assets/86527202/39ba34d9-9e00-4bac-996c-48c08c8fc049)
## Data source visibility
Go to `Data Sources`, toggle ``Radio-button`` against the data source that you wish to hide/un-hide.
![datasource visibility](https://github.com/nocodb/nocodb/assets/86527202/d7da4046-4755-484e-877c-bd80dfcbeded)

14
packages/noco-docs/docs/030.setup-and-usages/250.audit.md

@ -1,14 +0,0 @@
---
title: 'Audit'
description: 'NocoDB provides all the user operation logs under Audit log'
---
## Overview
We are keeping all the user operation logs under Audit. To access it, Open `Data source` from `Project Dashboard`, select `Audit`
> We can disable audit logs by setting `NC_DISABLE_AUDIT` to `true`.
![Screenshot 2023-08-22 at 5 07 26 PM](https://github.com/nocodb/nocodb/assets/86527202/8ebd7d09-6298-4ea6-a4c6-a9dc1038ba21)
![Screenshot 2023-08-22 at 5 07 49 PM](https://github.com/nocodb/nocodb/assets/86527202/ab32b323-9b1f-46a9-99b8-ddbebf9a5cde)

18
packages/noco-docs/docs/030.setup-and-usages/260.project-settings.md

@ -1,18 +0,0 @@
---
title: 'Team & Settings > Project settings'
description: 'General project configuration options'
---
## Overview
Generic project configuration options are retained under `Project Settings` menu. To access it, click the down arrow button next to Project Name on the top left side, then select `Settings`.
![project settings](https://github.com/nocodb/nocodb/assets/86527202/04dd96f1-5c9d-4de8-bd02-a8b80a1c137c)
## Configurations
- Show M2M Tables: M2M (junction) tables are hidden by default (system tables). Enabling this will display these along with other tables in project tree view
- Show NULL in Cells: When enabled, NULL value in cell is explicitly displayed
- Show NULL & EMPTY in Filter: By default, NULL & EMPTY cells are treated alike. Enabling this will have additional filter options to differentiate
![project settings options](https://github.com/nocodb/nocodb/assets/86527202/d073dbe9-a6ec-449b-8b89-24215b0e40c0)

5
packages/noco-docs/docs/030.workspaces/010.overview.md

@ -0,0 +1,5 @@
---
title: 'Overview'
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

3
packages/noco-docs/docs/030.workspaces/020.create.md

@ -0,0 +1,3 @@
---
title: 'Create'
---

3
packages/noco-docs/docs/030.workspaces/040.delete.md

@ -0,0 +1,3 @@
---
title: 'Delete'
---

3
packages/noco-docs/docs/030.workspaces/050.configurations.md

@ -0,0 +1,3 @@
---
title: 'Configurations'
---

2
packages/noco-docs/docs/050.engineering/_category_.json → packages/noco-docs/docs/030.workspaces/_category_.json

@ -1,5 +1,5 @@
{
"label": "Engineering",
"label": "Workspaces",
"collapsible": true,
"collapsed": true
}

3
packages/noco-docs/docs/040.bases/010.base-overview.md

@ -0,0 +1,3 @@
---
title: 'Base overview'
---

3
packages/noco-docs/docs/040.bases/020.create-base.md

@ -0,0 +1,3 @@
---
title: 'Create base'
---

3
packages/noco-docs/docs/040.bases/060.create-base-using-template.md

@ -0,0 +1,3 @@
---
title: 'Create base using template'
---

3
packages/noco-docs/docs/040.bases/070.import-base-from-airtable.md

@ -0,0 +1,3 @@
---
title: 'Import base from Airtable'
---

3
packages/noco-docs/docs/040.bases/080.delete-base.md

@ -0,0 +1,3 @@
---
title: 'Delete base'
---

3
packages/noco-docs/docs/040.bases/090.actions-on-base.md

@ -0,0 +1,3 @@
---
title: 'Actions on base'
---

2
packages/noco-docs/docs/030.setup-and-usages/_category_.json → packages/noco-docs/docs/040.bases/_category_.json

@ -1,5 +1,5 @@
{
"label": "Product",
"label": "Bases",
"collapsible": true,
"collapsed": true
}

32
packages/noco-docs/docs/040.developer-resources/010.accessing-apis.md

@ -1,32 +0,0 @@
---
title: 'Accessing APIs'
description: 'How to access NocoDB APIs with Auth or API token?'
---
NocoDB APIs can be authorized by either Auth Token or API Token.
## Auth Token
Auth Token is a JWT Token generated based on the logged-in user. By default, the token is only valid for 10 hours. However, you can change the value by defining it using environment variable `NC_JWT_EXPIRES_IN`. If you are passing Auth Token, make sure that the header is called `xc-auth`.
- Go to NocoDB Project, click on `Nocodb` on top left, ``Copy Auth Token``.
![copy auth token](https://github.com/nocodb/nocodb/assets/86527202/d7e2810b-4268-43b3-8163-dfe1541fbf68)
## API Token
API tokens allows us to integrate seamlessly with 3rd party apps. See [API Tokens Management](../setup-and-usages/team-and-auth#api-tokens-management) for more.
## Swagger UI
You can interact with the API's resources via Swagger UI.
- Open project context menu, select ``Swagger: REST APIs``.
![swagger](https://github.com/nocodb/nocodb/assets/86527202/218f1286-775b-466b-b6d1-f8bd9c74f9ee)
- Click ``Authorize``, paste the token you copied in above steps and click `Authorize` to save.
![image](https://user-images.githubusercontent.com/35857179/164874471-29fc1630-ab99-4c25-8ce2-b41e5415e4be.png)

267
packages/noco-docs/docs/040.developer-resources/020.rest-apis.md

@ -1,267 +0,0 @@
---
title: 'REST APIs'
description: 'NocoDB REST API Overview'
---
Once you've created the schemas, you can manipulate the data or invoke actions using the REST APIs. We provide several types of APIs for different usages as below.
## API Overview
Here's the overview of all APIs. For the details, please check out <a href="https://all-apis.nocodb.com/" target="_blank">NocoDB API Documentation</a>.
You may also interact with the API's resources via `Swagger UI`
> Currently, the default value for {orgs} is <b>noco</b>. Users will be able to change it in the future release.
### Auth APIs
| Category | Method | Tag | Function Name | Path |
|---|---|---|---|---|
| Auth | Post | auth | signup | /api/v1/auth/user/signup |
| Auth | Post | auth | signin | /api/v1/auth/user/signin |
| Auth | Get | auth | me | /api/v1/auth/user/me |
| Auth | Post | auth | passwordForgot | /api/v1/auth/password/forgot |
| Auth | Post | auth | passwordChange | /api/v1/auth/password/change |
| Auth | Post | auth | passwordReset | /api/v1/auth/password/reset/{token} |
| Auth | Post | auth | tokenRefresh | /api/v1/auth/token/refresh |
| Auth | Post | auth | passwordResetTokenValidate | /api/v1/auth/token/validate/{token} |
| Auth | Post | auth | emailValidate | /api/v1/auth/email/validate/{email} |
### Public APIs
| Category | Method | Tag | Function Name | Path |
|---|---|---|---|---|
| Public | Get | public | sharedBaseGet | /api/v1/db/public/shared-base/{sharedBaseUuid}/meta |
| Public | Post | public | dataList | /api/v1/db/public/shared-view/{sharedViewUuid}/rows |
| Public | Get | public | dataNestedList | /api/v1/db/public/shared-view/{sharedViewUuid}/rows/{rowId}/{relationType}/{columnName} |
| Public | Post | public | dataCreate | /api/v1/db/public/shared-view/{sharedViewUuid}/rows |
| Public | Get | public | csvExport | /api/v1/db/public/shared-view/{sharedViewUuid}/rows/export/{type} |
| Public | Get | public | dataRelationList | /api/v1/db/public/shared-view/{sharedViewUuid}/nested/{columnName} |
| Public | Get | public | sharedViewMetaGet | /api/v1/db/public/shared-view/{sharedViewUuid}/meta |
| Public | Get | public | groupedDataList | /api/v1/db/public/shared-view/{sharedViewUuid}/group/{columnId} |
### Data APIs
| Category | Method | Tag | Function Name | Path |
|---|---|---|---|---|
| Data | Delete| dbTableRow | bulkDelete | /api/v1/db/data/bulk/{orgs}/{projectName}/{tableName}/ |
| Data | Post | dbTableRow | bulkCreate | /api/v1/db/data/bulk/{orgs}/{projectName}/{tableName}/ |
| Data | Patch | dbTableRow | bulkUpdate | /api/v1/db/data/bulk/{orgs}/{projectName}/{tableName}/ |
| Data | Patch | dbTableRow | bulkUpdateAll | /api/v1/db/data/bulk/{orgs}/{projectName}/{tableName}/all |
| Data | Delete| dbTableRow | bulkDeleteAll | /api/v1/db/data/bulk/{orgs}/{projectName}/{tableName}/all |
| Data | Get | dbTableRow | list | /api/v1/db/data/{orgs}/{projectName}/{tableName} |
| Data | Get | dbTableRow | findOne | /api/v1/db/data/{orgs}/{projectName}/{tableName}/find-one |
| Data | Get | dbTableRow | groupBy | /api/v1/db/data/{orgs}/{projectName}/{tableName}/groupby |
| Data | Get | dbTableRow | exist | /api/v1/db/data/{orgs}/{projectName}/{tableName}/{rowId}/exist |
| Data | Post | dbTableRow | create | /api/v1/db/data/{orgs}/{projectName}/{tableName} |
| Data | Get | dbTableRow | read | /api/v1/db/data/{orgs}/{projectName}/{tableName}/{rowId} |
| Data | Patch | dbTableRow | update | /api/v1/db/data/{orgs}/{projectName}/{tableName}/{rowId} |
| Data | Delete| dbTableRow | delete | /api/v1/db/data/{orgs}/{projectName}/{tableName}/{rowId} |
| Data | Get | dbTableRow | count | /api/v1/db/data/{orgs}/{projectName}/{tableName}/count |
| Data | Get | dbTableRow | groupedDataList | /api/v1/db/data/{orgs}/{projectName}/{tableName}/group/{columnId} |
| Data | Get | dbViewRow | list | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName} |
| Data | Get | dbViewRow | findOne | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/find-one |
| Data | Get | dbViewRow | groupBy | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/groupby |
| Data | Get | dbViewRow | exist | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/{rowId}/exist |
| Data | Post | dbViewRow | create | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName} |
| Data | Get | dbViewRow | read | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/{rowId} |
| Data | Patch | dbViewRow | update | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/{rowId} |
| Data | Delete| dbViewRow | delete | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/{rowId} |
| Data | Get | dbViewRow | count | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/count |
| Data | Get | dbViewRow | groupedDataList | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/group/{columnId} |
### Meta APIs
| Category | Method | Tag | Function Name | Path |
|---|---|---|---|---|
| Meta | Get | apiToken | list | /api/v1/db/meta/projects/{projectId}/api-tokens |
| Meta | Post | apiToken | create | /api/v1/db/meta/projects/{projectId}/api-tokens |
| Meta | Delete| apiToken | delete | /api/v1/db/meta/projects/{projectId}/api-tokens/{token} |
| Meta | Get | auth | projectUserList | /api/v1/db/meta/projects/{projectId}/users |
| Meta | Post | auth | projectUserAdd | /api/v1/db/meta/projects/{projectId}/users |
| Meta | Patch | auth | projectUserUpdate | /api/v1/db/meta/projects/{projectId}/users/{userId} |
| Meta | Delete| auth | projectUserRemove | /api/v1/db/meta/projects/{projectId}/users/{userId} |
| Meta | Post | auth | projectUserResendInvite | /api/v1/db/meta/projects/{projectId}/users/{userId}/resend-invite |
| Meta | Post | dbTable | create | /api/v1/db/meta/projects/{projectId}/tables |
| Meta | Get | dbTable | list | /api/v1/db/meta/projects/{projectId}/tables |
| Meta | Post | dbTableColumn | create | /api/v1/db/meta/tables/{tableId}/columns |
| Meta | Patch | dbTableColumn | update | /api/v1/db/meta/tables/{tableId}/columns/{columnId} |
| Meta | Delete| dbTableColumn | delete | /api/v1/db/meta/tables/{tableId}/columns/{columnId} |
| Meta | Post | dbTableColumn | primaryColumnSet | /api/v1/db/meta/tables/{tableId}/columns/{columnId}/primary |
| Meta | Get | dbTableFilter | get | /api/v1/db/meta/filters/{filterId} |
| Meta | Patch | dbTableFilter | update | /api/v1/db/meta/filters/{filterId} |
| Meta | Delete| dbTableFilter | delete | /api/v1/db/meta/filters/{filterId} |
| Meta | Get | dbTableFilter | read | /api/v1/db/meta/views/{viewId}/filters |
| Meta | Post | dbTableFilter | create | /api/v1/db/meta/views/{viewId}/filters |
| Meta | Get | dbTableFilter | get | /api/v1/db/meta/filters/{filterId} |
| Meta | Patch | dbTableFilter | update | /api/v1/db/meta/filters/{filterId} |
| Meta | Delete| dbTableFilter | delete | /api/v1/db/meta/filters/{filterId} |
| Meta | Get | dbTableFilter | childrenRead | /api/v1/db/meta/filters/{filterGroupId}/children |
| Meta | Get | dbTableSort | list | /api/v1/db/meta/views/{viewId}/sorts |
| Meta | Post | dbTableSort | create | /api/v1/db/meta/views/{viewId}/sorts |
| Meta | Get | dbTableSort | read | /api/v1/db/meta/sorts/{sortId} |
| Meta | Patch | dbTableSort | update | /api/v1/db/meta/sorts/{sortId} |
| Meta | Delete| dbTableSort | delete | /api/v1/db/meta/sorts/{sortId}/api/v1/db |
| Meta | Patch | dbTableWebhook | update | /api/v1/db/meta/hooks/{hookId} |
| Meta | Delete| dbTableWebhook | delete | /api/v1/db/meta/hooks/{hookId} |
| Meta | Get | dbTableWebhook | list | /api/v1/db/meta/tables/{tableId}/hooks |
| Meta | Post | dbTableWebhook | create | /api/v1/db/meta/tables/{tableId}/hooks |
| Meta | Post | dbTableWebhook | test | /api/v1/db/meta/tables/{tableId}/hooks/test |
| Meta | Get | dbTableWebhook | samplePayloadGet | /api/v1/db/meta/tables/{tableId}/hooks/samplePayload/{operation} |
| Meta | Get | dbTableWebhookFilter | read | /api/v1/db/meta/hooks/{hookId}/filters |
| Meta | Post | dbTableWebhookFilter | create | /api/v1/db/meta/hooks/{hookId}/filters |
| Meta | Get | dbView | list | /api/v1/db/meta/tables/{tableId}/views |
| Meta | Get | dbView | read | /api/v1/db/meta/tables/{tableId} |
| Meta | Patch | dbView | update | /api/v1/db/meta/tables/{tableId} |
| Meta | Delete| dbView | delete | /api/v1/db/meta/tables/{tableId} |
| Meta | Post | dbView | reorder | /api/v1/db/meta/tables/{tableId}/reorder |
| Meta | Post | dbView | formCreate | /api/v1/db/meta/tables/{tableId}/forms |
| Meta | Patch | dbView | formUpdate | /api/v1/db/meta/forms/{formViewId} |
| Meta | Get | dbView | formRead | /api/v1/db/meta/forms/{formViewId} |
| Meta | Patch | dbView | formColumnUpdate | /api/v1/db/meta/form-columns/{formViewColumnId} |
| Meta | Post | dbView | galleryCreate | /api/v1/db/meta/tables/{tableId}/galleries |
| Meta | Patch | dbView | galleryUpdate | /api/v1/db/meta/galleries/{galleryViewId} |
| Meta | Get | dbView | galleryRead | /api/v1/db/meta/galleries/{galleryViewId} |
| Meta | Post | dbView | kanbanCreate | /api/v1/db/meta/tables/{tableId}/kanbans |
| Meta | Patch | dbView | kanbanUpdate | /api/v1/db/meta/kanban/{kanbanViewId} |
| Meta | Get | dbView | kanbanRead | /api/v1/db/meta/kanbans/{kanbanViewId} |
| Meta | Post | dbView | mapCreate | /api/v1/db/meta/tables/{tableId}/maps |
| Meta | Patch | dbView | mapUpdate | /api/v1/db/meta/maps/{mapViewId} |
| Meta | Get | dbView | mapRead | /api/v1/db/meta/maps/{mapViewId} |
| Meta | Post | dbView | gridCreate | /api/v1/db/meta/tables/{tableId}/grids |
| Meta | Get | dbView | gridColumnsList | /api/v1/db/meta/grids/{gridId}/grid-columns |
| Meta | Patch | dbView | gridColumnUpdate | /api/v1/db/meta/grid-columns/{columnId} |
| Meta | Patch | dbView | update | /api/v1/db/meta/views/{viewId} |
| Meta | Delete| dbView | delete | /api/v1/db/meta/views/{viewId} |
| Meta | Post | dbView | showAllColumn | /api/v1/db/meta/views/{viewId}/show-all |
| Meta | Post | dbView | hideAllColumn | /api/v1/db/meta/views/{viewId}/hide-all |
| Meta | Get | dbViewColumn | list | /api/v1/db/meta/views/{viewId}/columns |
| Meta | Post | dbViewColumn | create | /api/v1/db/meta/views/{viewId}/columns |
| Meta | Patch | dbViewColumn | update | /api/v1/db/meta/views/{viewId}/columns/{columnId} |
| Meta | Get | dbViewShare | list | /api/v1/db/meta/views/{viewId}/share |
| Meta | Post | dbViewShare | create | /api/v1/db/meta/views/{viewId}/share |
| Meta | Patch | dbViewShare | update | /api/v1/db/meta/views/{viewId}/share |
| Meta | Delete| dbViewShare | delete | /api/v1/db/meta/views/{viewId}/share |
| Meta | Get | plugin | list | /api/v1/db/meta/plugins |
| Meta | Get | plugin | status | /api/v1/db/meta/plugins/{pluginTitle}/status |
| Meta | Post | plugin | test | /api/v1/db/meta/plugins/test |
| Meta | PATCH | plugin | update | /api/v1/db/meta/plugins/{pluginId} |
| Meta | Get | plugin | read | /api/v1/db/meta/plugins/{pluginId} |
| Meta | Get | project | metaGet | /api/v1/db/meta/projects/{projectId}/info |
| Meta | Get | project | modelVisibilityList | /api/v1/db/meta/projects/{projectId}/visibility-rules |
| Meta | Post | project | modelVisibilitySet | /api/v1/db/meta/projects/{projectId}/visibility-rules |
| Meta | Get | project | list | /api/v1/db/meta/projects |
| Meta | Post | project | create | /api/v1/db/meta/projects |
| Meta | Get | project | read | /api/v1/db/meta/projects/{projectId} |
| Meta | Delete| project | delete | /api/v1/db/meta/projects/{projectId} |
| Meta | Get | project | auditList | /api/v1/db/meta/projects/{projectId}/audits |
| Meta | Get | project | metaDiffGet | /api/v1/db/meta/projects/{projectId}/meta-diff |
| Meta | Post | project | metaDiffSync | /api/v1/db/meta/projects/{projectId}/meta-diff |
| Meta | Get | project | sharedBaseGet | /api/v1/db/meta/projects/{projectId}/shared |
| Meta | Delete| project | sharedBaseDisable | /api/v1/db/meta/projects/{projectId}/shared |
| Meta | Post | project | sharedBaseCreate | /api/v1/db/meta/projects/{projectId}/shared |
| Meta | Patch | project | sharedBaseUpdate | /api/v1/db/meta/projects/{projectId}/shared |
| Meta | Post | storage | upload | /api/v1/db/storage/upload |
| Meta | Post | storage | uploadByUrl | /api/v1/db/storage/upload-by-url |
| Meta | Get | utils | commentList | /api/v1/db/meta/audits/comments |
| Meta | Post | utils | commentRow | /api/v1/db/meta/audits/comments |
| Meta | Get | utils | commentCount | /api/v1/db/meta/audits/comments/count |
| Meta | Post | utils | auditRowUpdate | /api/v1/db/meta/audits/update |
| Meta | Get | utils | cacheGet | /api/v1/db/meta/cache |
| Meta | Delete| utils | cacheDelete | /api/v1/db/meta/cache |
| Meta | Post | utils | testConnection | /api/v1/db/meta/projects/connection/test |
| Meta | Get | utils | appInfo | /api/v1/db/meta/nocodb/info |
| Meta | Get | utils | appVersion | /api/v1/version |
| Meta | Get | utils | appHealth | /api/v1/health |
| Meta | Get | utils | aggregatedMetaInfo | /api/v1/aggregated-meta-info |
| Meta | Get | orgUsers | list | /api/v1/users |
| Meta | Post | orgUsers | add | /api/v1/users |
| Meta | Patch | orgUsers | update | /api/v1/users/{userId} |
| Meta | Delete | orgUsers | delete | /api/v1/users/{userId} |
| Meta | Get | orgTokens | list | /api/v1/tokens |
| Meta | Post | orgTokens | create | /api/v1/tokens |
| Meta | Delete | orgTokens | delete | /api/v1/tokens/{token} |
| Meta | Get | orgAppSettings | get | /api/v1/app-settings |
| Meta | Post | orgAppSettings | set | /api/v1/app-settings |
## Query params
| **Name** | **Alias** | **Use case** | **Default value** |**Example value** |
|---|---|---|---|---|
| [where](#comparison-operators) | [w](#comparison-operators) | Complicated where conditions | | `(colName,eq,colValue)~or(colName2,gt,colValue2)` <br />[Usage: Comparison operators](#comparison-operators) <br />[Usage: Logical operators](#logical-operators) |
| limit | l | Number of rows to get (SQL limit value) | 10 | 20 |
| offset | o | Offset for pagination (SQL offset value) | 0 | 20 |
| sort | s | Sort by column name, Use `-` as prefix for descending sort | | column_name |
| fields | f | Required column names in result | * | column_name1,column_name2 |
| shuffle | r | Shuffle the result for pagination | 0 | 1 (Only allow 0 or 1. Other values would see it as 0) |
<!--
| fields1 | f1 | Required column names in child result | * | column_name1,column_name2 |
| bt | | Comma-separated belongs to tables | `All belongs to tables` | [click here for example](#nested-parentbelongs-to) |
| bfields`<p>` | bf`<p>` | Required belongs to table column names in result. Where `<p>` refers to position of table name in `bt` parameter(starts from `1`) | primary key and primary value | [click here for example](#nested-parentbelongs-to) |
| hm | | Comma-separated has many tables | `All hasmany tables` | [click here for example](#nested-childrenhas-many) |
| hfields`<p>` | hf`<p>` | Required has many table column names in result. Where `<p>` refers to position of table name in `hm` parameter(starts from `1`) | primary key and primary value | [click here for example](#nested-childrenhas-many) |
| mm | | Comma-separated many to many tables | `All many to many tables` | [click here for example](#nested-childrenmany-to-many) |
| mfields`<p>` | mf`<p>` | Required many to many table column names in result. Where `<p>` refers to position of table name in `mm` parameter(starts from `1`) | primary key and primary value | [click here for example](#nested-childrenmany-to-many) |
-->
## Comparison Operators
| Operation | Meaning | Example |
|---|---|---|
| eq | equal | (colName,eq,colValue) |
| neq | not equal | (colName,neq,colValue) |
| not | not equal (alias of neq) | (colName,not,colValue) |
| gt | greater than | (colName,gt,colValue) |
| ge | greater or equal | (colName,ge,colValue) |
| lt | less than | (colName,lt,colValue) |
| le | less or equal | (colName,le,colValue) |
| is | is | (colName,is,true/false/null) |
| isnot | is not | (colName,isnot,true/false/null) |
| in | in | (colName,in,val1,val2,val3,val4) |
| btw | between | (colName,btw,val1,val2) |
| nbtw | not between | (colName,nbtw,val1,val2) |
| like | like | (colName,like,%name) |
| isWithin | is Within (Available in `Date` and `DateTime` only) | (colName,isWithin,sub_op) |
| allof | includes all of | (colName,allof,val1,val2,...) |
| anyof | includes any of | (colName,anyof,val1,val2,...) |
| nallof | does not include all of (includes none or some, but not all of) | (colName,nallof,val1,val2,...) |
| nanyof | does not include any of (includes none of) | (colName,nanyof,val1,val2,...) |
## Comparison Sub-Operators
The following sub-operators are available in `Date` and `DateTime` columns.
| Operation | Meaning | Example |
|-----------------|-------------------------|-----------------------------------|
| today | today | (colName,eq,today) |
| tomorrow | tomorrow | (colName,eq,tomorrow) |
| yesterday | yesterday | (colName,eq,yesterday) |
| oneWeekAgo | one week ago | (colName,eq,oneWeekAgo) |
| oneWeekFromNow | one week from now | (colName,eq,oneWeekFromNow) |
| oneMonthAgo | one month ago | (colName,eq,oneMonthAgo) |
| oneMonthFromNow | one month from now | (colName,eq,oneMonthFromNow) |
| daysAgo | number of days ago | (colName,eq,daysAgo,10) |
| daysFromNow | number of days from now | (colName,eq,daysFromNow,10) |
| exactDate | exact date | (colName,eq,exactDate,2022-02-02) |
For `isWithin` in `Date` and `DateTime` columns, the different set of sub-operators are used.
| Operation | Meaning | Example |
|------------------|-------------------------|-----------------------------------------|
| pastWeek | the past week | (colName,isWithin,pastWeek) |
| pastMonth | the past month | (colName,isWithin,pastMonth) |
| pastYear | the past year | (colName,isWithin,pastYear) |
| nextWeek | the next week | (colName,isWithin,nextWeek) |
| nextMonth | the next month | (colName,isWithin,nextMonth) |
| nextYear | the next year | (colName,isWithin,nextYear) |
| nextNumberOfDays | the next number of days | (colName,isWithin,nextNumberOfDays,10) |
| pastNumberOfDays | the past number of days | (colName,isWithin,pastNumberOfDays,10) |
## Logical Operators
| Operation | Example |
|---|---|
| ~or | (checkNumber,eq,JM555205)~or((amount, gt, 200)~and(amount, lt, 2000)) |
| ~and | (checkNumber,eq,JM555205)~and((amount, gt, 200)~and(amount, lt, 2000)) |
| ~not | ~not(checkNumber,eq,JM555205) |

68
packages/noco-docs/docs/040.developer-resources/030.sdk.md

@ -1,68 +0,0 @@
---
title: 'NocoDB SDK'
description: 'NocoDB SDK Overview'
---
We provide SDK for users to integrate with their applications. Currently only SDK for Javascript is supported.
:::note
The NocoDB SDK requires authorization token. If you haven't created one, please check out <a href="/developer-resources/accessing-apis" target="_blank">Accessing APIs</a> for details.
:::
## SDK For Javascript
### Install nocodb-sdk
```bash
pnpm i nocodb-sdk
```
### Import Api
```js
import { Api } from 'nocodb-sdk'
```
### Configure Api
The Api can be authorizated by either Auth Token or API Token.
#### Example: Auth Token
```js
const api = new Api({
baseURL: 'https://<HOST>:<PORT>',
headers: {
'xc-auth': '<AUTH_TOKEN>'
}
})
```
#### Example: API Token
```js
const api = new Api({
baseURL: 'https://<HOST>:<PORT>',
headers: {
'xc-token': '<API_TOKEN>'
}
})
```
### Call Functions
Once you have configured `api`, you can call different types of APIs by `api.<Tag>.<FunctionName>`.
:::note
For Tag and FunctionName, please check out the API table <a href="/developer-resources/rest-apis" target="_blank">here</a>.
:::
#### Example: Calling API - /api/v1/db/meta/projects/{projectId}/tables
```js
await api.dbTable.create(params)
```

491
packages/noco-docs/docs/040.developer-resources/040.webhooks.md

@ -1,491 +0,0 @@
---
title: "Webhooks"
description: "Webhooks allows user to trigger on certain operations on following database operations"
---
## Overview
You can employ webhooks to notify external systems whenever there are additions, updates, or removals of rows within NocoDB. This feature allows you to receive instantaneous notifications for any changes made to your database.
NocoDB also offers webhooks for bulk endpoints for creating, updating, or deleting multiple records simultaneously.
Note that, Webhooks currently are specific for associated table.
### Configure Webhook
To setup a new Webhook
1. Open `Details` tab in topbar,
2. Click on `Webhooks` tab
3. Click `Add New Webhook`
![webhook](https://github.com/nocodb/nocodb/assets/86527202/07f375af-f2c3-4d7c-9500-976f38b15c12)
Webhook configuration
![webhook config](https://github.com/nocodb/nocodb/assets/86527202/338c8f23-237c-4a00-870d-5221e00a1d34)
1. Name
2. Event
1. After Insert
2. After Update
3. After Delete
4. After Bulk Insert
5. After Bulk Update
6. After Bulk Delete
3. Type
| Trigger | Details |
| --------------- | ---------------------------------------------- |
| Email | Send email to certain email addresses |
| Slack | Notify via Slack channel |
| Microsoft Teams | Notify via Microsoft Teams channel |
| Discord | Notify via Discord channel |
| Mattermost | Notify via Mattermost channel |
| Twilio | Send SMS to certain mobile numbers |
| Whatsapp Twilio | Send Whatsapp messages to numbers using Twilio |
| URL | Invoke an HTTP API |
4. Action
1. GET
2. POST
3. DELETE
4. PUT
5. HEAD
6. PATCH
5. Type specific configuration : additional configuration details depending on webhook type selected
Example: `Link` for type `URL`
6. [Optional] Headers & Parameters :
Configure Request headers & parameters (if any)
7. [Optional] Condition :
Only records meeting the criteria will trigger webhook
8. [Optional] Test :
Test webhook (with sample payload) to verify if parameter are configured appropriately
9. Save
<!-- ![image](https://user-images.githubusercontent.com/35857179/166660248-a3c81a34-4334-48c2-846a-65759d761559.png) -->
### Enable/Disable Webhook
To disable a Webhook
- Open `Webhook` tab to find list of webhooks created
- Toggle `Activate` button to enable/disable
![Screenshot 2023-09-01 at 3 59 28 PM](https://github.com/nocodb/nocodb/assets/86527202/c62cca12-6164-46a8-87e5-179d28c989b6)
### Delete Webhook
To delete a Webhook
- Open `Webhook` tab to find list of webhooks created
- Click on `...` actions button associated with the webhook to be deleted
- Select `Delete`
![Screenshot 2023-09-01 at 4 01 46 PM](https://github.com/nocodb/nocodb/assets/86527202/23a8aec1-ba29-4be4-8143-f3c94198a88c)
### Duplicate Webhook
To duplicate a Webhook
- Open `Webhook` tab to find list of webhooks created
- Click on `...` actions button associated with the webhook to be duplicate
- Select `Duplicate`
![Screenshot 2023-09-01 at 4 01 46 PM](https://github.com/nocodb/nocodb/assets/86527202/23a8aec1-ba29-4be4-8143-f3c94198a88c)
A copy of the webhook will be created (disabled by default) with a suffix ` - Copy`
### Webhook Response Sample
#### Insert
```
{
"type": "records.after.insert",
"id": "9dac1c54-b3be-49a1-a676-af388145fa8c",
"data": {
"table_id": "md_xzru7dcqrecc60",
"table_name": "Film",
"view_id": "vw_736wrpoas7tr0c",
"view_name": "Film",
"rows": [
{
"FilmId": 1011,
"Title": "FOO",
"Language": {
"LanguageId": 1,
"Name": "English"
},
}
]
}
}
```
#### Update
```
{
"type": "records.after.update",
"id": "6a6ebfe4-b0b5-434e-b5d6-5212adbf82fa",
"data": {
"table_id": "md_xzru7dcqrecc60",
"table_name": "Film",
"view_id": "vw_736wrpoas7tr0c",
"view_name": "Film",
"previous_rows": [
{
"FilmId": 1,
"Title": "ACADEMY DINOSAUR",
"Description": "A Epic Drama of a Feminist in The Canadian Rockies",
"Actor List": [
{
"ActorId": 10,
"FirstName": "CHRISTIAN"
}
],
}
],
"rows": [
{
"FilmId": 1,
"Title": "ACADEMY DINOSAUR (Edited)",
"Actor List": [
{
"ActorId": 10,
"FirstName": "CHRISTIAN"
}
],
}
]
}
}
```
#### Delete
```
{
"type": "records.after.delete",
"id": "e593079f-70e5-4965-8944-5ff7aeed005c",
"data": {
"table_id": "md_xzru7dcqrecc60",
"table_name": "Film",
"view_id": "vw_736wrpoas7tr0c",
"view_name": "Film",
"rows": [
{
"FilmId": 1010,
"Title": "ALL-EDITED",
"Language": {
"LanguageId": 1,
"Name": "English"
},
}
]
}
}
```
#### Bulk Insert
```
{
"type": "records.after.bulkInsert",
"id": "f8397b06-a399-4a3a-b6b0-6d1c0c2f7578",
"data": {
"table_id": "md_xzru7dcqrecc60",
"table_name": "Film",
"view_id": "vw_3fq2e9q8drkblw",
"view_name": "GridView",
"rows_inserted": 2
}
}
```
#### Bulk Update
```
{
"type": "records.after.bulkUpdate",
"id": "e983cea5-8e38-438e-96a0-048751f6830b",
"data": {
"table_id": "md_xzru7dcqrecc60",
"table_name": "Film",
"view_id": "vw_3fq2e9q8drkblw",
"view_name": "Sheet-1",
"previous_rows": [
[
{
"FilmId": 1005,
"Title": "Q",
"Language": {
"LanguageId": 1,
"Name": "English"
},
},
{
"FilmId": 1004,
"Title": "P",
"Language": {
"LanguageId": 1,
"Name": "English"
}
}
]
],
"rows": [
[
{
"FilmId": 1005,
"Title": "Q-EDITED",
"Language": {
"LanguageId": 1,
"Name": "English"
}
},
{
"FilmId": 1004,
"Title": "P-EDITED",
"Language": {
"LanguageId": 1,
"Name": "English"
},
}
]
]
}
}
```
#### Bulk Delete
```
{
"type": "records.after.bulkDelete",
"id": "e7f1f4e5-7052-4ca2-9355-241ceb836f43",
"data": {
"table_id": "md_xzru7dcqrecc60",
"table_name": "Film",
"view_id": "vw_3fq2e9q8drkblw",
"view_name": "Sheet-1",
"rows": [
[
{
"FilmId": 1022,
"Title": "x",
"Language": {
"LanguageId": 1,
"Name": "English"
},
},
{
"FilmId": 1023,
"Title": "x",
"Language": {
"LanguageId": 1,
"Name": "English"
},
}
]
]
}
}
```
## Call Log
Call Log allows user to check the call history of the hook. By default, it has been disabled. However, it can be configured by using environment variable `NC_AUTOMATION_LOG_LEVEL`.
- `NC_AUTOMATION_LOG_LEVEL=OFF`: No logs will be displayed and no history will be inserted to meta database.
- `NC_AUTOMATION_LOG_LEVEL=ERROR`: only error logs will be displayed and history of error logs will be inserted to meta database.
- `NC_AUTOMATION_LOG_LEVEL=ALL`: Both error and success logs will be displayed and history of both types of logs will be inserted to meta database. **This option is only available for Enterprise Edition.**
![image](https://user-images.githubusercontent.com/35857179/228790148-1e3f21c7-9385-413a-843f-b93073ca6bea.png)
## Triggers
Webhooks allows user to trigger on certain operations on following database operations
- AFTER INSERT
- AFTER UPDATE
- AFTER DELETE
The triggers will trigger asynchronously without blocking the actual operation.
### Applications/services
| Trigger | Details |
| --------------- | ---------------------------------------------- |
| Email | Send email to certain email addresses |
| Slack | Notify via Slack channel |
| Microsoft Teams | Notify via Microsoft Teams channel |
| Discord | Notify via Discord channel |
| Mattermost | Notify via Mattermost channel |
| Twilio | Send SMS to certain mobile numbers |
| Whatsapp Twilio | Send Whatsapp messages to numbers using Twilio |
| URL | Invoke an HTTP API |
## Accessing Data: Handlebars
:::warning
You can accessing data using handlebars for v1 webhooks only.
:::
The current row data and other details will be available in the hooks payload so the user can use [handlebar syntax](https://handlebarsjs.com/guide/#simple-expressions) to use data.
> We are using [Handlebars](https://handlebarsjs.com/) library to parse the payload internally.
### Example
For a table with column names (id, title, created_at, updated_at).
For INSERT/ UPDATE based triggers, use following handlebars to access corresponding **data** fields.
- {{ **data**.id }}
- {{ **data**.title }}
- {{ **data**.created_at }}
- {{ **data**.updated_at }}
Note that, for Update trigger - all the fields in the ROW will be accessible, not just the field updated.
For DELETE based triggers, **only** {{ data.id }} is accessible representing ID of the column deleted.
### JSON format
Use {{ json data }} to dump complete data & user information available in JSON format
### Additional references:
[Handlebar Guide](https://handlebarsjs.com/guide/).
# Application Guide
## Discord
### 1. Create WebHook
- On Discord, open your Server Settings and head into the Integrations tab:
- Click the "Create Webhook" button to create a new webhook!
![Screenshot 2022-02-22 at 1 21 59 PM](https://user-images.githubusercontent.com/86527202/155087088-8f9fd762-9ff9-41a6-aed4-0f22add77fe6.png)
- Choose channel to which this webhook will post to.
- Copy webhook URL
![Screenshot 2022-02-22 at 1 23 18 PM](https://user-images.githubusercontent.com/86527202/155087126-c2cdd7b2-518a-46a5-82a5-aa90fe51a709.png)
(Sample webhook URL: https://discord.com/api/webhooks/945558283756908644/GNUtiGuzfOky6wZ4ce30XuXc1sbPK3Od7EC-4t6hihh5Fovv6oU9OsdT6mGuoL1QlTzj).
Detailed procedure for discord webhook described [here](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks).
### 2. Install Plugin
- Open 'App Store' (under Settings), hover over Discord tile. Click 'Install'.
![Screenshot 2022-09-14 at 10 47 59 AM](https://user-images.githubusercontent.com/86527202/190066333-04bab4eb-f114-48e5-b3f9-6327cadb1ca7.png)
<!-- ![Screenshot 2022-02-22 at 11 30 36 AM](https://user-images.githubusercontent.com/86527202/155085257-5bdde1d9-d7b5-471d-bf44-3c3920e7b853.png) -->
- Provide a name of your choice (not to be confused with Discord Channel name).
- Paste Discord Webhook URL copied from Step (1.) above.
![Screenshot 2022-09-14 at 10 52 14 AM](https://user-images.githubusercontent.com/86527202/190066365-90e3136b-db24-4514-aa89-c1fb371b33ee.png)
<!-- ![Screenshot 2022-02-22 at 11 31 21 AM](https://user-images.githubusercontent.com/86527202/155085287-f5e45aab-fd33-4138-a7a9-6eddc6dc140b.png) -->
### 3. Configure
- Open project and choose a table.
- Click 'More' > 'Webhooks'.
- Click 'Create webhook'
- Configure webhook
- **Title**: Name of your choice to identify this Webhook.
- **Event**: Trigger event. Choose between.
- After Insert: Trigger event for new ROW insertion.
- After Update: Trigger event for existing ROW updation.
- After Delete: Trigger event for ROW deletion
- **On Condition**: [Optional] Enable if you wish to associate additional condition/constraint with the trigger configured above.
- **Notification**: Select 'Discord'.
- **Select Discord Channels**: Select from the drop down list, channel name configured in Step (2). Please click on 'Reload' if drop down list is empty.
- **Body**: Message to be posted over Discord channel, via webhooks on trigger of configured event.
- Body can contain plain text &
- Handlebars {{ }}
## Slack
### 1. Create WebHook
- Details to create slack webhook are captured [here](https://api.slack.com/messaging/webhooks)
### 2. Install Plugin
- Procedure remain same as listed for DISCORD channel configuration above
### 3. Configure Webhook
- Procedure remain same as listed for DISCORD channel configuration above
## Microsoft Teams
### 1. Create WebHook
- On Teams, open your channel, click on three-dots menu (far right) and select 'Connectors'
<img width="319" alt="154971352-6912d53b-cf71-4edd-a319-1c85be85f0c5" src="https://user-images.githubusercontent.com/86527202/155095745-91abd708-834f-4f0e-a33c-ac362e60af0f.png" />
- Select incoming webhook & click 'Configure'
<img width="442" alt="154971434-0ced97f7-205a-4e2e-8f88-17092cb7771a" src="https://user-images.githubusercontent.com/86527202/155095741-b23ad6b2-1276-46e3-8ada-0d0a871115bb.png" />
- Create webhook, Copy webhook URL
![154971683-db16be7f-4f07-4447-8f2e-ac50e133bef8](https://user-images.githubusercontent.com/86527202/155095733-c339a914-5d78-408c-8f1e-9cd75a7783e8.png)
### 2. Install Plugin
- Open 'App Store' (under Settings), hover over 'Microsoft Teams' tile. Click 'Install'.
![Screenshot 2022-09-14 at 10 53 22 AM](https://user-images.githubusercontent.com/86527202/190066409-03311add-3b36-4521-acf7-dba5ffdef3fb.png)
<!-- ![Screenshot 2022-02-22 at 7 32 52 PM](https://user-images.githubusercontent.com/86527202/155148122-60844b42-7d2a-4c0f-9778-a5bc4f9c0107.png) -->
- Provide a name of your choice (not to be confused with Teams Channel name).
- Paste MS Teams Webhook URL copied from Step (1.) above.
![Screenshot 2022-09-14 at 10 53 31 AM](https://user-images.githubusercontent.com/86527202/190066430-838eaa69-ac2c-49ce-a0eb-d84c97964f8b.png)
<!-- <img width="414" alt="154971222-7fe2c25a-d8c6-46b0-ba1e-a05ff1cf6537" src="https://user-images.githubusercontent.com/86527202/155095720-ff1c052c-a4a7-4c10-8f30-d779dac336f3.png" /> -->
### 3. Configure
- Open project and choose a table.
- Click 'More' > 'Webhooks'.
- Click 'Create webhook'
- Configure webhook
- **Title**: Name of your choice to identify this Webhook.
- **Event**: Trigger event. Choose between.
- After Insert: Trigger event for new ROW insertion.
- After Update: Trigger event for existing ROW updation.
- After Delete: Trigger event for ROW deletion
- **On Condition**: [Optional] Enable if you wish to associate additional condition/constraint with the trigger configured above.
- **Notification**: Select 'Microsoft Teams'.
- **Select Teams Channels**: Select from the drop down list, channel name configured in Step (2). Please click on 'Reload' if drop down list is empty.
- **Body**: Message to be posted over Teams channel, via webhooks on trigger of configured event.
- Body can contain plain text &
- Handlebars {{ }}
## Webhook V2
Webhook v2 is available after v0.106.0. Here's the differences.
- Response Payload has been predefined and cannot configure in Body using Handlebars. The payload can be referenced under `Sample Payload` in Hook detail page.
- Support the following bulk operations:
- AFTER BULK INSERT
- AFTER BULK UPDATE
- AFTER BULK DELETE

138
packages/noco-docs/docs/040.developer-resources/050.upload-via-api.md

@ -1,138 +0,0 @@
---
title: 'Upload via API'
description: 'Upload files locally present or from public remote URL via API'
hide_table_of_contents: true
---
Sample code to upload files via API is listed below.
Assumes `http://localhost:8080/` as the base URL for the API calls.
# Upload local file
```
let axios = require("axios").default;
let FormData = require('form-data');
let fs = require('fs');
// Configurations
//
const project_id = '<Project Identifier>';
const table_id = '<Table Identifier>';
const xc_token = '<Auth Token>';
const file_path = '<Local File Path>';
// Insert Image
// @param image_path : local file path
// @return : JSON object to be used in insert record API for attachment field
//
async function insertImage (path) {
const formData = new FormData();
formData.append("file", fs.createReadStream(path));
const data = await axios({
url: 'http://localhost:8080/api/v1/db/storage/upload',
data: formData,
headers:{
'Content-Type':`multipart/form-data;`,
'xc-auth': xc_token
},
method: 'post',
// Optional : storage file path
params: {"path": "somePath"}
});
return data;
}
// Insert record with attachment
// Assumes a table with two columns :
// 'Title' of type SingleLineText and
// 'Attachment' of type Attachment
//
async function uploadFileExample() {
let response = await insertImage(file_path);
let row = {
"Title": "2",
"Attachment": response.data
};
await axios({
method: 'POST',
url: `http://localhost:8080/api/v1/db/data/noco/${project_id}/${table_id}`,
data: row,
headers: {
'xc-auth': xc_token
}
});
}
(async () => {
await uploadFileExample();
})();
```
# Upload via URL
```
let axios = require("axios").default;
let FormData = require('form-data');
let fs = require('fs');
// Configurations
//
const project_id = '<Project Identifier>';
const table_id = '<Table Identifier>';
const xc_token = '<Auth Token>';
// URL array : URLs of files to be uploaded
const URLs = [{ url: '<URL1>' }, { url: '<URL2>' }];
// Insert Image
// @param URLs : [] containing public URL for files to be uploaded
// @return : JSON object to be used in insert record API for attachment field
//
async function insertImageByURL (URL_array) {
const data = await axios({
url: 'http://localhost:8080/api/v1/db/storage/upload-by-url',
data: URL_array,
headers: {
'xc-auth': xc_token
},
method: 'post',
// Optional : storage file path
params: {"path": "somePath"}
});
return data;
}
// Insert record with attachment
// Assumes a table with two columns :
// 'Title' of type SingleLineText and
// 'Attachment' of type Attachment
//
async function uploadByUrlExample() {
let response = await insertImageByURL(URLs);
// Update two columns : Title and Attachment
let row = {
"Title": "3",
"Attachment": response.data
};
await axios({
method: 'POST',
url: `http://localhost:8080/api/v1/db/data/noco/${project_id}/${table_id}`,
data: row,
headers: {
'xc-auth': xc_auth
}
});
}
(async () => {
await uploadByUrlExample();
})();
```

16
packages/noco-docs/docs/050.engineering/010.architecture.md

@ -1,16 +0,0 @@
---
title: "Architecture Overview"
description: "Simple overview of NocoDB architecture"
hide_table_of_contents: true
---
By default, if `NC_DB` is not specified, then SQLite will be used to store your metadata. We suggest users to separate the metadata and user data in different databases.
![image](/img/architecture.png)
| Project Type | Metadata stored in | Data stored in |
|---------|-----------|--------|
| Create new project | NC_DB | NC_DB |
| Create new project with External Database | NC_DB | External Database |
| Create new project from Excel | NC_DB | NC_DB |

23
packages/noco-docs/docs/050.engineering/020.repository-structure.md

@ -1,23 +0,0 @@
---
title: "Repository structure"
description: "Repository Structure"
hide_table_of_contents: true
---
We use ``Lerna`` to manage multi-packages. We have the following [packages](https://github.com/nocodb/nocodb/tree/master/packages).
- ``packages/nc-cli`` : A CLI to create NocoDB app.
- ``packages/nocodb-sdk``: API client sdk of nocodb.
- ``packages/nc-gui``: NocoDB Frontend.
- ``packages/nc-lib-gui``: The build version of ``nc-gui`` which will be used in ``packages/nocodb``.
- ``packages/nc-plugin``: Plugin template.
- ``packages/noco-blog``: NocoDB Blog which will be auto-released to [nocodb/noco-blog](https://github.com/nocodb/noco-blog).
- ``packages/noco-docs``: NocoDB Documentation which will be auto-released to [nocodb/noco-docs](https://github.com/nocodb/noco-docs).
- ``packages/nocodb``: NocoDB Backend, hosted in [NPM](https://www.npmjs.com/package/nocodb).

50
packages/noco-docs/docs/050.engineering/030.development-setup.md

@ -1,50 +0,0 @@
---
title: "Development Setup"
description: "How to set-up your development environment"
---
## Clone the repo
```bash
git clone https://github.com/nocodb/nocodb
# change directory to the project root
cd nocodb
```
## Install dependencies
```bash
# run from the project root
pnpm i
```
## Start Frontend
```bash
# run from the project root
pnpm start:frontend
# runs on port 3000
```
## Start Backend
```bash
# run from the project root
pnpm start:backend
# runs on port 8080
```
Any changes made to frontend and backend will be automatically reflected in the browser.
## Enabling CI-CD for Draft PR
CI-CD will be triggered on moving a PR from draft state to `Ready for review` state & on pushing changes to `Develop`. To verify CI-CD before requesting for review, add label `trigger-CI` on Draft PR.
## Accessing CI-CD Failure Screenshots
For Playwright tests, screenshots are captured on the tests. These will provide vital clues for debugging possible issues observed in CI-CD. To access screenshots, Open link associated with CI-CD run & click on `Artifacts`
![Screenshot 2022-09-29 at 12 43 37 PM](https://user-images.githubusercontent.com/86527202/192965070-dc04b952-70fb-4197-b4bd-ca7eda066e60.png)

189
packages/noco-docs/docs/050.engineering/040.unit-testing.md

@ -1,189 +0,0 @@
---
title: "Writing Unit Tests"
description: "Overview to Unit Testing"
---
## Unit Tests
- All individual unit tests are independent of each other. We don't use any shared state between tests.
- Test environment includes `sakila` sample database and any change to it by a test is reverted before running other tests.
- While running unit tests, it tries to connect to mysql server running on `localhost:3306` with username `root` and password `password` (which can be configured) and if not found, it will use `sqlite` as a fallback, hence no requirement of any sql server to run tests.
### Pre-requisites
- MySQL is preferred - however tests can fallback on SQLite too
### Setup
```bash
pnpm --filter=nocodb install
# add a .env file
cp tests/unit/.env.sample tests/unit/.env
# open .env file
open tests/unit/.env
```
Configure the following variables
> DB_HOST : host
> DB_PORT : port
> DB_USER : username
> DB_PASSWORD : password
### Run Tests
``` bash
pnpm run test:unit
```
### Folder Structure
The root folder for unit tests is `packages/nocodb/tests/unit`
- `rest` folder contains all the test suites for rest apis.
- `model` folder contains all the test suites for models.
- `factory` folder contains all the helper functions to create test data.
- `init` folder contains helper functions to configure test environment.
- `index.test.ts` is the root test suite file which imports all the test suites.
- `TestDbMngr.ts` is a helper class to manage test databases (i.e. creating, dropping, etc.).
### Factory Pattern
- Use factories for create/update/delete data. No data should be directly create/updated/deleted in the test.
- While writing a factory make sure that it can be used with as less parameters as possible and use default values for other parameters.
- Use named parameters for factories.
```ts
createUser({ email, password})
```
- Use one file per factory.
### Walk through of writing a Unit Test
We will create an `Table` test suite as an example.
#### Configure test
We will configure `beforeEach` which is called before each test is executed. We will use `init` function from `nocodb/packages/nocodb/tests/unit/init/index.ts`, which is a helper function which configures the test environment(i.e resetting state, etc.).
`init` does the following things -
- It initializes a `Noco` instance(reused in all tests).
- Restores `meta` and `sakila` database to its initial state.
- Creates the root user.
- Returns `context` which has `auth token` for the created user, node server instance(`app`), and `dbConfig`.
We will use `createProject` and `createProject` factories to create a project and a table.
```typescript
let context;
beforeEach(async function () {
context = await init();
project = await createProject(context);
table = await createTable(context, project);
});
```
#### Test case
We will use `it` function to create a test case. We will use `supertest` to make a request to the server. We use `expect`(`chai`) to assert the response.
```typescript
it('Get table list', async function () {
const response = await request(context.app)
.get(`/api/v1/db/meta/projects/${project.id}/tables`)
.set('xc-auth', context.token)
.send({})
.expect(200);
expect(response.body.list).to.be.an('array').not.empty;
});
```
:::info
We can also run individual test by using `.only` in `describe` or `it` function and the running the test command.
:::
```typescript
it.only('Get table list', async () => {
```
#### Integrating the New Test Suite
We create a new file `table.test.ts` in `packages/nocodb/tests/unit/rest/tests` directory.
```typescript
import 'mocha';
import request from 'supertest';
import init from '../../init';
import { createTable, getAllTables } from '../../factory/table';
import { createProject } from '../../factory/project';
import { defaultColumns } from '../../factory/column';
import Model from '../../../../src/lib/models/Model';
import { expect } from 'chai';
function tableTest() {
let context;
let project;
let table;
beforeEach(async function () {
context = await init();
project = await createProject(context);
table = await createTable(context, project);
});
it('Get table list', async function () {
const response = await request(context.app)
.get(`/api/v1/db/meta/projects/${project.id}/tables`)
.set('xc-auth', context.token)
.send({})
.expect(200);
expect(response.body.list).to.be.an('array').not.empty;
});
}
export default function () {
describe('Table', tableTests);
}
```
We can then import the `Table` test suite to `Rest` test suite in `packages/nocodb/tests/unit/rest/index.test.ts` file(`Rest` test suite is imported in the root test suite file which is `packages/nocodb/tests/unit/index.test.ts`).
### Seeding Sample DB (Sakila)
```typescript
function tableTest() {
let context;
let sakilaProject: Project;
let customerTable: Model;
beforeEach(async function () {
context = await init();
/******* Start : Seeding sample database **********/
sakilaProject = await createSakilaProject(context);
/******* End : Seeding sample database **********/
customerTable = await getTable({project: sakilaProject, name: 'customer'})
});
it('Get table data list', async function () {
const response = await request(context.app)
.get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`)
.set('xc-auth', context.token)
.send({})
.expect(200);
expect(response.body.list[0]['FirstName']).to.equal('MARY');
});
}
```

218
packages/noco-docs/docs/050.engineering/050.playwright.md

@ -1,218 +0,0 @@
---
title: "Playwright E2E Testing"
description: "Overview to playwright based e2e tests"
---
## How to run tests
All the tests reside in `tests/playwright` folder.
Make sure to install the dependencies (in the playwright folder):
```bash
pnpm --filter=playwright install
pnpm exec playwright install --with-deps chromium
```
### Run Test Server
Start the backend test server (in `packages/nocodb` folder):
```bash
pnpm run watch:run:playwright
```
Start the frontend test server (in `packages/nc-gui` folder):
```bash
NUXT_PAGE_TRANSITION_DISABLE=true pnpm run dev
```
### Running all tests
For selecting db type, rename `.env.example` to `.env` and set `E2E_DEV_DB_TYPE` to `sqlite`(default), `mysql` or `pg`.
headless mode(without opening browser):
```bash
pnpm run test
```
with browser:
```bash
pnpm run test:debug
```
For setting up mysql(sakila):
```bash
docker-compose -f ./tests/playwright/scripts/docker-compose-mysql-playwright.yml up -d
```
For setting up postgres(sakila):
```bash
docker-compose -f ./tests/playwright/scripts/docker-compose-playwright-pg.yml
```
### Running individual tests
Add `.only` to the test you want to run:
```js
test.only('should login', async ({ page }) => {
// ...
})
```
```bash
pnpm run test
```
## Concepts
### Independent tests
- All tests are independent of each other.
- Each test starts with a fresh project with a fresh sakila database(option to not use sakila db is also there).
- Each test creates a new user(email as `user@nocodb.com`) and logs in with that user to the dashboard.
Caveats:
- Some stuffs are shared i.e, users, plugins etc. So be catious while writing tests touching that. A fix for this is in the works.
- In test, we prefix email and project with the test id, which will be deleted after the test is done.
### What to test
- UI verification. This includes verifying the state of the UI element, i.e if the element is visible, if the element has a particular text etc.
- Test should verify all user flow. A test has a default timeout of 60 seconds. If a test is taking more than 60 seconds, it is a sign that the test should be broken down into smaller tests.
- Test should also verify all the side effects the feature(i.e. On adding a new column type, should verify column deletion as well) will have, and also error cases.
- Test name should be descriptive. It should be easy to understand what the test is doing by just reading the test name.
### Playwright
- Playwright is a nodejs library for automating chromium, firefox and webkit.
- For each test, a new browser context is created. This means that each test runs in a new incognito window.
- For assertion always use `expect` from `@playwright/test` library. This library provides a lot of useful assertions, which also has retry logic built in.
## Page Objects
- Page objects are used to abstract over the components/page. This makes the tests more readable and maintainable.
- All page objects are in `tests/playwright/pages` folder.
- All the test related code should be in page objects.
- Methods should be as thin as possible and its better to have multiple methods than one big method, which improves reusability.
The methods of a page object can be classified into 2 categories:
- Actions: Performs an UI actions like click, type, select etc. Is also responsible for waiting for the element to be ready and the action to be performed. This included waiting for API calls to complete.
- Assertions: Asserts the state of the UI element, i.e if the element is visible, if the element has a particular text etc. Use `expect` from `@playwright/test` and if not use `expect.poll` to wait for the assertion to pass.
## Writing a test
Let's write a test for testing filter functionality.
For simplicity, we will have `DashboardPage` implemented, which will have all the methods related to dashboard page and also its child components like Grid, etc.
### Create a test suite
Create a new file `filter.spec.ts` in `tests/playwright/tests` folder and use `setup` method to create a new project and user.
```js
import { test, expect } from '@playwright/test';
import setup, { NcContext } from '../setup';
test.describe('Filter', () => {
let context: NcContext;
test.beforeEach(async ({ page }) => {
context = await setup({ page });
})
test('should filter', async ({ page }) => {
// ...
});
});
```
### Create a page object
Since filter is UI wise scoped to a `Toolbar` , we will add filter page object to `ToolbarPage` page object.
```js
export class ToolbarPage extends BasePage {
readonly parent: GridPage | GalleryPage | FormPage | KanbanPage;
readonly filter: ToolbarFilterPage;
constructor(parent: GridPage | GalleryPage | FormPage | KanbanPage) {
super(parent.rootPage);
this.parent = parent;
this.filter = new ToolbarFilterPage(this);
}
}
```
We will create `ToolbarFilterPage` page object, which will have all the methods related to filter.
```js
export class ToolbarFilterPage extends BasePage {
readonly toolbar: ToolbarPage;
constructor(toolbar: ToolbarPage) {
super(toolbar.rootPage);
this.toolbar = toolbar;
}
}
```
Here `BasePage` is an abstract class, which used to enforce structure for all page objects. Thus all page object *should* inherit `BasePage`.
- Helper methods like `waitForResponse` and `getClipboardText` (this can be access on any page object, with `this.waitForResponse`)
- Provides structure for page objects, enforces all Page objects to have `rootPage` property, which is the page object created in the test setup.
- Enforces all pages to have a `get` method which will return the locator of the main container of that page, hence we can have focused dom selection, i.e.
```js
// This will only select the button inside the container of the concerned page
await this.get().querySelector('button').count();
```
### Writing an action method
This a method which will reset/clear all the filters. Since this is an action method, it will also wait for the `delete` filter API to return. Ignoring this API call will cause flakiness in the test, down the line.
```js
async resetFilter() {
await this.waitForResponse({
uiAction: async () => await this.get().locator('.nc-filter-item-remove-btn').click(),
httpMethodsToMatch: ['DELETE'],
requestUrlPathToMatch: '/api/v1/db/meta/filters/',
});
}
```
### Writing an assertion/verification method
Here we use `expect` from `@playwright/test` library, which has retry logic built in.
```js
import { expect } from '@playwright/test';
async verifyFilter({ title }: { title: string }) {
await expect(
this.get().locator(`[data-testid="nc-fields-menu-${title}"]`).locator('input[type="checkbox"]')
).toBeChecked();
}
```
## Tips to avoid flakiness
- If an UI action, causes an API call or the UI state change, then wait for that API call to complete or the UI state to change.
- What to wait out can be situation specific, but in general, is best to wait for the final state to be reached, i.e. in the case of creating filter, while it seems like waiting for the filter API to complete is enough, but after its return the table rows are reloaded and the UI state changes, so its better to wait for the table rows to be reloaded.
## Accessing playwright report in the CI
- Open `Summary` tab in the CI workflow in github actions.
- Scroll down to `Artifacts` section.
- Access reports which suffixed with the db type and shard number(corresponding to the CI workerflow name). i.e `playwright-report-mysql-2` is for `playwright-mysql-2` workflow.
- Download it and run `pnpm install -D @playwright/test && npx playwright show-report ./` inside the downloaded folder.

164
packages/noco-docs/docs/050.engineering/060.builds-and-releases.md

@ -1,164 +0,0 @@
---
title: "Releases & Builds"
description: "NocoDB creates Docker and Binaries for each PR"
---
## Builds of NocoDB
There are 3 kinds of docker builds in NocoDB
- Release builds [nocodb/nocodb](https://hub.docker.com/r/nocodb/nocodb) : built during NocoDB release.
- Daily builds [nocodb/nocodb-daily](https://hub.docker.com/r/nocodb/nocodb-daily) : built every 6 hours from Develop branch.
- Timely builds [nocodb/nocodb-timely](https://hub.docker.com/r/nocodb/nocodb-timely): built for every PR and manually triggered PRs.
Below is an overview of how to make these builds and what happens behind the scenes.
## Release builds
### How to make a release build ?
- Click [NocoDB release action](https://github.com/nocodb/nocodb/actions/workflows/release-nocodb.yml)
- You should see the below screen
![image](https://user-images.githubusercontent.com/35857179/167240353-a02f690f-c865-4ade-8645-64382405c9ea.png)
- Change `Use workflow from` to `Branch: master`. If you choose the wrong branch, the workflow will be ended.
![image](https://user-images.githubusercontent.com/35857179/167240383-dda05f76-8323-4f4a-b3e7-9db886dbd68d.png)
- Then there would be two cases - you can either leave target tag and pervious tag blank or manually input some values
- Target Tag means the target deployment version, while Previous Tag means the latest version as of now. Previous Tag is used for Release Note only - showing the file / commit differences between two tags.
### Tagging
The naming convention would be following given the actual release tag is `0.100.0`
- `0.100.0-beta.0` (first version of pre-release)
- `0.100.0-beta.1` (include bug fix changes on top of the previous version)
- `0.100.0-beta.2`(include bug fix changes on top of the previous version)
- and so on ...
- `0.100.0` (actual release)
- `0.100.1` (minor bug fix release)
- `0.100.2` (minor bug fix release)
### Case 1: Leaving inputs blank
- If Previous Tag is blank, then the value will be fetched from [latest](https://github.com/nocodb/nocodb/releases/latest)
- If Target Tag is blank, then the value will be Previous Tag plus one. Example: 0.90.11 (Previous Tag) + 0.0.1 = 0.90.12 (Target Tag)
### Case 2: Manually Input
Why? Sometimes we may mess up in NPM deployment. As NPM doesn't allow us to redeploy to the same tag again, in this case we cannot just use the previous tag + 1. Therefore, we need to use previous tag + 2 instead and we manually configure it.
- After that, click `Run workflow` to start
- You can see Summary for the overall job status.
- Once `release-draft-note` and `release-executables` is finished, then go to [releases](https://github.com/nocodb/nocodb/releases), edit the draft note and save as draft for time being.
- Example: Adding header, update content if necessary, and click `Auto-generate release notes` to include more info.
- Once `release-docker` is finished, then test it locally first. You'll be expected to see `Upgrade Available` notification in UI as we haven't published the release note. (the version is retrieved from there)
- Once everything is finished, then publish the release note and the deployment is considered as DONE.
### How does release action work ?
#### validate-branch
To check if `github.ref` is master. Otherwise, other branches will be not accepted.
#### process-input
To enrich target tag or previous tag if necessary.
#### pr-to-master
Automate a PR from develop to master branch so that we know the actual differences between the previous tag and the current tag. We choose master branch for a deployment base.
#### release-npm
Build frontend and backend and release them to NPM. The changes during built such as version bumping will be committed and pushed to a temporary branch and an automated PR will be created and merged to master branch.
Note that once you publish with a certain tag, you cannot publish with the same tag again.
#### release-draft-note
Generate a draft release note. Some actions need to be done after this step.
#### release-docker
Build docker image and publish it to Docker Hub. It may take around 15 - 30 mins.
#### close-issues
Open issues marked with label `Status: Fixed` and `Status: Resolved` will be closed by bot automatically with comment mentioning the fix is included in which version.
Example:
![image](https://user-images.githubusercontent.com/35857179/167241574-f8f7061f-c689-444a-b761-0a727974c53f.png)
#### publish-docs
Publish Documentations
#### update-sdk-path
`nocodb-sdk` is used in frontend and backend. However, in develop branch, the value would be `file:../nocodb-sdk` for development purpose (so that the changes done in nocodb-sdk in develop will be included in frontend and backend). During the deployment, the value will be changed to the target tag. This job is to update them back.
#### sync-to-develop
Once the deployment is finished, there would be some new changes being pushed to master branch. This job is to sync the changes back to develop so that both branch won't have any difference.
## Daily builds
### What are daily builds ?
- NocoDB creates every 6 hours from develop branches and publishes as nocodb/nocodb-daily
- This is so that we can easily try what is in the develop branch easily.
### Docker images
- The docker images will be built and pushed to Docker Hub (See [nocodb/nocodb-daily](https://hub.docker.com/r/nocodb/nocodb-daily/tags) for the full list).
## Timely builds
### What are timely builds ?
NocoDB has github actions which creates docker and binaries for each PR! And these can be found as a **comment on the last commit** of the PR.
Example shown below
- Go to a PR and click on the comment.
<img width="1111" alt="Screenshot 2023-01-23 at 15 46 36" src="https://user-images.githubusercontent.com/5435402/214083736-80062398-3712-430f-9865-86b110090c91.png" />
- Click on the link to copy the docker image and run it locally.
<img width="1231" alt="Screenshot 2023-01-23 at 15 46 55" src="https://user-images.githubusercontent.com/5435402/214083755-945d9485-2b9e-4739-8408-068bdf4a84b7.png" />
This is to
- reduce pull request cycle time
- allow issue reporters / reviewers to verify the fix without setting up their local machines
### Docker images
When a non-draft Pull Request is created, reopened or synchronized, a timely build for Docker would be triggered for the changes only included in the following paths.
- `packages/nocodb-sdk/**`
- `packages/nc-gui/**`
- `packages/nc-plugin/**`
- `packages/nocodb/**`
The docker images will be built and pushed to Docker Hub (See [nocodb/nocodb-timely](https://hub.docker.com/r/nocodb/nocodb-timely/tags) for the full list). Once the image is ready, Github bot will add a comment with the command in the pull request. The tag would be `<NOCODB_CURRENT_VERSION>-pr-<PR_NUMBER>-<YYYYMMDD>-<HHMM>`.
![image](https://user-images.githubusercontent.com/35857179/175012097-240dab05-da93-4c4e-87c1-1c36fb1350bd.png)
## Executables or Binaries
Similarly, we provide a timely build for executables for non-docker users. The source code will be built, packaged as binary files, and pushed to Github (See [nocodb/nocodb-timely](https://github.com/nocodb/nocodb-timely/releases) for the full list).
Currently, we only support the following targets:
- `node16-linux-arm64`
- `node16-macos-arm64`
- `node16-win-arm64`
- `node16-linux-x64`
- `node16-macos-x64`
- `node16-win-x64`
Once the executables are ready, Github bot will add a comment with the commands in the pull request.
![image](https://user-images.githubusercontent.com/35857179/175012070-f5f3e7b8-6dc5-4d1c-9f7e-654bc5039521.png)
NocoDB creates Docker and Binaries for each PR.
This is to
- reduce pull request cycle time
- allow issue reporters / reviewers to verify the fix without setting up their local machines

78
packages/noco-docs/docs/050.engineering/070.translation.md

@ -1,78 +0,0 @@
---
title: "i18n translation"
description: "Contribute to NocoDB's i18n translation"
---
- NocoDB supports 30+ foreign languages & community contributions are now simplified via [Crowdin](https://crowdin.com/).
## How to add / edit translations ?
### Using Github
- For English, make changes directly to [en.json](https://github.com/nocodb/nocodb/blob/develop/packages/nc-gui/lang/en.json) & commit to `develop`
- For any other language, use `crowdin` option.
### Using Crowdin
- Setup [Crowdin](https://crowdin.com) account
- Join [NocoDB](https://crowdin.com/project/nocodb) project
![Screenshot 2022-09-08 at 10 26 23 PM](https://user-images.githubusercontent.com/86527202/189181511-51b8671e-bee8-45d5-8216-a4a031bc6309.png)
- Click the language that you wish to contribute
![Screenshot 2022-09-08 at 10 29 56 PM](https://user-images.githubusercontent.com/86527202/189182132-0eed7d5a-eaa1-43e1-929d-688f375763c1.png)
- Click the `Translate` button; this opens up `Crowdin Online Editor`
![Screenshot 2022-09-08 at 10 32 17 PM](https://user-images.githubusercontent.com/86527202/189182450-999124e8-566c-40af-9d3c-731a11c1b6aa.png)
- Select string in `English` on the left-hand menu bar [1]
- Propose changes [2]
- Save [3]
Note: Crowdin provides translation recommendation's as in [4]. Click directly if it's apt
![Screenshot 2022-09-08 at 10 37 38 PM](https://user-images.githubusercontent.com/86527202/189184278-69d688ed-4e5a-4d5a-b629-9f6d10d79346.png)
A GitHub Pull Request will be automatically triggered (periodicity- 6 hours). We will follow up on remaining integration work items.
#### Reference
Refer following articles to get additional details about Crowdin Portal usage
- [Translator Introduction](https://support.crowdin.com/crowdin-intro/)
- [Volunteer Translation Introduction](https://support.crowdin.com/for-volunteer-translators/)
- [Online Editor](https://support.crowdin.com/online-editor/)
## How to add a new language ?
#### GitHub changes
- Update enumeration in `enums.ts` [packages/nc-gui/lib/enums.ts]
- Map JSON path in `a.i18n.ts` [packages/nc-gui/plugins/a.i18n.ts]
#### Crowdin changes [admin only]
- Open `NocoDB` project
- Click on `Language` on the home tab
- Select target language, `Update`
- Update array in `tests/playwright/tests/language.spec.ts`
![Screenshot 2022-09-08 at 10 52 59 PM](https://user-images.githubusercontent.com/86527202/189186570-5c1c7cad-6d3f-4937-ab4d-fa7ebe022cb1.png)
![Screenshot 2022-09-08 at 10 54 04 PM](https://user-images.githubusercontent.com/86527202/189186632-0b9f5f55-0550-4d8f-a8ae-7e9b9076774e.png)
## String Categories
- **General**: simple & common tokens (save, cancel, submit, open, close, home, and such)
- **Objects**: objects from NocoDB POV (project, table, field, column, view, page, and such)
- **Title**: screen headers (compact) (menu headers, modal headers)
- **Lables**: text box/ radio/ field headers (few words) (Labels over textbox, radio buttons, and such)
- **Activity**/ actions: work items (few words) (Create Project, Delete Table, Add Row, and such)
- **Tooltip**: additional information associated with work items (usually lengthy) (Additional information provided for activity)
- **Placeholder**: placeholders associated with various textboxes (Text placeholders)
- **Msg**
- Info: general/success category for everything
- Error: warnings & errors
- Toast: pop-up toast messages
> Note: string name should be in camelCase. Use above list as priority order in case of ambiguity.

3
packages/noco-docs/docs/050.tables/010.table-overview.md

@ -0,0 +1,3 @@
---
title: 'Table overview'
---

3
packages/noco-docs/docs/050.tables/020.create.md

@ -0,0 +1,3 @@
---
title: 'Create'
---

3
packages/noco-docs/docs/050.tables/040.duplicate.md

@ -0,0 +1,3 @@
---
title: 'Duplicate'
---

3
packages/noco-docs/docs/050.tables/050.delete.md

@ -0,0 +1,3 @@
---
title: 'Delete'
---

3
packages/noco-docs/docs/050.tables/060.import-csv.md

@ -0,0 +1,3 @@
---
title: 'Import from CSV'
---

3
packages/noco-docs/docs/050.tables/070.import-excel.md

@ -0,0 +1,3 @@
---
title: 'Import from Excel'
---

3
packages/noco-docs/docs/050.tables/080.import-json.md

@ -0,0 +1,3 @@
---
title: 'Import from JSON'
---

3
packages/noco-docs/docs/050.tables/090.import-data.md

@ -0,0 +1,3 @@
---
title: 'Import Data into an existing Table'
---

3
packages/noco-docs/docs/050.tables/100.configurations.md

@ -0,0 +1,3 @@
---
title: 'Configurations'
---

2
packages/noco-docs/docs/040.developer-resources/_category_.json → packages/noco-docs/docs/050.tables/_category_.json

@ -1,5 +1,5 @@
{
"label": "Developer Resources",
"label": "Tables",
"collapsible": true,
"collapsed": true
}

3
packages/noco-docs/docs/060.fields/010.fields-overview.md

@ -0,0 +1,3 @@
---
title: 'Fields overview'
---

3
packages/noco-docs/docs/060.fields/020.create.md

@ -0,0 +1,3 @@
---
title: 'Create'
---

3
packages/noco-docs/docs/060.fields/040.duplicate.md

@ -0,0 +1,3 @@
---
title: 'Duplicate'
---

3
packages/noco-docs/docs/060.fields/050.delete.md

@ -0,0 +1,3 @@
---
title: 'Delete'
---

3
packages/noco-docs/docs/060.fields/060.configurations.md

@ -0,0 +1,3 @@
---
title: 'Configurations'
---

5
packages/noco-docs/docs/060.fields/_category_.json

@ -0,0 +1,5 @@
{
"label": "Columns",
"collapsible": true,
"collapsed": true
}

3
packages/noco-docs/docs/070.records/010.rows-overview.md

@ -0,0 +1,3 @@
---
title: 'Overview'
---

3
packages/noco-docs/docs/070.records/020.create.md

@ -0,0 +1,3 @@
---
title: 'Create'
---

3
packages/noco-docs/docs/070.records/040.duplicate.md

@ -0,0 +1,3 @@
---
title: 'Duplicate'
---

3
packages/noco-docs/docs/070.records/050.delete.md

@ -0,0 +1,3 @@
---
title: 'Delete'
---

3
packages/noco-docs/docs/070.records/060.comments.md

@ -0,0 +1,3 @@
---
title: 'Comments'
---

3
packages/noco-docs/docs/070.records/070.configurations.md

@ -0,0 +1,3 @@
---
title: 'Configurations'
---

5
packages/noco-docs/docs/070.records/_category_.json

@ -0,0 +1,5 @@
{
"label": "Records",
"collapsible": true,
"collapsed": true
}

3
packages/noco-docs/docs/080.views/010.overview.md

@ -0,0 +1,3 @@
---
title: 'Overview'
---

3
packages/noco-docs/docs/080.views/020.create.md

@ -0,0 +1,3 @@
---
title: 'Create'
---

3
packages/noco-docs/docs/080.views/040.duplicate.md

@ -0,0 +1,3 @@
---
title: 'Duplicate'
---

3
packages/noco-docs/docs/080.views/050.delete.md

@ -0,0 +1,3 @@
---
title: 'Delete'
---

3
packages/noco-docs/docs/080.views/060.configurations.md

@ -0,0 +1,3 @@
---
title: 'Configurations'
---

3
packages/noco-docs/docs/080.views/090.view-types/010.grid.md

@ -0,0 +1,3 @@
---
title: 'Grid'
---

3
packages/noco-docs/docs/080.views/090.view-types/020.gallery.md

@ -0,0 +1,3 @@
---
title: 'Gallery'
---

3
packages/noco-docs/docs/080.views/090.view-types/030.forms.md

@ -0,0 +1,3 @@
---
title: 'Forms'
---

3
packages/noco-docs/docs/080.views/090.view-types/040.kanban.md

@ -0,0 +1,3 @@
---
title: 'Kanban'
---

5
packages/noco-docs/docs/080.views/090.view-types/_category_.json

@ -0,0 +1,5 @@
{
"label": "Types",
"collapsible": true,
"collapsed": true
}

5
packages/noco-docs/docs/080.views/_category_.json

@ -0,0 +1,5 @@
{
"label": "Views",
"collapsible": true,
"collapsed": true
}

3
packages/noco-docs/docs/090.collaboration/010.overview.md

@ -0,0 +1,3 @@
---
title: 'Overview'
---

5
packages/noco-docs/docs/090.collaboration/_category_.json

@ -0,0 +1,5 @@
{
"label": "Collaboration",
"collapsible": true,
"collapsed": true
}

3
packages/noco-docs/docs/100.permissions/010.overview.md

@ -0,0 +1,3 @@
---
title: 'Overview'
---

5
packages/noco-docs/docs/100.permissions/_category_.json

@ -0,0 +1,5 @@
{
"label": "Permissions",
"collapsible": true,
"collapsed": true
}

3
packages/noco-docs/docs/110.automation/010.overview.md

@ -0,0 +1,3 @@
---
title: 'Overview'
---

5
packages/noco-docs/docs/110.automation/020.Webhook/_category_.json

@ -0,0 +1,5 @@
{
"label": "Webhook",
"collapsible": true,
"collapsed": true
}

5
packages/noco-docs/docs/110.automation/_category_.json

@ -0,0 +1,5 @@
{
"label": "Automation",
"collapsible": true,
"collapsed": true
}

3
packages/noco-docs/docs/120.account-settings/010.overview.md

@ -0,0 +1,3 @@
---
title: 'Overview'
---

5
packages/noco-docs/docs/120.account-settings/_category_.json

@ -0,0 +1,5 @@
{
"label": "Account Settings",
"collapsible": true,
"collapsed": true
}

0
packages/noco-docs/docs/060.FAQs.md → packages/noco-docs/docs/990.FAQs.md

Loading…
Cancel
Save