A full-featured CRM built with React, shadcn/ui, and Supabase.
code review
ThieryMichel4f130c61c75f
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.ymlindex 678822da..4801ed5c 100644--- a/.github/workflows/deploy.yml+++ b/.github/workflows/deploy.yml@@ -109,7 +109,6 @@ jobs:POSTMARK_WEBHOOK_USER: ${{secrets.POSTMARK_WEBHOOK_USER}}POSTMARK_WEBHOOK_PASSWORD: ${{secrets.POSTMARK_WEBHOOK_PASSWORD}}POSTMARK_WEBHOOK_AUTHORIZED_IPS: ${{secrets.POSTMARK_WEBHOOK_AUTHORIZED_IPS}}- POSTMARK_INBOUND_EMAIL: ${{secrets.VITE_INBOUND_EMAIL}}VITE_GOOGLE_WORKPLACE_DOMAIN: ${{secrets.VITE_GOOGLE_WORKPLACE_DOMAIN}}steps:@@ -153,7 +152,7 @@ jobs:npx supabase secrets set POSTMARK_WEBHOOK_USER=${{ env.POSTMARK_WEBHOOK_USER }}npx supabase secrets set POSTMARK_WEBHOOK_PASSWORD=${{ env.POSTMARK_WEBHOOK_PASSWORD }}npx supabase secrets set POSTMARK_WEBHOOK_AUTHORIZED_IPS=${{ env.POSTMARK_WEBHOOK_AUTHORIZED_IPS }}- npx supabase secrets set POSTMARK_INBOUND_EMAIL=${{ env.POSTMARK_INBOUND_EMAIL }}+ npx supabase secrets set VITE_INBOUND_EMAIL=${{ env.VITE_INBOUND_EMAIL }}- if: ${{ env.IS_SUPABASE_CONFIGURED }}name: 📡 Deploy supabase functionsdiff --git a/doc/src/content/docs/developers/deploy.mdx b/doc/src/content/docs/developers/deploy.mdxindex 54ffb554..c0ee9b38 100644--- a/doc/src/content/docs/developers/deploy.mdx+++ b/doc/src/content/docs/developers/deploy.mdx@@ -71,7 +71,7 @@ SB_PUBLISHABLE_KEY: Your supabase project publishable keyPOSTMARK_WEBHOOK_USER: User configured in Postmark to secure the webhookPOSTMARK_WEBHOOK_PASSWORD: Password configured in Postmark to secure the webhookPOSTMARK_WEBHOOK_AUTHORIZED_IPS: List of IPs (comma separated) authorized to send requests to the Postmark webhook-POSTMARK_INBOUND_EMAIL: The email address configured in Postmark to receive inbound emails+VITE_INBOUND_EMAIL: The email address configured in Postmark to receive inbound emails```> **Note:** The `POSTMARK_*` variables are required for Atomic CRM's inbound email features. Have a look at the the [inbound email configuration](../inbound-email-configuration) to learn more about their usage and setup.diff --git a/doc/src/content/docs/developers/inbound-email-configuration.mdx b/doc/src/content/docs/developers/inbound-email-configuration.mdxindex aafa398b..a67188a9 100644--- a/doc/src/content/docs/developers/inbound-email-configuration.mdx+++ b/doc/src/content/docs/developers/inbound-email-configuration.mdx@@ -37,7 +37,7 @@ In a terminal, after [linking your Supabase project](../supabase-configuration#anpx supabase secrets set POSTMARK_WEBHOOK_USER=<user>npx supabase secrets set POSTMARK_WEBHOOK_PASSWORD=<password>npx supabase secrets set POSTMARK_WEBHOOK_AUTHORIZED_IPS=<comma-separated list of IPs>-npx supabase secrets set POSTMARK_INBOUND_EMAIL=<your-postmark-inbound-email> # Optional, only needed if you want to to be able to transfer mail directly to the CRM+npx supabase secrets set VITE_INBOUND_EMAIL=<your-postmark-inbound-email>```These commands will push the secrets to your remote Supabase project.@@ -50,7 +50,7 @@ If you are using this repository's GitHub Actions to automatically deploy to youPOSTMARK_WEBHOOK_USER=<user>POSTMARK_WEBHOOK_PASSWORD=<password>POSTMARK_WEBHOOK_AUTHORIZED_IPS=<comma-separated list of IPs>-POSTMARK_INBOUND_EMAIL=<your-postmark-inbound-email> # Optional, only needed if you want to to be able to transfer mail directly to the CRM+VITE_INBOUND_EMAIL=<your-postmark-inbound-email>```## Application Configurationdiff --git a/doc/src/content/docs/users/inbound-email.mdx b/doc/src/content/docs/users/inbound-email.mdxindex ca1450f6..9aaa525a 100644--- a/doc/src/content/docs/users/inbound-email.mdx+++ b/doc/src/content/docs/users/inbound-email.mdx@@ -19,10 +19,10 @@ When you write to a contact in your email client, add the inbound email address**Tip**: Use the **Bcc** field to send emails to Atomic CRM without notifying the recipients.-You can also forward existing emails to the inbound email address to add them as notes to the corresponding contacts.-Atomic CRM will extract the original sender and recipient from the email content to identify the contact and user.+You can also forward received emails to the inbound email address to add them as notes to the corresponding contacts.+Atomic CRM will extract the original sender and recipient from the email content to identify the contact and sales.-## Example+## Example - Copying an email I sent to the CRMConsider the following email:@@ -50,7 +50,9 @@ Hi Kim,I would like to schedule a meeting with you next week. Please let me know your availability.```-Consider another email that you forward to the inbound email address directly:+## Example - Forwarding a response to the CRM++Consider the following email that you forward to the inbound email address directly:```txtFrom: Jane Doe <[email protected]>diff --git a/supabase/functions/.env b/supabase/functions/.envindex ccc025d7..7edf2904 100644--- a/supabase/functions/.env+++ b/supabase/functions/.env@@ -1,6 +1,6 @@POSTMARK_WEBHOOK_USER=testuserPOSTMARK_WEBHOOK_PASSWORD=testpwd-POSTMARK_INBOUND_EMAIL=2aff30e603e54dc3eb556bd9e03ee099@inbound.postmarkapp.com+VITE_INBOUND_EMAIL=2aff30e603e54dc3eb556bd9e03ee099@inbound.postmarkapp.com# IPs can be found at https://postmarkapp.com/support/article/800-ips-for-firewalls#webhooks# 172.18.0.1, 172.19.0.1 and 172.20.0.1 are for local dev only@@ -10,4 +10,3 @@ POSTMARK_WEBHOOK_AUTHORIZED_IPS=3.134.147.250,50.31.156.6,50.31.156.77,18.217.20SB_JWT_ISSUER=http://127.0.0.1:54321/auth/v1SB_PUBLISHABLE_KEY=sb_publishable_ACJWlzQHlZjBrEguHvfOxg_3BJgxAaHSB_SECRET_KEY=sb_secret_N7UND0UgjKTVK-Uodkm0Hg_xSvEMPvz-diff --git a/supabase/functions/postmark/index.ts b/supabase/functions/postmark/index.tsindex a5240ed2..696c37ca 100644--- a/supabase/functions/postmark/index.ts+++ b/supabase/functions/postmark/index.ts@@ -17,7 +17,7 @@ import { supabaseAdmin } from "../_shared/supabaseAdmin.ts";const webhookUser = Deno.env.get("POSTMARK_WEBHOOK_USER");const webhookPassword = Deno.env.get("POSTMARK_WEBHOOK_PASSWORD");-const INBOUND_EMAIL = Deno.env.get("POSTMARK_INBOUND_EMAIL");+const INBOUND_EMAIL = Deno.env.get("VITE_INBOUND_EMAIL");if (!webhookUser || !webhookPassword) {throw new Error("Missing POSTMARK_WEBHOOK_USER or POSTMARK_WEBHOOK_PASSWORD env variable",