Skip to content

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

[doc] Improve customization doc

François Zaninotto2b7305ff11ca
diff --git a/doc/Readme.md b/doc/Readme.md
index 50794446..774e7ecf 100644
--- a/doc/Readme.md
+++ b/doc/Readme.md
@@ -13,14 +13,16 @@ Check the project [README](../README.md#installation) for installation instructi
## Developer Documentation
- [General Concepts](./developer/architecture-choices.md)
+- [Using Fake Rest Data Provider for Development](./developer/data-providers.md)
-### Customization
+- Customization
-- [Customizing the CRM](./developer/customizing.md)- [Creating Migrations](./developer/migrations.md) *(optional)*
-- [Using Fake Rest Data Provider for Development](./developer/data-providers.md) *(optional)*
+ - [Changing The Constants](./developer/customizing.md)
+ - [Theming](./developer/theming.md)
+ - [Updating The Model](./developer/migrations.md)
-### Deploying to Production
+- Deploying to Production
-- [Configuring Supabase](./developer/supabase-configuration.md)
-- [Configuring Inbound Email](./developer/inbound-email-configuration.md) *(optional)*
-- [Deployment](./developer/deploy.md)
+ - [Configuring Supabase](./developer/supabase-configuration.md)
+ - [Configuring Inbound Email](./developer/inbound-email-configuration.md) *(optional)*
+ - [Deployment](./developer/deploy.md)
diff --git a/doc/developer/customizing.md b/doc/developer/customizing.md
index e81d5022..5e67519d 100644
--- a/doc/developer/customizing.md
+++ b/doc/developer/customizing.md
@@ -16,18 +16,13 @@ export default App;
`<CRM>` accepts various props to customize the application domain and look and feel, so the `App.tsx` file is the best place to configure your CRM.
-For instance, the following code snippet shows how to customize the CRM application title, logo, themes, and domain-specific data.
+For instance, the following code snippet shows how to customize the CRM application domain-specific data.
```tsx
import { CRM } from './root/CRM';
-import { radiantLightTheme, radiantDarkTheme } from 'react-admin';
const App = () => (
<CRM
- title="ACME CRM"
- logo="./img/logo.png" // The logo path is relative to the public directory
- lightTheme={radiantLightTheme}
- darkTheme={radiantDarkTheme}
contactGender={[
{ value: 'male', label: 'He' },
{ value: 'female', label: 'She' },
@@ -55,64 +50,19 @@ export default App;
`<CRM>` accepts the following props:
-| Props | Description | Type |
-|-----------------------|-----------------------------------------------------------------------|-----------------|
-| contactGender | The gender options for contacts used in the application. | ContactGender[] |
-| companySectors | The list of company sectors used in the application. | string[] |
-| darkTheme | The theme to use when the application is in dark mode. | RaThemeOptions |
-| dealCategories | The categories of deals used in the application. | string[] |
-| dealPipelineStatuses | The statuses of deals in the pipeline used in the application | string[] |
-| dealStages | The stages of deals used in the application. | DealStage[] |
-| lightTheme | The theme to use when the application is in light mode. | RaThemeOptions |
-| logo | The logo used in the CRM application. | string |
-| noteStatuses | The statuses of notes used in the application. | NoteStatus[] |
-| taskTypes | The types of tasks used in the application. | string[] |
-| title | The title of the CRM application. | string |
-
-## Using Test Data
-
-Developing features with an empty database can be challenging. To help with this, Atomic CRM includes a CSV file with test data that can be imported into the application.
-
-To import the test data, follow these steps:
-
-1. Go to the contacts page.
-2. Click the "Import" button.
-3. Select the file located at `test-data/contacts.csv`.
-
-## Customizing The Theme
-
-Atomic CRM uses the Material-UI library for theming. You can customize the light and dark themes by setting the `lightTheme` and `darkTheme` props on the `<CRM>` component.
-
-Check out react-admin's [theming documentation](https://marmelab.com/react-admin/Theming.html) for more information on how to customize the themes.
-
-## Customizing The Layout
-
-The components that make up the layout of the application (menu, container, etc) are located in the `src/layout` directory. You can customize the layout by modifying these components.
-
-## Customizing the Homepage
-
-The home page of the application is rendered by the `Dashboard.tsx` component. Updating this file to customize the dashboard.
-
-Here is a simple example of a customized dashboard:
-
-```jsx
-// ./src/dashboard/Dashboard.tsx
-import React from 'react';
-import { Card, CardContent, Typography } from '@mui/material';
-
-export const Dashboard = () => (
- <Card>
- <CardContent>
- <Typography variant="h5" component="div">
- Welcome to the Custom Dashboard!
- </Typography>
- <Typography variant="body2" color="text.secondary">
- This is a customized homepage for your application. You can add any components or content here to suit your needs.
- </Typography>
- </CardContent>
- </Card>
-);
-```
+| Props | Description | Type |
+|-------------------------|-----------------------------------------------------------------------|-----------------|
+| `contactGender` | The gender options for contacts used in the application. | ContactGender[] |
+| `companySectors` | The list of company sectors used in the application. | string[] |
+| `darkTheme` | The theme to use when the application is in dark mode. | RaThemeOptions |
+| `dealCategories` | The categories of deals used in the application. | string[] |
+| `dealPipelineStatuses` | The statuses of deals in the pipeline used in the application | string[] |
+| `dealStages` | The stages of deals used in the application. | DealStage[] |
+| `lightTheme` | The theme to use when the application is in light mode. | RaThemeOptions |
+| `logo` | The logo used in the CRM application. | string |
+| `noteStatuses` | The statuses of notes used in the application. | NoteStatus[] |
+| `taskTypes` | The types of tasks used in the application. | string[] |
+| `title` | The title of the CRM application. | string |
## Disabling Telemetry
@@ -132,4 +82,4 @@ import { CRM } from './root/CRM';
const App = () => <CRM disableTelemetry />;
export default App;
-```
\ No newline at end of file
+```
diff --git a/doc/developer/data-providers.md b/doc/developer/data-providers.md
index 45915c83..f0a52595 100644
--- a/doc/developer/data-providers.md
+++ b/doc/developer/data-providers.md
@@ -2,6 +2,16 @@
By default, the CRM demo uses [Supabase](https://supabase.com) for the backend API. Supabase is an open-source alternative to Firebase, built on top of Postgres. It provides a REST API and a real-time subscription system. The generous free tier allows you to run a small CRM for free.
+## Using Test Data
+
+Developing features with an empty database can be challenging. To help with this, Atomic CRM includes a CSV file with test data that can be imported into the application.
+
+To import the test data, follow these steps:
+
+1. Go to the contacts page.
+2. Click the "Import" button.
+3. Select the file located at `test-data/contacts.csv`.
+
## Using A Fake API For Development
For development purposes, you can use an alternative data provider called [FakeRest](https://github.com/marmelab/FakeRest). It's a simple REST API running in the browser that resets the data on each page reload. It's useful for testing the frontend without having to set up a backend, e.g. to let end users test some updates before the backend is ready.
diff --git a/doc/developer/theming.md b/doc/developer/theming.md
new file mode 100644
index 00000000..3fb2dcee
--- /dev/null
+++ b/doc/developer/theming.md
@@ -0,0 +1,73 @@
+# Theming Atomic CRM
+
+You can update the look and feel of Atomic CRM by customizing the themes, layout, and components.
+
+## Changing the Title and Logo
+
+Set the title and logo of the CRM application by passing the `title` and `logo` props to the `<CRM>` component in the `src/App.tsx` file. The logo path should be relative to the public directory.
+
+```tsx
+import { CRM } from './root/CRM';
+
+const App = () => (
+ <CRM
+ title="ACME CRM"
+ logo="./img/logo.png" // The logo path is relative to the public directory
+ />
+);
+```
+
+## Customizing The Theme
+
+Atomic CRM accepts a custom theme to override the style of all components (fonts, colors, borders, etc). Use the `lightTheme` and `darkTheme` props on the `<CRM>` component to override the theme.
+
+For example, you can use the `radiant` theme as follows:
+
+```tsx
+import { CRM } from './root/CRM';
+import { radiantLightTheme, radiantDarkTheme } from 'react-admin';
+
+const App = () => (
+ <CRM
+ lightTheme={radiantLightTheme}
+ darkTheme={radiantDarkTheme}
+ />
+);
+```
+
+Atomic CRM comes with 5 built-in themes:
+
+| &nbsp;&nbsp; [Default](https://marmelab.com/react-admin/AppTheme.html#default) [![Default light theme](https://marmelab.com/react-admin/img/defaultLightTheme1.jpg)]((AppTheme.html#default)) | &nbsp;&nbsp; [B&W](https://marmelab.com/react-admin/AppTheme.html#bw) [![B&W light theme](https://marmelab.com/react-admin/img/bwLightTheme1.jpg)](https://marmelab.com/react-admin/AppTheme.htmlml#bw) |
+| &nbsp;&nbsp; [Nano](https://marmelab.com/react-admin/AppTheme.html#nano) [![Nano light theme](https://marmelab.com/react-admin/img/nanoLightTheme1.jpg)](https://marmelab.com/react-admin/AppTheme.htmlml#nano) | &nbsp;&nbsp; [Radiant](https://marmelab.com/react-admin/AppTheme.html#radiant) [![Radiant light theme](https://marmelab.com/react-admin/img/radiantLightTheme1.jpg)](https://marmelab.com/react-admin/AppTheme.htmlml#radiant) |
+| &nbsp;&nbsp; [House](https://marmelab.com/react-admin/AppTheme.html#house) [![House light theme](https://marmelab.com/react-admin/img/houseLightTheme1.jpg)](https://marmelab.com/react-admin/AppTheme.htmlml#house) | |
+
+Check out react-admin's [theming documentation](https://marmelab.com/react-admin/Theming.html) for more information on how to customize the themes.
+
+## Customizing The Layout
+
+The components that make up the layout of the application (menu, container, etc) are located in the `src/layout` directory. You can customize the layout by modifying these components.
+
+## Customizing the Homepage
+
+The home page of the application is rendered by the `Dashboard.tsx` component. Updating this file to customize the dashboard.
+
+Here is a simple example of a customized dashboard:
+
+```jsx
+// ./src/dashboard/Dashboard.tsx
+import React from 'react';
+import { Card, CardContent, Typography } from '@mui/material';
+
+export const Dashboard = () => (
+ <Card>
+ <CardContent>
+ <Typography variant="h5" component="div">
+ Welcome to the Custom Dashboard!
+ </Typography>
+ <Typography variant="body2" color="text.secondary">
+ This is a customized homepage for your application. You can add any components or content here to suit your needs.
+ </Typography>
+ </CardContent>
+ </Card>
+);
+```