Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Add images

fzaninotto06fde6af654c
diff --git a/doc/Readme.md b/doc/Readme.md
index 4fd80a9c..abaa71da 100644
--- a/doc/Readme.md
+++ b/doc/Readme.md
@@ -14,6 +14,8 @@ Atomic CRM is designed to be easy to customize and extend by developers with bas
1. Fork the Atomic CRM repository on GitHub to your own account.
+ ![Fork the repository](./images/atomic-crm-repository.png)
+
2. Clone your forked repository to your local machine:
```bash
@@ -43,24 +45,34 @@ Atomic CRM is designed to be easy to customize and extend by developers with bas
Atomic CRM now runs at [http://localhost:5173/](http://localhost:5173/).
+![Welcome Screen](./images/welcome-screen.png)
+
+:::tip
If you need debug the backend, you can access the following services:
- Supabase dashboard: [http://localhost:54323/](http://localhost:54323/)
- REST API: [http://127.0.0.1:54321](http://127.0.0.1:54321)
- 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/)
+:::
## Admin User Setup
When you first access the application at [http://localhost:5173/](http://localhost:5173/), you will be prompted to create the first admin user. This user will have full access to the application and will be able to manage other users.
-Once the admin user is created, you will be redirected to the dashboard. It's showing an onboarding screen to help you get started as long as there is no data in the database.
+Once the admin user is created, you will be redirected to the dashboard. It's currently showing an onboarding screen to help you get started as long as there is no data in the database.
+
+![Onboarding Screen](./images/onboarding.png)
## Bootstrapping with Sample Data
It's easier to develop on a non-empty application. Atomic CRM provides a sample dataset you can import to get started. Click the import button and choose the sample data file at `test-data/contacts.csv`. This will add 500 contacts and 55 companies to your local database.
-Play with the application to get familiar with its features. Add a few notes and tasks to some contacts. This will end the onboarding and reveal the regular dashboard.
+![Import dialog](./images/import.png)
+
+Now you can navigate to the Contacts list. Play with the application to get familiar with its features. Add a few notes and tasks to some contacts. This will end the onboarding and reveal the regular dashboard.
+
+![Contact List](./images/contact-list.png)
:::tip
If you need to reset the database, stop the Supabase instance with `npx supabase stop --no-backup`, and restart it with `npx supabase start`.
@@ -94,6 +106,8 @@ const App = () => (
export default App;
```
+![Customized Title](./images/customized-title.png)
+
Check the [Customizing Atomic CRM](./doc/developer/customizing.md) guide for an exhaustive list of configuration settings you can customize.
## Adding Custom Fields
@@ -102,12 +116,17 @@ You can extend the data model of Atomic CRM by adding custom fields to the exist
You will do so in the Supabase Studio. To access the Studio, go to [http://localhost:54323/](http://localhost:54323/).
+![Supabase Studio](./images/supabase-studio.png)
+
We're going to add a custom field to the Contacts table: a "Referred By" text field to store the name of the person who referred the contact.
1. Click on the Database menu
2. Choose the Tables section in the Database management panel. You will see the list of tables used by Atomic CRM.
3. Click on the `contacts` table in the list of tables.
4. Click on the "New Column" button to add a new column to the table.
+
+ ![Supabase Tables](./images/supabase-tables.png)
+
5. In the "Add new column to contacts" dialog, enter the following details:
- Name: `referred_by`
- Type: `text`
@@ -115,6 +134,8 @@ We're going to add a custom field to the Contacts table: a "Referred By" text fi
- Allow Nullable: checked
6. Finally, click on the "Save" button to add the new column to the table.
+ ![Supabase New Column](./images/supabase-new-column.png)
+
Atomic CRM uses views to simplify the queries. You need to update the `contacts_summary` view to include the new `referred_by` field.
1. Click on the "SQL Editor" menu in the left sidebar.
@@ -139,9 +160,11 @@ Atomic CRM uses views to simplify the queries. You need to update the `contacts_
co.id, c.name;
```
-3. Click on the "Run" button to execute the SQL command.
+ ![Supabase SQL Editor](./images/supabase-sql-editor.png)
-4. Create a migration for these changes, to allow them to be replicated in production. Run the following command in your terminal:
+3. Click on the "Run" button to execute the SQL command. You will need to confirm the action since it will drop and recreate the view.
+
+4. Create a migration for these schema changes, to allow them to be replicated in production. Run the following command in your terminal:
```sh
npx supabase db diff -f create_referred_by
@@ -149,6 +172,8 @@ Atomic CRM uses views to simplify the queries. You need to update the `contacts_
This will create a new migration file in the `supabase/migrations` folder. Supabase will automatically apply this migration when you deploy to production.
+That's it! You've just added a custom field to the Contacts entity. Supabase automatically updates the API to include the new field.
+
## Displaying Custom Fields in the Frontend
Next, you need to make this new field available in the frontend.
@@ -228,6 +253,8 @@ const ContactMiscInputs = () => {
The application will automatically pick up this code change. Go back to [http://localhost:5173/](http://localhost:5173/) and you can now create or edit a contact and set the "Referred By" field.
+![Referred By in Contact Form](./images/contact-inputs-referred-by.png)
+
Finally, update the Contacts sidebar to display the referrer when available. Open the `src/atomic-crm/contacts/ContactAside.tsx` file and add a new `<TextField>` for the `referred_by` field.
```tsx{4-11}
@@ -255,7 +282,7 @@ export const ContactAside = ({ link = "edit" }: { link?: "edit" | "show" }) => {
This will display the "Referred By" information in the contact sidebar when available.
-## Customizing The UI
+![Contact Sidebar](./images/contact-sidebar.png)
## Deploying to Production
@@ -291,6 +318,8 @@ After a couple minutes, your customized CRM will be available at `https://<usern
You can proceed with the creation of the first admin user and start using your CRM in production!
+![Atomic CRM in Production](./images/atomic-crm-demo.png)
+
:::tip
Supabase.com and GitHub Pages are just two of the many services you can use to host your Atomic CRM. You can [self-host a supabase instace](https://supabase.com/docs/guides/self-hosting), and use any static server or CDN (e.g. CloudFlare, Netlify, Vercel, etc.) to host the frontend.
:::
diff --git a/doc/images/atomic-crm-demo.png b/doc/images/atomic-crm-demo.png
new file mode 100644
index 00000000..997a0c5d
Binary files /dev/null and b/doc/images/atomic-crm-demo.png differ
diff --git a/doc/images/atomic-crm-repository.png b/doc/images/atomic-crm-repository.png
new file mode 100644
index 00000000..505d3ede
Binary files /dev/null and b/doc/images/atomic-crm-repository.png differ
diff --git a/doc/images/contact-inputs-referred-by.png b/doc/images/contact-inputs-referred-by.png
new file mode 100644
index 00000000..86bd2704
Binary files /dev/null and b/doc/images/contact-inputs-referred-by.png differ
diff --git a/doc/images/contact-list.png b/doc/images/contact-list.png
new file mode 100644
index 00000000..b5c67553
Binary files /dev/null and b/doc/images/contact-list.png differ
diff --git a/doc/images/contact-sidebar.png b/doc/images/contact-sidebar.png
new file mode 100644
index 00000000..67f054e4
Binary files /dev/null and b/doc/images/contact-sidebar.png differ
diff --git a/doc/images/customized-title.png b/doc/images/customized-title.png
new file mode 100644
index 00000000..4f8b6c51
Binary files /dev/null and b/doc/images/customized-title.png differ
diff --git a/doc/images/import.png b/doc/images/import.png
new file mode 100644
index 00000000..6df0c7ad
Binary files /dev/null and b/doc/images/import.png differ
diff --git a/doc/images/onboarding.png b/doc/images/onboarding.png
new file mode 100644
index 00000000..134ab665
Binary files /dev/null and b/doc/images/onboarding.png differ
diff --git a/doc/images/supabase-new-column.png b/doc/images/supabase-new-column.png
new file mode 100644
index 00000000..cf0c9dc3
Binary files /dev/null and b/doc/images/supabase-new-column.png differ
diff --git a/doc/images/supabase-sql-editor.png b/doc/images/supabase-sql-editor.png
new file mode 100644
index 00000000..261abb9d
Binary files /dev/null and b/doc/images/supabase-sql-editor.png differ
diff --git a/doc/images/supabase-studio.png b/doc/images/supabase-studio.png
new file mode 100644
index 00000000..44e7751d
Binary files /dev/null and b/doc/images/supabase-studio.png differ
diff --git a/doc/images/supabase-tables.png b/doc/images/supabase-tables.png
new file mode 100644
index 00000000..1ce1945f
Binary files /dev/null and b/doc/images/supabase-tables.png differ
diff --git a/doc/images/welcome-screen.png b/doc/images/welcome-screen.png
new file mode 100644
index 00000000..d52010be
Binary files /dev/null and b/doc/images/welcome-screen.png differ