A full-featured CRM built with React, shadcn/ui, and Supabase.
code review
Jean-Baptiste Kaiser5a3f637f9668
diff --git a/doc/src/content/docs/developers/deploy.mdx b/doc/src/content/docs/developers/deploy.mdxindex c0ee9b38..9360b17d 100644--- a/doc/src/content/docs/developers/deploy.mdx+++ b/doc/src/content/docs/developers/deploy.mdx@@ -74,6 +74,6 @@ POSTMARK_WEBHOOK_AUTHORIZED_IPS: List of IPs (comma separated) authorized to senVITE_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.+> **Note:** The `POSTMARK_*` and `VITE_INBOUND_EMAIL` 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.The GitHub action will run the `prod-deploy` command on every push to the `main` branch, deploying the frontend to GitHub pages and updating the Supabase instance.diff --git a/doc/src/content/docs/developers/inbound-email-configuration.mdx b/doc/src/content/docs/developers/inbound-email-configuration.mdxindex a67188a9..ba4d6fad 100644--- a/doc/src/content/docs/developers/inbound-email-configuration.mdx+++ b/doc/src/content/docs/developers/inbound-email-configuration.mdx@@ -61,6 +61,11 @@ Store the Postmark inbound email address in a `.env` file at the root of the pro```+:::tip+You need to provide `VITE_INBOUND_EMAIL` at two places: as a Supabase Secret ([Supabase Setup](#supabase-setup)), and in the `.env` file used by the Vite app (this section).+This is necessary because it is used both client-side, to display the Inbound Email in the Atomic CRM app, and server-side (by the Edge Function) to detect when an email is forwarded to Atomic CRM.+:::+## Testing locallyTo test inbound email features locally, you will need to do the following:diff --git a/doc/src/content/docs/users/inbound-email.mdx b/doc/src/content/docs/users/inbound-email.mdxindex 9aaa525a..ecec5f47 100644--- a/doc/src/content/docs/users/inbound-email.mdx+++ b/doc/src/content/docs/users/inbound-email.mdx@@ -11,7 +11,7 @@ You must setup Postmark and Supabase to use the inbound email feature. Check the## Usage-Send of forward emails to Atomic CRM's inbound email address to automatically add notes to the corresponding contacts. You can find this email address in the user menu by clicking on the "My Info" menu item, in the "Inbound Email" section. It looks like `[email protected]`.+Copy or forward emails to Atomic CRM's inbound email address to automatically add notes to the corresponding contacts. You can find this email address in the user menu by clicking on the "My Info" menu item, in the "Inbound Email" section. It looks like `[email protected]`.diff --git a/supabase/functions/.env b/supabase/functions/.envindex 7edf2904..6148b846 100644--- a/supabase/functions/.env+++ b/supabase/functions/.env@@ -9,4 +9,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_3BJgxAaH-SB_SECRET_KEY=sb_secret_N7UND0UgjKTVK-Uodkm0Hg_xSvEMPvzdiff --git a/supabase/functions/postmark/index.ts b/supabase/functions/postmark/index.tsindex 696c37ca..ecfabc21 100644--- a/supabase/functions/postmark/index.ts+++ b/supabase/functions/postmark/index.ts@@ -258,6 +258,8 @@ const checkBody = (json: any) => {}]}'++To trigger the email forwarding feature, you can change the "To" and "ToFull" fields to have the INBOUND_EMAIL, and add an email address that is neither a sales nor the INBOUND_EMAIL, for example:curl -i --location --request POST 'http://127.0.0.1:54321/functions/v1/postmark' \--header 'Content-Type: application/json' \@@ -289,8 +291,8 @@ const checkBody = (json: any) => {"ReplyTo": "","MailboxHash": "","Date": "Thu, 5 Mar 2026 10:41:26 +0100",- "TextBody": "---------- Forwarded message ---------\nFrom : Postmarkapp Support <[email protected]>\nDate: Fri, 1 Aug 2014 16:45:32 -04:00\nSubject: Test for forwarding mail\nTo: Postmarkapp Support <[email protected]>\n\n\nThe transferred message body\n",- "HtmlBody": "<div dir=\"ltr\"><br><br><div class=\"gmail_quote gmail_quote_container\"><div dir=\"ltr\" class=\"gmail_attr\">---------- Forwarded message ---------<br>From: <strong class=\"gmail_sendername\" dir=\"auto\">Postmarkapp Support</strong> <span dir=\"auto\"><<a href=\"mailto:[email protected]\">[email protected]</a>></span><br>Date: Fri, 1 Aug 2014 16:45:32 -04:00<br>Subject: Test for forwarding mail<br>To: Postmarkapp Support <<a href=\"mailto:[email protected]\">[email protected]</a>><br></div><br><br><div dir=\"ltr\">The transferred message body</div>\n</div></div>\n",+ "TextBody": "---------- Forwarded message ---------\nFrom : Original Recipient <[email protected]>\nDate: Fri, 1 Aug 2014 16:45:32 -04:00\nSubject: Test for forwarding mail\nTo: Postmarkapp Support <[email protected]>\n\n\nThe transferred message body\n",+ "HtmlBody": "<div dir=\"ltr\"><br><br><div class=\"gmail_quote gmail_quote_container\"><div dir=\"ltr\" class=\"gmail_attr\">---------- Forwarded message ---------<br>From: <strong class=\"gmail_sendername\" dir=\"auto\">Original Recipient</strong> <span dir=\"auto\"><<a href=\"mailto:[email protected]\">[email protected]</a>></span><br>Date: Fri, 1 Aug 2014 16:45:32 -04:00<br>Subject: Test for forwarding mail<br>To: Postmarkapp Support <<a href=\"mailto:[email protected]\">[email protected]</a>><br></div><br><br><div dir=\"ltr\">The transferred message body</div>\n</div></div>\n","StrippedTextReply": "","Tag": "","Headers": [