You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
56
62
57
-
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.
63
+
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.
64
+
65
+

58
66
59
67
## Bootstrapping with Sample Data
60
68
61
69
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.
62
70
63
-
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.
71
+

72
+
73
+
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.
74
+
75
+

64
76
65
77
:::tip
66
78
If you need to reset the database, stop the Supabase instance with `npx supabase stop --no-backup`, and restart it with `npx supabase start`.
4. Create a migration for these changes, to allow them to be replicated in production. Run the following command in your terminal:
165
+
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.
166
+
167
+
4. Create a migration for these schema changes, to allow them to be replicated in production. Run the following command in your terminal:
145
168
146
169
```sh
147
170
npx supabase db diff -f create_referred_by
148
171
```
149
172
150
173
This will create a new migration file in the `supabase/migrations` folder. Supabase will automatically apply this migration when you deploy to production.
151
174
175
+
That's it! You've just added a custom field to the Contacts entity. Supabase automatically updates the API to include the new field.
176
+
152
177
## Displaying Custom Fields in the Frontend
153
178
154
179
Next, you need to make this new field available in the frontend.
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.
230
255
256
+

257
+
231
258
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.
This will display the "Referred By" information in the contact sidebar when available.
257
284
258
-
## Customizing The UI
285
+

259
286
260
287
## Deploying to Production
261
288
@@ -291,6 +318,8 @@ After a couple minutes, your customized CRM will be available at `https://<usern
291
318
292
319
You can proceed with the creation of the first admin user and start using your CRM in production!
293
320
321
+

322
+
294
323
:::tip
295
324
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.
0 commit comments