Sample data
Where the sample data lives, what reads it, and how to take it out before real customers arrive, without breaking empty screens.
Where it lives
All sample content is in src/lib/data. Each file holds the types for one area and its sample records; the types stay, the records go.
| File | Sample records |
|---|---|
customers.ts | CUSTOMERS |
records.ts | CONTACTS, CONTRACTS, INVOICES, TRANSACTIONS, CUSTOMER_DOCUMENTS |
comms.ts | THREADS, NOTES, TASKS |
leads.ts | LEADS |
meetings.ts | SEEDED_MEETINGS, MEETING_NOTES |
emails.ts | SEEDED_EMAILS, SEEDED_SUGGESTIONS |
documents.ts | LIBRARY_DOCUMENTS |
whiteboards.ts | BOARDS |
workflows.ts | WORKFLOWS |
admin.ts, workspace.ts | The sample workspace, its members and settings |
Network and Invoices have no sample files of their own: they're worked out from the records above, so they empty out with them.
The demo date
The sample data is built around a fixed day, DEMO_TODAY in src/lib/data/records.ts, so it looks the same whenever someone opens the demo: the same invoices overdue, the same renewals coming up. Many screens use it for "today". Search the project for DEMO_TODAY and switch each use to the real date once your data is real.
Leaving DEMO_TODAY in place with real data makes renewal countdowns, overdue days and monthly charts wrong, without any error.
Remove it before launch
- Connect one module at a time (see Database): its provider loads from your backend instead of the sample array.
- When nothing imports a sample array any more, delete it.
npm run typechecklists anything still using it. - Search for screens that import sample data directly instead of through a provider: some dashboard cards, the command palette, composer menus and the chart functions in
trends.tsandgrowth.tsdo. Database lists them. - Open every screen with an empty workspace. Each list should show its illustrated empty state, and each dashboard card a zero or an empty message, not an error.
- Replace the sample team in
admin.tsandworkspace.tswith the signed-in person and their workspace (see Sign-in). - Turn off the sample connections: start
mailboxasnullinDEFAULT_PREFERENCES, and keep only real integrations in the installed apps inshell-provider.tsx(the sample workspace has Google Meet, Zoom and Teams set up). Emails and Meetings then show their connect screens.
Keep a copy of the sample data for your own demo or tests: a seed script that writes it to a test database is often more useful than deleting it.
What saves in the browser
Some choices are saved in the browser under keys starting with accordion:, such as preferences, workspace settings, favorites, dashboards and saved views. Records aren't: they reset on reload. When you move a setting to your database, read it from there first so people don't see their old browser copy.