Local Demo Data (Development Only)
Populate a dedicated demo workspace with realistic CRM data for local development, manual QA, UI validation, and dashboard demonstrations.
Never run this in production. The Artisan command aborts immediately when APP_ENV=production.
Prerequisites
- Migrate and seed the central platform:
php artisan migrate
php artisan db:seed --class=Database\\Seeders\\Central\\CentralDatabaseSeeder- Ensure
APP_ENV=localin.env.
Quick start
php artisan local:seed-demoThis will:
- Create the Demo CRM Workspace tenant (if it does not exist)
- Seed demo users, leads, tasks, notes, follow-ups, activities, and notifications
- Print login credentials and record counts
Demo workspace credentials
| Field | Value |
|---|---|
| Domain | demo-crm.localhost |
| Owner email | owner@demo-crm.local |
| Password | password |
Additional demo users use {slug}@demo-crm.local with the same password.
Configure these values in config/local-demo.php.
Dataset sizes
Use --size to control volume:
| Size | Users | Leads | Tasks |
|---|---|---|---|
small | 8 | 50 | 25 |
medium (default) | 25 | 500 | 300 |
large | 30 | 2,000 | 1,000 |
php artisan local:seed-demo --size=small
php artisan local:seed-demo --size=largeReset demo data
Use --fresh to wipe CRM demo data for the target workspace before re-seeding. You will be prompted to confirm.
php artisan local:seed-demo --fresh
php artisan local:seed-demo --size=medium --freshThe reset removes:
- Demo users (
*@demo-crm.local, except the owner) - All leads, tasks, and related notes, follow-ups, activities, and assignment history
- Demo notifications
It does not delete the workspace, billing records, or central platform data.
Seed an existing workspace
To seed a different tenant instead of the default demo workspace:
php artisan local:seed-demo --tenant=your-workspace-slugStaging (explicit opt-in only)
Demo seeders refuse to run outside the local environment unless you pass:
php artisan local:seed-demo --force-local-demoProduction always aborts, even with --force-local-demo.
What gets seeded
Users
- Keeps the workspace owner (
superadmin) - Adds 7–29 demo users with realistic names and job titles
- Assigns existing RBAC roles:
manager,admin,staff - Varies suspension status and account age
Leads
- Weighted pipeline distribution (New → Won/Lost)
- Realistic lead values ($100 – $150k+)
- Notes, follow-ups (today, overdue, completed), activity timelines, assignment history
Tasks
- Mixed statuses, priorities, and due dates (overdue, today, next week, future)
- Comments (task notes) and activity timelines
Dashboard widgets
Seeded data supports:
- Pipeline overview and revenue sparkline
- Lead sources
- Today's / overdue follow-ups
- Upcoming / overdue tasks
- Activity feed and notifications
Architecture
| Component | Path |
|---|---|
| Artisan command | app/Console/Commands/LocalSeedDemoCommand.php |
| Config | config/local-demo.php |
| Master seeder | database/seeders/Local/LocalDevelopmentSeeder.php |
| Child seeders | TenantUsersSeeder, LeadsSeeder, TasksSeeder, DemoNotificationsSeeder |
| Services | app/Services/Local/LocalDemoDataService.php |
Demo seeders are not registered in DatabaseSeeder or TenantDatabaseSeeder.
Tests
php artisan test --compact tests/Feature/Local/LocalSeedDemoCommandTest.phpPlaywright
Existing Playwright tests self-provision workspaces and do not depend on demo seeders. Use demo data for manual QA and local UI exploration only.