diff --git a/.env.example b/.env.example index 3653c7cc5..cfdbdc290 100644 --- a/.env.example +++ b/.env.example @@ -10,7 +10,7 @@ ENCRYPT_CRYPTO_SECRET_KEY="0123456789abcdef0123456789abcdef" # API Backend # ================================================ ENV=dev -DISTRIBUTION=selfhosted +DISTRIBUTION=selfhosted # selfhosted or managed OAUTH_REDIRECT_BASE=http://localhost:3000 SENTRY_DSN= # ================================================ @@ -73,7 +73,6 @@ NEXT_PUBLIC_BACKEND_DOMAIN=http://localhost:3000 # https://api.panora.dev/ NEXT_PUBLIC_MAGIC_LINK_DOMAIN=http://localhost:81 NEXT_PUBLIC_POSTHOG_KEY= NEXT_PUBLIC_POSTHOG_HOST= -NEXT_PUBLIC_DISTRIBUTION="managed" #managed or self-host NEXT_PUBLIC_STYTCH_PROJECT_ID="project-test" NEXT_PUBLIC_STYTCH_SECRET="example" diff --git a/docs/marketingautomation/introduction.mdx b/docs/marketingautomation/introduction.mdx new file mode 100644 index 000000000..e69de29bb diff --git a/docs/open-source/contributors.mdx b/docs/open-source/contributors.mdx index bdc439824..a3af4df48 100644 --- a/docs/open-source/contributors.mdx +++ b/docs/open-source/contributors.mdx @@ -14,7 +14,11 @@ We made a docker file that builds Panora from sources, specifically to help you -```bash cp .env.example .env ``` + +```bash +cp .env.example .env +``` + 1. You don't need Stytch variables if you selfhost, it's only used in cloud version of Panora so you can discard the stytch variables. @@ -22,30 +26,34 @@ We made a docker file that builds Panora from sources, specifically to help you (You must create by hand inside the 3rd party a custom oAuth2 app and paste the credentials using the following form) -`PROVIDER_VERTICAL_SOFTWAREMODE_ATTRIBUTE` -where -PROVIDER is any 3rd party name -VERTICAL is for example { CRM, TICKETING, MARKETINGAUTOMATION, ...} -SOFTWAREMODE is { CLOUD, ONPREMISE } -ATTRIBUTE is for example { CLIENT_ID, CLIENT_SECRET, SUBDOMAIN, ... } - -i.e `HUBSPOT_CRM_CLOUD_CLIENT_ID` + `PROVIDER_VERTICAL_SOFTWAREMODE_ATTRIBUTE` + where + ``` + PROVIDER is any 3rd party name + VERTICAL is for example { CRM, TICKETING, MARKETINGAUTOMATION, ...} + SOFTWAREMODE is { CLOUD, ONPREMISE } + ATTRIBUTE is for example { CLIENT_ID, CLIENT_SECRET, SUBDOMAIN, ... } + ``` + i.e `HUBSPOT_CRM_CLOUD_CLIENT_ID` - ```bash rm -rf node_modules .pnpm-store ./packages/api/dist - ./packages/api/node_modules ./apps/webapp/node_modules - ./apps/frontend_snippet/node_modules ``` + ```bash + rm -rf node_modules .pnpm-store ./packages/api/dist ./packages/api/node_modules ./apps/webapp/node_modules ./apps/frontend_snippet/node_modules + ``` - ```bash echo -e "node-linker=hoisted\npackage-import-method=clone-or-copy" > - .npmrc ``` + ```bash + echo -e "node-linker=hoisted\npackage-import-method=clone-or-copy" > .npmrc + ``` - ```bash docker compose -f docker-compose.dev.yml up``` + ```bash + docker compose -f docker-compose.dev.yml up + ``` That's all! You can find the backend and other services running at their usual location. Editing code locally will immediately reflect. @@ -204,9 +212,11 @@ Check other implementations under `/crm/contacts/services` to fill the core func ## 2. Enable your new service To make sure the service is enabled, dependencies and imports must be added. -We built a script that does it in seconds. +We built a script that does it in seconds. You can execute the given command from the root directory of Panora. -`pnpm run validate-connectors --vertical="crm" --objectType="contact"` +```bash +cd packages/api && pnpm install && pnpm run validate-connectors --vertical="crm" --objectType="contact" +``` The script will automatically scan the `/crm/contact/services` folder and detect any new service folder so all dependencies and imports are updated across the codebase. diff --git a/packages/api/package.json b/packages/api/package.json index 0dca1fab0..3deac895f 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -23,8 +23,8 @@ "ci": "pnpm run lint && pnpm run build", "copy-types-to-shared": "cp ./exports.ts ../shared/index.ts", "prisma:seed": "ts-node ./scripts/seed.webapp.ts", - "validate-connectors": "node ./scripts/connectorUpdate.js", - "prebuild-oauth-connector": "node ./scripts/oauthConnector.js" + "validate-connectors": "node --experimental-detect-module ./scripts/connectorUpdate.js", + "prebuild-oauth-connector": "node --experimental-detect-module ./scripts/oauthConnector.js" }, "dependencies": { "@nestjs/bull": "^10.0.1", diff --git a/packages/api/scripts/connectorUpdate.js b/packages/api/scripts/connectorUpdate.js index 5aafc1024..ceae4abbf 100755 --- a/packages/api/scripts/connectorUpdate.js +++ b/packages/api/scripts/connectorUpdate.js @@ -354,6 +354,5 @@ if (import.meta.url === process.argv[1]) { } const argv = yargs(hideBin(process.argv)).argv; - -const baseDir = `../src/${argv.vertical.toLowerCase()}/${argv.object.toLowerCase()}/services`; -updateObjectTypes(baseDir, argv.object, argv.vertical); +const baseDir = `../src/${argv.vertical.toLowerCase()}/${argv.objectType.toLowerCase()}/services`; +updateObjectTypes(baseDir, argv.objectType, argv.vertical);