A full-featured CRM built with React, shadcn/ui, and Supabase.
Fix(doc): Improve documentation and fix typos
Jonathan ARNAULT30cad891d39a
diff --git a/README.md b/README.mdindex 2e332216..9cf1bfce 100644--- a/README.md+++ b/README.md@@ -32,21 +32,16 @@ This will install the dependencies for the frontend and the backend, including a## Developing with Atomic CRM-### Configuration+### Local Development Setup-1. [Supabase Configuration](./doc/developer/01-supabase-configuration.md)-2. [Customizing the CRM](./doc/developer/02-customizing.md)-3. [Deploying to Production](./doc/developer/03-manual-deploy.md)-4. [GitHub Actions Configuration](./doc/developer/04-github-actions.md) *(optional)*-5. [Email Inbound Configuration](./doc/developer/05-email-inbound.md) *(optional)*-6. [Creating Migrations](./doc/developer/06-supabase-migrations.md) *(optional)*-7. [Contact Import Customization](./doc/developer/07-contact-import.md) *(optional)*-8. [Using Fake Rest Data Provider for Development](./doc/developer/08-data-providers.md) *(optional)*-9. [Learn More About Architecture Decisions](./doc/developer/09-architecture-choices.md) *(optional)*+1. [Supabase Configuration](./doc/developer/dev-01-supabase-configuration.md)+2. [Customizing the CRM](./doc/developer/dev-02-customizing.md)+3. [Creating Migrations](./doc/developer/dev-03-supabase-migrations.md) *(optional)*+4. [Contact Import Customization](./doc/developer/dev-04-contact-import.md) *(optional)*+5. [Using Fake Rest Data Provider for Development](./doc/developer/dev-O5-data-providers.md) *(optional)*+6. [Learn More About Architecture Decisions](./doc/developer/dev-06-architecture-choices.md) *(optional)*-### Running the App In Development Mode--Once you app is configred, start the app locally with the following command:+Once you app is configured, start the app locally with the following command:```shmake start@@ -63,6 +58,12 @@ If you need debug the backend, you can access the following services:- Attachments storage: [http://localhost:54323/project/default/storage/buckets/attachments](http://localhost:54323/project/default/storage/buckets/attachments)- Inbucket email testing service: [http://localhost:54324/](http://localhost:54324/)+### Deploying to Production++1. [Manual Production Deploy](./doc/developer/prod-01-manual-deploy.md)+2. [GitHub Actions Configuration](./doc/developer/prod-02-github-actions.md) *(optional)*+3. [Email Inbound Configuration](./doc/developer/prod-03-email-inbound.md) *(optional)*+### TestingThis project contains unit tests. Run them with the following command:@@ -71,8 +72,7 @@ This project contains unit tests. Run them with the following command:make test```-## User documentation1. [Create First User](./doc/user/01-create-first-user.md)-2. [Create First User](./doc/user/02-import-contacts.md)\ No newline at end of file+2. [Import Contacts](./doc/user/02-import-contacts.md)\ No newline at end of filediff --git a/doc/developer/01-supabase-configuration.md b/doc/developer/dev-01-supabase-configuration.mdsimilarity index 68%rename from doc/developer/01-supabase-configuration.mdrename to doc/developer/dev-01-supabase-configuration.mdindex 2dba7e73..3ebfe648 100644--- a/doc/developer/01-supabase-configuration.md+++ b/doc/developer/dev-01-supabase-configuration.md@@ -52,15 +52,11 @@ make prod-startUsing a remote Supabase instance can be interesting if you deploy from your computer, or if you want to test your app with production data in production mode.-## Continuous Integration and Continuous Delivery--This repository includes GitHub action workflow for Continuous Delivery. The configuration is explained in the [GitHub Actiosns guide](./github-actions.md) in the same directory.-## Login Callback### Local Supabase Instance-Go to your [local supabase config](../supabase/config.toml) file:+Go to your [local supabase config](../../supabase/config.toml) file:1. In `[auth]` section set `site_url` to your application URL2. In `[auth]`, add the following URL in the `additional_redirect_urls = [<APPLICATION_URL>/auth-callback.html"]`@@ -72,7 +68,7 @@ To configure the authentication URL, you can go to your project dashboard at [su### Local Instance Templates-You can customize the mail templates via the [supabase config](../supabase/config.toml) file. An example of a custom template has been done for the [recovery](../supabase/templates/recovery.html) email.+You can customize the mail templates via the [supabase config](../../supabase/config.toml) file. An example of a custom template has been done for the [recovery](../../supabase/templates/recovery.html) email.Note: updating the templates requires to restart your supabase instance.@@ -82,16 +78,6 @@ If you want more information on how to customize email templates, go to the [relIf you want to customize the production templates, you can go to your project dashboard at [supabase.com](https://supabase.com/). Then go to **Authentication** > **Email Templates**. You can the choose which template to change using the email template stabs.-## Email Features--Supabase requires additional configuration to enable Atomic CRM's email features. Have a look at the the [email features documentation](./email-features.md) to learn more about their usage and the required setup.--Warning: Free quota for email features is very low. If you encounter problems when creating a user or reseting a password, you can increase the sending limit via a custom STMP server setup. Please refer to the [supabase documentation](https://supabase.com/docs/guides/auth/auth-smtp) if this is your case.--## Password Reset And Invitations--An user can be invited to the CRM by an administrator. The user will receive an email with a link to set their password. The password reset feature is also available. You don't have to worry about these processes, Atomic CRM handles them for you, using Supabase.-## Fequently Asked Questions- I have a **Security Definer View** error in **Security Advisor**diff --git a/doc/developer/02-customizing.md b/doc/developer/dev-02-customizing.mdsimilarity index 98%rename from doc/developer/02-customizing.mdrename to doc/developer/dev-02-customizing.mdindex 9ccf7ec6..3a09aab8 100644--- a/doc/developer/02-customizing.md+++ b/doc/developer/dev-02-customizing.md@@ -92,7 +92,7 @@ To add a new sale to the CRM, you need to use an administrator account. By defauWhen logged in as an admin, an 'Account Manager' tab will be available. From this page, you can create sales and transfer the administrator role.-+## Customizing the Homepagediff --git a/doc/developer/06-supabase-migrations.md b/doc/developer/dev-03-supabase-migrations.mdsimilarity index 100%rename from doc/developer/06-supabase-migrations.mdrename to doc/developer/dev-03-supabase-migrations.mddiff --git a/doc/developer/07-contact-import.md b/doc/developer/dev-04-contact-import.mdsimilarity index 67%rename from doc/developer/07-contact-import.mdrename to doc/developer/dev-04-contact-import.mdindex 4d0f9966..8d89bce1 100644--- a/doc/developer/07-contact-import.md+++ b/doc/developer/dev-04-contact-import.md@@ -1,6 +1,6 @@# Contact ImportFrom the crm, a user can import a list of contacts via a csv file. This csv file must match the data you use to store your contacts.-By default, we provide a sample file located at `./src/contacts/contacts_export.csv`.+By default, we provide a sample file located at `src/contacts/contacts_export.csv`.-If you change your data structure for a contact, don't forget to modify this sample. You'll also need to modify the import function found in `./src/contacts/useContactImport.tsx`+If you change your data structure for a contact, don't forget to modify this sample. You'll also need to modify the import function found in `src/contacts/useContactImport.tsx`diff --git a/doc/developer/08-data-providers.md b/doc/developer/dev-05-data-providers.mdsimilarity index 73%rename from doc/developer/08-data-providers.mdrename to doc/developer/dev-05-data-providers.mdindex 711fcf35..9ced36c2 100644--- a/doc/developer/08-data-providers.md+++ b/doc/developer/dev-05-data-providers.md@@ -1,8 +1,8 @@# Data ProvidersThis project supports two data providers:-- A [supabase data provider](../src/providers/supabase/) (default)-- A [fakerest data provider](../src/providers/fakerest/)+- A [supabase data provider](../../src/providers/supabase/) (default)+- A [fakerest data provider](../../src/providers/fakerest/)## Supabase Data Provider@@ -17,4 +17,4 @@ local development with generated data.The list filters used in this project MUST follow the [`ra-data-postgrest`](https://github.com/raphiniert-com/ra-data-postgrest) convention. The filters are then mapped at runtime to the fakerest filters.-If a filter is not supported by the transformer, you can add new filter adapters in the [`supabaseAdapter` ](../src/providers/fakerest/internal/supabaseAdapter.ts) file.+If a filter is not supported by the transformer, you can add new filter adapters in the [`supabaseAdapter` ](../../src/providers/fakerest/internal/supabaseAdapter.ts) file.diff --git a/doc/developer/09-architecture-choices.md b/doc/developer/dev-06-architecture-choices.mdsimilarity index 78%rename from doc/developer/09-architecture-choices.mdrename to doc/developer/dev-06-architecture-choices.mdindex 2f4af6a4..7dc6cb37 100644--- a/doc/developer/09-architecture-choices.md+++ b/doc/developer/dev-06-architecture-choices.md@@ -4,14 +4,14 @@ This document explains some of the architecture choices we made.## Sales table-Sales are related to user accounts and add extra information oto the supabase's `auth.users` table.+Sales are related to user accounts and add extra information to supabase's `auth.users` table.They are automatically created or updated with supabase's `user` metadata (`first_name` and `last_name` are required when creating a new user) via a trigger.## User Management-Due to the limitations of supabase, we do not have a public endpoint to manage users. To solve this problem, we created a `users` function that is in charge of:+Due to the limitations of supabase, we do not have a public endpoint to manage users. To solve this problem, we created a `users` edge function that is in charge of:- Verifying current user's permissions-- Creation and update of user's+- Creation and update of usersNote: We do not support user deletion to avoid data losses. Yet, it is possible to disable a user's account (relying on supabase ban feature).diff --git a/doc/developer/03-manual-deploy.md b/doc/developer/prod-01-manual-deploy.mdsimilarity index 86%rename from doc/developer/03-manual-deploy.mdrename to doc/developer/prod-01-manual-deploy.mdindex b6460df9..c48f1668 100644--- a/doc/developer/03-manual-deploy.md+++ b/doc/developer/prod-01-manual-deploy.md@@ -2,7 +2,7 @@## Supabase Configuration-To configure Supabase, please have a look at [dedicated configuration guide](./supabase-configuration.md).+This guide assumes you have already configured your Supabase instance. Id you did not, please have a look at the [dedicated configuration guide](./dev-01-supabase-configuration.md).## Testing Production Modediff --git a/doc/developer/04-github-actions.md b/doc/developer/prod-02-github-actions.mdsimilarity index 100%rename from doc/developer/04-github-actions.mdrename to doc/developer/prod-02-github-actions.mddiff --git a/doc/developer/05-email-inbound.md b/doc/developer/prod-03-email-inbound.mdsimilarity index 95%rename from doc/developer/05-email-inbound.mdrename to doc/developer/prod-03-email-inbound.mdindex 14b1f6fd..15dd5f84 100644--- a/doc/developer/05-email-inbound.md+++ b/doc/developer/prod-03-email-inbound.md@@ -26,7 +26,7 @@ To enable inbound email features, you need to create a webhook in Postmark.Atomic CRM uses a Supabase Edge Function to handle the webhook and process the received emails. You need to configure your Supabase project to handle the incoming requests.-In a terminal, after you have [linked your Supabase project](./supabase-configuration.md#using-an-existing-remote-supabase-instance), run the following commands:+In a terminal, after you have [linked your Supabase project](./dev-01-supabase-configuration.md#using-an-existing-remote-supabase-instance), run the following commands:```shnpx supabase secrets set POSTMARK_WEBHOOK_USER=<user>diff --git a/doc/user/01-create-first-user.md b/doc/user/01-create-first-user.mdindex 1a641616..c543ebb8 100644--- a/doc/user/01-create-first-user.md+++ b/doc/user/01-create-first-user.md@@ -2,6 +2,6 @@The first time a user will open the Atomic CRM App, they will be prompted to create the first user. The user will automatically be granted administrator role.-./videos/01-create-first-user.webm+https://github.com/user-attachments/assets/1969c422-d280-4139-bac9-e4d91d65eda3Note: If the app is connected to the production database, the user will need to validate their account by mail.\ No newline at end of filediff --git a/doc/user/02-import-contacts.md b/doc/user/02-import-contacts.mdindex fdbd8ac8..bb052b5d 100644--- a/doc/user/02-import-contacts.md+++ b/doc/user/02-import-contacts.md@@ -1,6 +1,6 @@# Import Contacts-Atomic CRM supports bulk contact import. An exemple of the expected CSV file is available in the contact import modal.+Atomic CRM supports contact bulk import. An example of the expected CSV file is available in the contact import modal.The button to bulk import contact is available:- On the dashboard if no contact has been imported yet, or there is no note added to any contact@@ -8,4 +8,4 @@ The button to bulk import contact is available:When importing contacts, companies and tags will be automatically matched if they exist on the system, or imported ortherwise.-./videos/02-import-contacts.webm+https://github.com/user-attachments/assets/278a1969-b67f-4128-b75f-23e1b6ac1090\ No newline at end of filediff --git a/doc/user/videos/01-create-first-user.webm b/doc/user/videos/01-create-first-user.webmdeleted file mode 100644index d7b8bf19..00000000Binary files a/doc/user/videos/01-create-first-user.webm and /dev/null differdiff --git a/doc/user/videos/02-import-contacts.webm b/doc/user/videos/02-import-contacts.webmdeleted file mode 100644index 59f19496..00000000Binary files a/doc/user/videos/02-import-contacts.webm and /dev/null differ