⚡ Make the default workspace plan configurable
Set it with a `DEFAULT_WORKSPACE_PLAN` env variable Closes #152
This commit is contained in:
@ -1,9 +1,9 @@
|
|||||||
import prisma from '@/lib/prisma'
|
import prisma from '@/lib/prisma'
|
||||||
import { authenticatedProcedure } from '@/utils/server/trpc'
|
import { authenticatedProcedure } from '@/utils/server/trpc'
|
||||||
import { TRPCError } from '@trpc/server'
|
import { TRPCError } from '@trpc/server'
|
||||||
import { Plan } from 'db'
|
|
||||||
import { Workspace, workspaceSchema } from 'models'
|
import { Workspace, workspaceSchema } from 'models'
|
||||||
import { z } from 'zod'
|
import { z } from 'zod'
|
||||||
|
import { parseWorkspaceDefaultPlan } from '../../utils'
|
||||||
|
|
||||||
export const createWorkspaceProcedure = authenticatedProcedure
|
export const createWorkspaceProcedure = authenticatedProcedure
|
||||||
.meta({
|
.meta({
|
||||||
@ -39,8 +39,7 @@ export const createWorkspaceProcedure = authenticatedProcedure
|
|||||||
message: 'Workspace with same name already exists',
|
message: 'Workspace with same name already exists',
|
||||||
})
|
})
|
||||||
|
|
||||||
const plan =
|
const plan = parseWorkspaceDefaultPlan(user.email ?? '')
|
||||||
process.env.ADMIN_EMAIL === user.email ? Plan.LIFETIME : Plan.FREE
|
|
||||||
|
|
||||||
const newWorkspace = (await prisma.workspace.create({
|
const newWorkspace = (await prisma.workspace.create({
|
||||||
data: {
|
data: {
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
export { WorkspaceProvider, useWorkspace } from './WorkspaceProvider'
|
export { WorkspaceProvider, useWorkspace } from './WorkspaceProvider'
|
||||||
export * from './components'
|
export * from './components'
|
||||||
|
export { parseWorkspaceDefaultPlan } from './utils'
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
export * from './parseNewName'
|
export * from './parseNewName'
|
||||||
|
export * from './parseWorkspaceDefaultPlan'
|
||||||
export * from './setWorkspaceIdInLocalStorage'
|
export * from './setWorkspaceIdInLocalStorage'
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
import { Plan } from 'db'
|
||||||
|
|
||||||
|
export const parseWorkspaceDefaultPlan = (userEmail: string) => {
|
||||||
|
if (process.env.ADMIN_EMAIL === userEmail) return Plan.LIFETIME
|
||||||
|
const defaultPlan = process.env.DEFAULT_WORKSPACE_PLAN as Plan | undefined
|
||||||
|
if (defaultPlan && Object.values(Plan).includes(defaultPlan))
|
||||||
|
return defaultPlan
|
||||||
|
return Plan.FREE
|
||||||
|
}
|
@ -3,7 +3,6 @@ import {
|
|||||||
PrismaClient,
|
PrismaClient,
|
||||||
Prisma,
|
Prisma,
|
||||||
Invitation,
|
Invitation,
|
||||||
Plan,
|
|
||||||
WorkspaceRole,
|
WorkspaceRole,
|
||||||
WorkspaceInvitation,
|
WorkspaceInvitation,
|
||||||
Session,
|
Session,
|
||||||
@ -12,6 +11,7 @@ import type { Adapter, AdapterUser } from 'next-auth/adapters'
|
|||||||
import cuid from 'cuid'
|
import cuid from 'cuid'
|
||||||
import { got } from 'got'
|
import { got } from 'got'
|
||||||
import { generateId } from 'utils'
|
import { generateId } from 'utils'
|
||||||
|
import { parseWorkspaceDefaultPlan } from '@/features/workspace'
|
||||||
|
|
||||||
type InvitationWithWorkspaceId = Invitation & {
|
type InvitationWithWorkspaceId = Invitation & {
|
||||||
typebot: {
|
typebot: {
|
||||||
@ -53,11 +53,7 @@ export function CustomAdapter(p: PrismaClient): Adapter {
|
|||||||
name: data.name
|
name: data.name
|
||||||
? `${data.name}'s workspace`
|
? `${data.name}'s workspace`
|
||||||
: `My workspace`,
|
: `My workspace`,
|
||||||
...(process.env.ADMIN_EMAIL === data.email
|
plan: parseWorkspaceDefaultPlan(data.email),
|
||||||
? { plan: Plan.LIFETIME }
|
|
||||||
: {
|
|
||||||
plan: Plan.FREE,
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -5,7 +5,7 @@ slug: /
|
|||||||
|
|
||||||
# Welcome
|
# Welcome
|
||||||
|
|
||||||
[Typebot](https://www.typebot.io) Typebot is an open-source alternative to Landbot. It allows you to create conversational apps/forms (Lead qualification, Product launch, User onboarding, Customer support), embed them anywhere on your web/mobile apps, and collect results in real-time.
|
[Typebot](https://www.typebot.io) is an open-source alternative to Landbot. It allows you to create conversational apps/forms (Lead qualification, Product launch, User onboarding, Customer support), embed them anywhere on your web/mobile apps, and collect results in real-time.
|
||||||
|
|
||||||
This is the Typebot documentation. It's a great place to find most answers. Please use the search box in the top right or the navigation menu (soon available) on the left-hand side to find the answers you're looking for.
|
This is the Typebot documentation. It's a great place to find most answers. Please use the search box in the top right or the navigation menu (soon available) on the left-hand side to find the answers you're looking for.
|
||||||
|
|
||||||
|
@ -9,13 +9,14 @@ import { SponsorButton } from '../../../src/js/SponsorButton.jsx'
|
|||||||
## General
|
## General
|
||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ---------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| DATABASE_URL | postgresql://postgres:typebot@db:5432/typebot | The database URL |
|
| DATABASE_URL | | The database URL |
|
||||||
| ENCRYPTION_SECRET | SgVkYp2s5v8y/B?E(H+MbQeThWmZq4t6 | A 256-bit key used to encrypt sensitive data. It is strongly recommended to [generate](https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx) a new one. The secret should be the same between builder and viewer. |
|
| ENCRYPTION_SECRET | | A 256-bit key used to encrypt sensitive data. It is strongly recommended to [generate](https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx) a new one. The secret should be the same between builder and viewer. |
|
||||||
| ADMIN_EMAIL | -- | The email that will get a "Pro" plan on user creation |
|
| ADMIN_EMAIL | | The email that will get a "Pro" plan on user creation |
|
||||||
| NEXTAUTH_URL | http://localhost:3000 | The builder base URL. Should be the publicly accessible URL (i.e. `https://typebot.domain.com`) |
|
| NEXTAUTH_URL | | The builder base URL. Should be the publicly accessible URL (i.e. `https://typebot.domain.com`) |
|
||||||
| NEXT_PUBLIC_VIEWER_URL | http://localhost:3001 | The viewer base URL. Should be the publicly accessible URL (i.e. `https://bot.domain.com`) |
|
| NEXT_PUBLIC_VIEWER_URL | | The viewer base URL. Should be the publicly accessible URL (i.e. `https://bot.domain.com`) |
|
||||||
| NEXTAUTH_URL_INTERNAL | -- | The internal builder base URL. You have to set it only when `NEXTAUTH_URL` isn't publicly accessible |
|
| NEXTAUTH_URL_INTERNAL | | The internal builder base URL. You have to set it only when `NEXTAUTH_URL` isn't publicly accessible |
|
||||||
|
| DEFAULT_WORKSPACE_PLAN | FREE | Default workspace plan on user creation or when a user creates a new workspace. Possible values are `FREE`, `STARTER`, `PRO`, `LIFETIME`. The default plan for admin user is `LIFETIME` |
|
||||||
| DISABLE_SIGNUP | false | To disable new sign ups but still be able to sign in with existing users or admin email |
|
| DISABLE_SIGNUP | false | To disable new sign ups but still be able to sign in with existing users or admin email |
|
||||||
|
|
||||||
## Email (Auth, notifications)
|
## Email (Auth, notifications)
|
||||||
@ -24,11 +25,11 @@ Used for sending email notifications and authentication
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| --------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| SMTP_USERNAME | -- | SMTP username |
|
| SMTP_USERNAME | | SMTP username |
|
||||||
| SMTP_PASSWORD | -- | SMTP password |
|
| SMTP_PASSWORD | | SMTP password |
|
||||||
| SMTP_HOST | -- | SMTP host. (i.e. `smtp.host.com`) |
|
| SMTP_HOST | | SMTP host. (i.e. `smtp.host.com`) |
|
||||||
| SMTP_PORT | 25 | SMTP port |
|
| SMTP_PORT | 25 | SMTP port |
|
||||||
| NEXT_PUBLIC_SMTP_FROM | - | From name and email (i.e. `'Typebot Notifications' <notifications@host.com>`) |
|
| NEXT_PUBLIC_SMTP_FROM | | From name and email (i.e. `'Typebot Notifications' <notifications@host.com>`) |
|
||||||
| SMTP_SECURE | false | If true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false |
|
| SMTP_SECURE | false | If true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false |
|
||||||
| SMTP_AUTH_DISABLED | false | To disable the authentication by email but still use the provided config for notifications |
|
| SMTP_AUTH_DISABLED | false | To disable the authentication by email but still use the provided config for notifications |
|
||||||
|
|
||||||
@ -39,14 +40,14 @@ The Authorization callback URL should be `$NEXTAUTH_URL/api/auth/callback/google
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| -------------------- | ------- | --------------------------------------------- |
|
| -------------------- | ------- | --------------------------------------------- |
|
||||||
| GOOGLE_CLIENT_ID | -- | The Client ID from the Google API Console |
|
| GOOGLE_CLIENT_ID | | The Client ID from the Google API Console |
|
||||||
| GOOGLE_CLIENT_SECRET | -- | The Client secret from the Google API Console |
|
| GOOGLE_CLIENT_SECRET | | The Client secret from the Google API Console |
|
||||||
|
|
||||||
Used for Google Fonts (Optional):
|
Used for Google Fonts (Optional):
|
||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| -------------------------- | ------- | --------------------------------------- |
|
| -------------------------- | ------- | --------------------------------------- |
|
||||||
| NEXT_PUBLIC_GOOGLE_API_KEY | -- | The API Key from the Google API Console |
|
| NEXT_PUBLIC_GOOGLE_API_KEY | | The API Key from the Google API Console |
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
@ -65,8 +66,8 @@ You can create your own GitHub OAuth app [here](https://github.com/settings/deve
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| -------------------- | ------- | --------------------------------------------------------------------------- |
|
| -------------------- | ------- | --------------------------------------------------------------------------- |
|
||||||
| GITHUB_CLIENT_ID | -- | Application client ID. Also used to check if it is enabled in the front-end |
|
| GITHUB_CLIENT_ID | | Application client ID. Also used to check if it is enabled in the front-end |
|
||||||
| GITHUB_CLIENT_SECRET | -- | Application secret |
|
| GITHUB_CLIENT_SECRET | | Application secret |
|
||||||
|
|
||||||
## GitLab (Auth)
|
## GitLab (Auth)
|
||||||
|
|
||||||
@ -76,10 +77,10 @@ The Authorization callback URL should be `$NEXTAUTH_URL/api/auth/callback/gitlab
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ---------------------- | ------------------ | ------------------------------------------------------------------------------------ |
|
| ---------------------- | ------------------ | ------------------------------------------------------------------------------------ |
|
||||||
| GITLAB_CLIENT_ID | -- | Application client ID. Also used to check if it is enabled in the front-end |
|
| GITLAB_CLIENT_ID | | Application client ID. Also used to check if it is enabled in the front-end |
|
||||||
| GITLAB_CLIENT_SECRET | -- | Application secret |
|
| GITLAB_CLIENT_SECRET | | Application secret |
|
||||||
| GITLAB_BASE_URL | https://gitlab.com | Base URL of the GitLab instance |
|
| GITLAB_BASE_URL | https://gitlab.com | Base URL of the GitLab instance |
|
||||||
| GITLAB_REQUIRED_GROUPS | -- | Comma-separated list of groups the user has to be a direct member of, e.g. `foo,bar` |
|
| GITLAB_REQUIRED_GROUPS | | Comma-separated list of groups the user has to be a direct member of, e.g. `foo,bar` |
|
||||||
| GITLAB_NAME | GitLab | Name of the GitLab instance, used for the SSO Login Button |
|
| GITLAB_NAME | GitLab | Name of the GitLab instance, used for the SSO Login Button |
|
||||||
|
|
||||||
## Facebook (Auth)
|
## Facebook (Auth)
|
||||||
@ -89,8 +90,8 @@ The Authorization callback URL should be `$NEXTAUTH_URL/api/auth/callback/facebo
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ---------------------- | ------- | --------------------------------------------------------------------------- |
|
| ---------------------- | ------- | --------------------------------------------------------------------------- |
|
||||||
| FACEBOOK_CLIENT_ID | -- | Application client ID. Also used to check if it is enabled in the front-end |
|
| FACEBOOK_CLIENT_ID | | Application client ID. Also used to check if it is enabled in the front-end |
|
||||||
| FACEBOOK_CLIENT_SECRET | -- | Application secret |
|
| FACEBOOK_CLIENT_SECRET | | Application secret |
|
||||||
|
|
||||||
## Azure AD (Auth)
|
## Azure AD (Auth)
|
||||||
|
|
||||||
@ -99,18 +100,18 @@ The Authorization callback URL should be `$NEXTAUTH_URL/api/auth/callback/azure-
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ---------------------- | ------- | ------------------------------------------------------------- |
|
| ---------------------- | ------- | ------------------------------------------------------------- |
|
||||||
| AZURE_AD_CLIENT_ID | -- | Application client ID |
|
| AZURE_AD_CLIENT_ID | | Application client ID |
|
||||||
| AZURE_AD_CLIENT_SECRET | -- | Application client secret. Can be obtained from Azure Portal. |
|
| AZURE_AD_CLIENT_SECRET | | Application client secret. Can be obtained from Azure Portal. |
|
||||||
| AZURE_AD_TENANT_ID | -- | Azure Tenant ID |
|
| AZURE_AD_TENANT_ID | | Azure Tenant ID |
|
||||||
|
|
||||||
## Custom OAuth Provider (Auth)
|
## Custom OAuth Provider (Auth)
|
||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ---------------------------- | ------------ | --------------------------------------------------------------------------------------- |
|
| ---------------------------- | ------------ | --------------------------------------------------------------------------------------- |
|
||||||
| CUSTOM_OAUTH_NAME | Custom OAuth | Provider name. Will be displayed in the sign in form. |
|
| CUSTOM_OAUTH_NAME | Custom OAuth | Provider name. Will be displayed in the sign in form. |
|
||||||
| CUSTOM_OAUTH_CLIENT_ID | -- | OAuth client ID. |
|
| CUSTOM_OAUTH_CLIENT_ID | | OAuth client ID. |
|
||||||
| CUSTOM_OAUTH_CLIENT_SECRET | -- | OAuth client secret. |
|
| CUSTOM_OAUTH_CLIENT_SECRET | | OAuth client secret. |
|
||||||
| CUSTOM_OAUTH_WELL_KNOWN_URL | -- | OAuth .well-known URL (i.e. `https://auth.domain.com/.well-known/openid-configuration`) |
|
| CUSTOM_OAUTH_WELL_KNOWN_URL | | OAuth .well-known URL (i.e. `https://auth.domain.com/.well-known/openid-configuration`) |
|
||||||
| CUSTOM_OAUTH_USER_ID_PATH | id | Used to map the id from the user info object |
|
| CUSTOM_OAUTH_USER_ID_PATH | id | Used to map the id from the user info object |
|
||||||
| CUSTOM_OAUTH_USER_NAME_PATH | name | Used to map the name from the user info object |
|
| CUSTOM_OAUTH_USER_NAME_PATH | name | Used to map the name from the user info object |
|
||||||
| CUSTOM_OAUTH_USER_EMAIL_PATH | email | Used to map the email from the user info object |
|
| CUSTOM_OAUTH_USER_EMAIL_PATH | email | Used to map the email from the user info object |
|
||||||
@ -124,13 +125,13 @@ Used for uploading images, videos, etc... It can be any S3 compatible object sto
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ------------- | ------- | -------------------------------------------------------------- |
|
| ------------- | ------- | -------------------------------------------------------------- |
|
||||||
| S3_ACCESS_KEY | -- | S3 access key. Also used to check if upload feature is enabled |
|
| S3_ACCESS_KEY | | S3 access key. Also used to check if upload feature is enabled |
|
||||||
| S3_SECRET_KEY | -- | S3 secret key. |
|
| S3_SECRET_KEY | | S3 secret key. |
|
||||||
| S3_BUCKET | typebot | Name of the bucket where assets will be uploaded in. |
|
| S3_BUCKET | typebot | Name of the bucket where assets will be uploaded in. |
|
||||||
| S3_PORT | -- | S3 Host port number |
|
| S3_PORT | | S3 Host port number |
|
||||||
| S3_ENDPOINT | -- | S3 endpoint (i.e. `s3.domain.com`). |
|
| S3_ENDPOINT | | S3 endpoint (i.e. `s3.domain.com`). |
|
||||||
| S3_SSL | true | Use SSL when establishing the connection. |
|
| S3_SSL | true | Use SSL when establishing the connection. |
|
||||||
| S3_REGION | -- | S3 region. |
|
| S3_REGION | | S3 region. |
|
||||||
|
|
||||||
Note that for AWS S3, your endpoint is usually: `s3.<S3_REGION>.amazonaws.com`
|
Note that for AWS S3, your endpoint is usually: `s3.<S3_REGION>.amazonaws.com`
|
||||||
|
|
||||||
@ -170,7 +171,7 @@ Used to search for GIF. You can create a Giphy app [here](https://developers.gip
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ------------------------- | ------- | ------------- |
|
| ------------------------- | ------- | ------------- |
|
||||||
| NEXT_PUBLIC_GIPHY_API_KEY | -- | Giphy API key |
|
| NEXT_PUBLIC_GIPHY_API_KEY | | Giphy API key |
|
||||||
|
|
||||||
## Others
|
## Others
|
||||||
|
|
||||||
@ -186,13 +187,13 @@ The related environment variables are listed here but you are probably not inter
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ---------------------------------- | ------- | --------------------------- |
|
| ---------------------------------- | ------- | --------------------------- |
|
||||||
| NEXT_PUBLIC_STRIPE_PUBLIC_KEY | -- | Stripe public key |
|
| NEXT_PUBLIC_STRIPE_PUBLIC_KEY | | Stripe public key |
|
||||||
| STRIPE_SECRET_KEY | -- | Stripe secret key |
|
| STRIPE_SECRET_KEY | | Stripe secret key |
|
||||||
| STRIPE_PRO_PRICE_ID | -- | Pro plan price id |
|
| STRIPE_PRO_PRICE_ID | | Pro plan price id |
|
||||||
| STRIPE_STARTER_PRICE_ID | -- | Starter plan price id |
|
| STRIPE_STARTER_PRICE_ID | | Starter plan price id |
|
||||||
| STRIPE_ADDITIONAL_CHATS_PRICE_ID | -- | Additional chats price id |
|
| STRIPE_ADDITIONAL_CHATS_PRICE_ID | | Additional chats price id |
|
||||||
| STRIPE_ADDITIONAL_STORAGE_PRICE_ID | -- | Additional storage price id |
|
| STRIPE_ADDITIONAL_STORAGE_PRICE_ID | | Additional storage price id |
|
||||||
| STRIPE_WEBHOOK_SECRET | -- | Stripe Webhook secret |
|
| STRIPE_WEBHOOK_SECRET | | Stripe Webhook secret |
|
||||||
|
|
||||||
</p></details>
|
</p></details>
|
||||||
|
|
||||||
@ -201,10 +202,10 @@ The related environment variables are listed here but you are probably not inter
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ---------------------- | ------- | -------------------------------------- |
|
| ---------------------- | ------- | -------------------------------------- |
|
||||||
| NEXT_PUBLIC_SENTRY_DSN | -- | Sentry DSN |
|
| NEXT_PUBLIC_SENTRY_DSN | | Sentry DSN |
|
||||||
| SENTRY_AUTH_TOKEN | -- | Used to upload sourcemaps on app build |
|
| SENTRY_AUTH_TOKEN | | Used to upload sourcemaps on app build |
|
||||||
| SENTRY_PROJECT | -- | Sentry project name |
|
| SENTRY_PROJECT | | Sentry project name |
|
||||||
| SENTRY_ORG | -- | Sentry organization name |
|
| SENTRY_ORG | | Sentry organization name |
|
||||||
|
|
||||||
These can also be added to the `viewer` environment
|
These can also be added to the `viewer` environment
|
||||||
|
|
||||||
@ -215,9 +216,9 @@ These can also be added to the `viewer` environment
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| -------------------------- | ------- | ----------------------------------------------- |
|
| -------------------------- | ------- | ----------------------------------------------- |
|
||||||
| VERCEL_TOKEN | -- | Vercel API token |
|
| VERCEL_TOKEN | | Vercel API token |
|
||||||
| VERCEL_VIEWER_PROJECT_NAME | -- | The name of the viewer project in Vercel |
|
| VERCEL_VIEWER_PROJECT_NAME | | The name of the viewer project in Vercel |
|
||||||
| VERCEL_TEAM_ID | -- | Vercel team ID that contains the viewer project |
|
| VERCEL_TEAM_ID | | Vercel team ID that contains the viewer project |
|
||||||
|
|
||||||
</p></details>
|
</p></details>
|
||||||
|
|
||||||
@ -226,7 +227,7 @@ These can also be added to the `viewer` environment
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ----------------- | ------- | ------------------------------------------------------------------------ |
|
| ----------------- | ------- | ------------------------------------------------------------------------ |
|
||||||
| SLEEKPLAN_SSO_KEY | -- | Sleekplan SSO key used to automatically authenticate a user in Sleekplan |
|
| SLEEKPLAN_SSO_KEY | | Sleekplan SSO key used to automatically authenticate a user in Sleekplan |
|
||||||
|
|
||||||
</p></details>
|
</p></details>
|
||||||
|
|
||||||
@ -235,7 +236,7 @@ These can also be added to the `viewer` environment
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ------------------------ | ------- | --------------------------------------------------------------------------------------------- |
|
| ------------------------ | ------- | --------------------------------------------------------------------------------------------- |
|
||||||
| USER_CREATED_WEBHOOK_URL | -- | Webhook URL called whenever a new user is created (used for importing a new SendGrid contact) |
|
| USER_CREATED_WEBHOOK_URL | | Webhook URL called whenever a new user is created (used for importing a new SendGrid contact) |
|
||||||
|
|
||||||
</p></details>
|
</p></details>
|
||||||
|
|
||||||
|
@ -9,11 +9,11 @@ import { SponsorButton } from '../../../src/js/SponsorButton.jsx'
|
|||||||
## General
|
## General
|
||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ---------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| DATABASE_URL | postgresql://postgres:typebot@db:5432/typebot | The database URL |
|
| DATABASE_URL | | The database URL |
|
||||||
| ENCRYPTION_SECRET | SgVkYp2s5v8y/B?E(H+MbQeThWmZq4t6 | A 256-bit key used to encrypt sensitive data. It is strongly recommended to [generate](https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx) a new one. The secret should be the same between builder and viewer. |
|
| ENCRYPTION_SECRET | | A 256-bit key used to encrypt sensitive data. It is strongly recommended to [generate](https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx) a new one. The secret should be the same between builder and viewer. |
|
||||||
| NEXT_PUBLIC_VIEWER_URL | http://localhost:3001 | The viewer base URL. Should be the publicly accessible URL (i.e. `https://bot.domain.com`) |
|
| NEXT_PUBLIC_VIEWER_URL | | The viewer base URL. Should be the publicly accessible URL (i.e. `https://bot.domain.com`) |
|
||||||
| NEXTAUTH_URL | http://localhost:3000 | The builder base URL. Should be the publicly accessible URL (i.e. `https://typebot.domain.com`) |
|
| NEXTAUTH_URL | | The builder base URL. Should be the publicly accessible URL (i.e. `https://typebot.domain.com`) |
|
||||||
|
|
||||||
## Emails (Notifications)
|
## Emails (Notifications)
|
||||||
|
|
||||||
@ -21,11 +21,11 @@ Used for sending email notifications and authentication
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| SMTP_USERNAME | -- | SMTP username |
|
| SMTP_USERNAME | | SMTP username |
|
||||||
| SMTP_PASSWORD | -- | SMTP password |
|
| SMTP_PASSWORD | | SMTP password |
|
||||||
| SMTP_HOST | -- | SMTP host. (i.e. `smtp.host.com`) |
|
| SMTP_HOST | | SMTP host. (i.e. `smtp.host.com`) |
|
||||||
| SMTP_PORT | 25 | SMTP port |
|
| SMTP_PORT | 25 | SMTP port |
|
||||||
| SMTP_FROM | - | From name and email (i.e. `'Typebot Notifications' <notifications@typebot.io>`) |
|
| SMTP_FROM | | From name and email (i.e. `'Typebot Notifications' <notifications@typebot.io>`) |
|
||||||
| SMTP_SECURE | false | If true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false |
|
| SMTP_SECURE | false | If true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false |
|
||||||
|
|
||||||
## Google (Sheets)
|
## Google (Sheets)
|
||||||
@ -34,8 +34,8 @@ Used when executing a Google Sheets block. Make sure to set the required scopes
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| -------------------- | ------- | --------------------------------------------- |
|
| -------------------- | ------- | --------------------------------------------- |
|
||||||
| GOOGLE_CLIENT_ID | -- | The Client ID from the Google API Console |
|
| GOOGLE_CLIENT_ID | | The Client ID from the Google API Console |
|
||||||
| GOOGLE_CLIENT_SECRET | -- | The Client secret from the Google API Console |
|
| GOOGLE_CLIENT_SECRET | | The Client secret from the Google API Console |
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
@ -52,13 +52,13 @@ Used for the file upload input. It can be any S3 compatible object storage servi
|
|||||||
|
|
||||||
| Parameter | Default | Description |
|
| Parameter | Default | Description |
|
||||||
| ------------- | ------- | -------------------------------------------------------------- |
|
| ------------- | ------- | -------------------------------------------------------------- |
|
||||||
| S3_ACCESS_KEY | -- | S3 access key. Also used to check if upload feature is enabled |
|
| S3_ACCESS_KEY | | S3 access key. Also used to check if upload feature is enabled |
|
||||||
| S3_SECRET_KEY | -- | S3 secret key. |
|
| S3_SECRET_KEY | | S3 secret key. |
|
||||||
| S3_BUCKET | typebot | Name of the bucket where assets will be uploaded in. |
|
| S3_BUCKET | typebot | Name of the bucket where assets will be uploaded in. |
|
||||||
| S3_PORT | -- | S3 Host port number |
|
| S3_PORT | | S3 Host port number |
|
||||||
| S3_ENDPOINT | -- | S3 endpoint (i.e. `s3.domain.com`). |
|
| S3_ENDPOINT | | S3 endpoint (i.e. `s3.domain.com`). |
|
||||||
| S3_SSL | true | Use SSL when establishing the connection. |
|
| S3_SSL | true | Use SSL when establishing the connection. |
|
||||||
| S3_REGION | -- | S3 region. |
|
| S3_REGION | | S3 region. |
|
||||||
|
|
||||||
Note that for AWS S3, your endpoint is usually: `s3.<S3_REGION>.amazonaws.com`
|
Note that for AWS S3, your endpoint is usually: `s3.<S3_REGION>.amazonaws.com`
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user