diff --git a/README.md b/README.md index 5a1da703e9..64f105633d 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Turns any MySQL, PostgreSQL, SQL Server, SQLite & MariaDB into a smart-spreadshe

WebsiteDiscord • + CommunityTwitterRedditDocumentation @@ -51,9 +52,11 @@ Turns any MySQL, PostgreSQL, SQL Server, SQLite & MariaDB into a smart-spreadshe # Quick try -### 1-Click Deploy -#### Heroku +## 1-Click Deploy to Heroku + +Before doing so, make sure you have a Heroku account. By default, an add-on Heroku Postgres will be used as meta database. You can see the connection string defined in `DATABASE_URL` by navigating to Heroku App Settings and selecting Config Vars. + Deploy NocoDB to Heroku with 1-Click -
-### Using Docker -```bash -docker run -d --name nocodb -p 8080:8080 nocodb/nocodb:latest -``` +
-- NocoDB needs a database as input : See [Production Setup](https://github.com/nocodb/nocodb/blob/master/README.md#production-setup). -- If this input is absent, we fallback to SQLite. In order too persist sqlite, you can mount `/usr/app/data/`. +## NPX - Example: +You can run below command if you need an interactive configuration. - ``` - docker run -d -p 8080:8080 --name nocodb -v /local/path:/usr/app/data/ nocodb/nocodb:latest - ``` - -### Using Npm ``` npx create-nocodb-app ``` -### Using Git -``` + + +## 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 ``` -### GUI +## Docker + +```bash +# for SQLite +docker run -d --name nocodb \ +-v /local/path:/usr/app/data/ \ +-p 8080:8080 \ +nocodb/nocodb:latest + +# for MySQL +docker run -d --name nocodb-mysql \ +-v /local/path:/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 + +# for PostgreSQL +docker run -d --name nocodb-postgres \ +-v /local/path:/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 + +# for MSSQL +docker run -d --name nocodb-mssql \ +-v /local/path:/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 +``` + +> To persist data in docker you can mount volume at `/usr/app/data/` since 0.10.6. Otherwise your data will be lost after recreating the container. + +> 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. + +```bash +git clone https://github.com/nocodb/nocodb +# for MySQL +cd nocodb/docker-compose/mysql +# for PostgreSQL +cd nocodb/docker-compose/pg +# for MSSQL +cd nocodb/docker-compose/mssql +docker-compose up -d +``` + +> To persist data in docker, you can mount volume at `/usr/app/data/` since 0.10.6. Otherwise your data will be lost after recreating the container. + +> 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). + +# GUI + Access Dashboard using : [http://localhost:8080/dashboard](http://localhost:8080/dashboard) # Join Our Community - + + + + # Screenshots @@ -128,7 +188,8 @@ Access Dashboard using : [http://localhost:8080/dashboard](http://localhost:8080 ![10](https://user-images.githubusercontent.com/5435402/133759250-ebd75ecf-31db-4a17-b2d7-2c43af78a54e.png)
-![8](https://user-images.githubusercontent.com/5435402/133759248-3a7141e0-4b7d-4079-a5f9-cf8611d00bc5.png) +![8](https://user-images.githubusercontent.com/35857179/163675704-54eb644d-3b5e-45e3-aad4-794a0f55c692.png) +
![9](https://user-images.githubusercontent.com/5435402/133759249-8c1a85c2-a55c-48f6-bd58-aa6b4195cce7.png) @@ -136,27 +197,25 @@ Access Dashboard using : [http://localhost:8080/dashboard](http://localhost:8080 # Table of Contents - [Quick try](#quick-try) - + [1-Click Deploy](#1-click-deploy) - - [Heroku](#heroku) - + [Using Docker](#using-docker) - + [Using Npm](#using-npm) - + [Using Git](#using-git) - + [GUI](#gui) + * [1-Click Deploy to Heroku](#1-click-deploy-to-heroku) + * [NPX](#npx) + * [Node Application](#node-application) + * [Docker](#docker) + * [Docker Compose](#docker-compose) +- [GUI](#gui) - [Join Our Community](#join-our-community) - [Screenshots](#screenshots) +- [Table of Contents](#table-of-contents) - [Features](#features) + [Rich Spreadsheet Interface](#rich-spreadsheet-interface) - + [App Store for workflow automations](#app-store-for-workflow-automations) - + [Programmatic API access via](#programmatic-api-access-via) + + [App Store for Workflow Automations](#app-store-for-workflow-automations) + + [Programmatic Access](#programmatic-access) + + [Sync Schema](#sync-schema) + + [Audit](#audit) - [Production Setup](#production-setup) - * [Docker](#docker) - - [Example: MySQL](#example--mysql) - - [Example: PostgreSQL](#example--postgresql) - - [Example: SQL Server](#example--sql-server) - * [Docker Compose](#docker-compose) * [Environment variables](#environment-variables) - [Development Setup](#development-setup) - * [Cloning the project](#clone-the-project) + * [Cloning the Project](#cloning-the-project) * [Running Backend locally](#running-backend-locally) * [Running Frontend locally](#running-frontend-locally) * [Running Cypress tests locally](#running-cypress-tests-locally) @@ -166,66 +225,44 @@ Access Dashboard using : [http://localhost:8080/dashboard](http://localhost:8080 - [Contributors](#contributors) # Features + ### Rich Spreadsheet Interface -- ⚡  Search, sort, filter, hide columns with uber ease -- ⚡  Create Views : Grid, Gallery, Kanban, Form -- ⚡  Share Views : public & password protected -- ⚡  Personal & locked Views -- ⚡  Upload images to cells (Works with S3, Minio, GCP, Azure, DigitalOcean, Linode, OVH, BackBlaze) -- ⚡  Roles : Owner, Creator, Editor, Viewer, Commenter, Custom Roles. -- ⚡  Access Control : Fine-grained access control even at database, table & column level. - -### App Store for workflow automations -- ⚡  Chat : Microsoft Teams, Slack, Discord, Mattermost -- ⚡  Email : SMTP, SES, Mailchimp -- ⚡  SMS : Twilio -- ⚡  Whatsapp -- ⚡  Any 3rd Party APIs - -### Programmatic API access via -- ⚡  REST APIs (Swagger) -- ⚡  GraphQL APIs. -- ⚡  Includes JWT Authentication & Social Auth -- ⚡  API tokens to integrate with Zapier, Integromat. -# Production Setup -NocoDB requires a database to store metadata of spreadsheets views and external databases. -And connection params for this database can be specified in `NC_DB` environment variable. +- ⚡  Basic Operations: Create, Read, Update and Delete on Tables, Columns, and Rows +- ⚡  Fields Operations: Sort, Filter, Hide / Unhide Columns +- ⚡  Multiple Views Types: Grid (By default), Gallery and Form View +- ⚡  View Permissions Types: Collaborative Views, & Locked Views +- ⚡  Share Bases / Views: either Public or Private (with Password Protected) +- ⚡  Variant Cell Types: ID, LinkToAnotherRecord, Lookup, Rollup, SingleLineText, Attachement, Currency, Formula and etc +- ⚡  Access Control with Roles : Fine-grained Access Control at different levels +- ⚡  and more ... -## Docker +### App Store for Workflow Automations -#### Example: MySQL -``` -docker run -d -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 -``` +We provide different integrations in three main categories. See App Store for details. -#### Example: PostgreSQL -``` -docker run -d -p 8080:8080 \ - -e NC_DB="pg://host:port?u=user&p=password&d=database" \ - -e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \ - nocodb/nocodb:latest -``` +- ⚡  Chat : Slack, Discord, Mattermost, and etc +- ⚡  Email : AWS SES, SMTP, MailerSend, and etc +- ⚡  Storage : AWS S3, Google Cloud Storage, Minio, and etc -#### Example: SQL Server -``` -docker run -d -p 8080:8080 \ - -e NC_DB="mssql://host:port?u=user&p=password&d=database" \ - -e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \ - nocodb/nocodb:latest -``` +### Programmatic Access -## Docker Compose -``` -git clone https://github.com/nocodb/nocodb -cd nocodb -cd docker-compose -cd mysql or pg or mssql -docker-compose up -d -``` +We provide the following ways to let users to invoke actions in a programmatic way. You can use a token (either JWT or Social Auth) to sign your requests for authorization to NocoDB. + +- ⚡  REST APIs +- ⚡  NocoDB SDK + +### Sync Schema + +We allow 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 environment to others. See Sync Schema for details. + +### Audit + +We are keeping all the user operation logs under one place. See Audit for details. + +# Production Setup + +By default, SQLite is used for storing meta data. However, you can specify your own database. The connection params for this database can be specified in `NC_DB` environment variable. Moreover, we also provide the below environment variables for configuration. ## Environment variables @@ -262,7 +299,6 @@ Changes made to code automatically restart. > nocodb/packages/nocodb includes nc-lib-gui which is the built version of nc-gui hosted in npm registry. You can visit localhost:8000/dashboard in browser after starting the backend locally if you just want to modify the backend only. - ## Running Cypress tests locally ```shell @@ -411,8 +447,3 @@ Our mission is to provide the most powerful no-code interface for databases whic - - - - - diff --git a/packages/nc-gui/assets/img/discourse-icon.png b/packages/nc-gui/assets/img/discourse-icon.png new file mode 100644 index 0000000000..cec51f759a Binary files /dev/null and b/packages/nc-gui/assets/img/discourse-icon.png differ diff --git a/packages/nc-gui/components/importantAnnouncement.vue b/packages/nc-gui/components/importantAnnouncement.vue index c854f008b4..c330badf46 100644 --- a/packages/nc-gui/components/importantAnnouncement.vue +++ b/packages/nc-gui/components/importantAnnouncement.vue @@ -3,7 +3,7 @@ @@ -148,7 +145,7 @@ export default { onDelete: 'NO ACTION', onUpdate: 'NO ACTION', updateRelation: !!this.column.rtn, - relationType: 'real' + virtual: this.isSQLite } }, methods: { diff --git a/packages/nc-gui/components/project/spreadsheet/components/extras.vue b/packages/nc-gui/components/project/spreadsheet/components/extras.vue index 8c7d33c75f..6d47361485 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/extras.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/extras.vue @@ -30,7 +30,7 @@ dense > - + mdi-discord @@ -40,7 +40,33 @@ }} + + + + + mdi-discourse + + {{ + $t('labels.community.joinCommunity') + }} + + + + + + mdi-reddit + + {{ + $t('labels.community.joinReddit') + }} + + + @@ -52,21 +78,6 @@ - - - - mdi-reddit - - {{ - $t('labels.community.joinReddit') - }} - - - @@ -126,6 +137,19 @@ export default { } } +.v-icon.discourse { + height: 16px; + width: 16px; + background-image: url('~/assets/img/discourse-icon.png'); + background-size: contain; + background-repeat: no-repeat; +} + +.v-icon.discourse::before { + visibility: hidden; + content: ""; +} + // //@keyframes anim { // 0%, 100% { diff --git a/packages/nc-gui/components/project/spreadsheet/components/virtualCell/belongsToCell.vue b/packages/nc-gui/components/project/spreadsheet/components/virtualCell/belongsToCell.vue index 39eb7a4ac9..1f4c7fcd74 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/virtualCell/belongsToCell.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/virtualCell/belongsToCell.vue @@ -281,7 +281,7 @@ export default { const id = this.meta.columns.filter(c => c.pk).map(c => this.row[c.title]).join('___') // todo: audit - await this.$api.dbTableRow.nestedDelete( + await this.$api.dbTableRow.nestedRemove( 'noco', this.projectName, this.meta.title, diff --git a/packages/nc-gui/components/project/spreadsheet/components/virtualCell/hasManyCell.vue b/packages/nc-gui/components/project/spreadsheet/components/virtualCell/hasManyCell.vue index 71fe16590c..287ce0e566 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/virtualCell/hasManyCell.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/virtualCell/hasManyCell.vue @@ -342,11 +342,13 @@ export default { return } const id = this.childMeta.columns.filter(c => c.pk).map(c => child[c.title]).join('___') - await this.$api.data.nestedDelete( - this.meta.id, + await this.$api.dbTableRow.nestedRemove( + 'noco', + this.projectName, + this.meta.title, this.parentId, - this.column.id, - 'hm', + RelationTypes.HAS_MANY, + this.column.title, id ) @@ -440,15 +442,18 @@ export default { // eslint-disable-next-line no-cond-assign while (child = this.localState.pop()) { if (row) { - // todo: use common method const pid = this.meta.columns.filter(c => c.pk).map(c => row[c.title]).join('___') const id = this.childMeta.columns.filter(c => c.pk).map(c => child[c.title]).join('___') - const title = this.childForeignKey - await this.childApi.update(id, { - [title]: parseIfInteger(pid) - }, { - [title]: child[this.childForeignKey] - }) + + await this.$api.dbTableRow.nestedAdd( + 'noco', + this.projectName, + this.meta.title, + pid, + 'hm', + this.column.title, + id + ) } else { await this.addChildToParent(child) } diff --git a/packages/nc-gui/components/project/spreadsheet/components/virtualCell/manyToManyCell.vue b/packages/nc-gui/components/project/spreadsheet/components/virtualCell/manyToManyCell.vue index dfd5bf4d8b..9ada97bc6a 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/virtualCell/manyToManyCell.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/virtualCell/manyToManyCell.vue @@ -318,7 +318,7 @@ export default { const cid = this.childMeta.columns.filter(c => c.pk).map(c => child[c.title]).join('___') const pid = this.meta.columns.filter(c => c.pk).map(c => this.row[c.title]).join('___') - await this.$api.dbTableRow.nestedDelete( + await this.$api.dbTableRow.nestedRemove( 'noco', this.projectName, this.meta.title, @@ -461,16 +461,18 @@ export default { // eslint-disable-next-line no-cond-assign while (child = this.localState.pop()) { if (row) { - // todo: use common method const cid = this.childMeta.columns.filter(c => c.pk).map(c => child[c.title]).join('___') const pid = this.meta.columns.filter(c => c.pk).map(c => row[c.title]).join('___') - const vcidCol = this.assocMeta.columns.find(c => c.id === this.column.colOptions.fk_mm_parent_column_id).title - const vpidCol = this.assocMeta.columns.find(c => c.id === this.column.colOptions.fk_mm_child_column_id).title - await this.assocApi.insert({ - [vcidCol]: parseIfInteger(cid), - [vpidCol]: parseIfInteger(pid) - }) + await this.$api.dbTableRow.nestedAdd( + 'noco', + this.projectName, + this.meta.title, + pid, + 'mm', + this.column.title, + cid + ) } else { await this.addChildToParent(child) } diff --git a/packages/nc-gui/components/project/spreadsheet/dialog/createViewDialog.vue b/packages/nc-gui/components/project/spreadsheet/dialog/createViewDialog.vue index 105610f000..7d0095cf22 100644 --- a/packages/nc-gui/components/project/spreadsheet/dialog/createViewDialog.vue +++ b/packages/nc-gui/components/project/spreadsheet/dialog/createViewDialog.vue @@ -4,7 +4,7 @@

- {{ $t('general.create') }} {{ show_as }} {{ $t('objects.view') }} + {{ $t('general.create') }} {{ typeAlias }} {{ $t('objects.view') }}

diff --git a/packages/nc-gui/components/project/spreadsheet/views/formView.vue b/packages/nc-gui/components/project/spreadsheet/views/formView.vue index 21bbe64419..d0df0fb086 100644 --- a/packages/nc-gui/components/project/spreadsheet/views/formView.vue +++ b/packages/nc-gui/components/project/spreadsheet/views/formView.vue @@ -688,6 +688,10 @@ export default { } }, async updateView() { + if (this.view.subheading?.length > 255) { + this.$toast.error('Data too long for Form Description').goAway(3000) + return + } await this.$api.dbView.formUpdate(this.viewId, this.view) }, async loadView() { diff --git a/packages/nc-gui/components/releaseInfo.vue b/packages/nc-gui/components/releaseInfo.vue index 2ae6dc5fc8..e0932be815 100644 --- a/packages/nc-gui/components/releaseInfo.vue +++ b/packages/nc-gui/components/releaseInfo.vue @@ -3,7 +3,7 @@