Web-based CRM for client and deal management with role-based access (administrator, head, manager). Built with Laravel 12 following the MRSRB pattern (Model–Request–Service–Resource–Blade), Blade, Alpine.js, and Tailwind. Includes personal tools (tasks, notes, calendar, reminders), file attachments, soft-delete archival, Redis caching, and i18n (EN/UA/RU). Local development via Laravel Sail.
Light theme dashboard:
Dark theme user management:
- Architecture — MRSRB layers, data flow, modules, authorization, caching
- Database schema — ER diagram (Mermaid)
- Class diagram — controllers, policies, models (Mermaid)
After seeding the database, predefined users and sample business data are available for local testing.
./vendor/bin/sail artisan migrate --seedSeeders run in order: AdminSeeder (roles + admin if no users exist), then FakeDataSeeder (head, managers, clients, deals).
All accounts use password: password. Sign in at /login with email + password. Self-registration is not available.
| Role | Name | Seeder | |
|---|---|---|---|
| Administrator | admin@mail.com |
Administrator | AdminSeeder (only when the users table is empty) |
| Head | master@mail.com |
Master Head | FakeDataSeeder |
| Manager | manager1@mail.com |
Manager 1 | FakeDataSeeder |
| Manager | manager2@mail.com |
Manager 2 | FakeDataSeeder |
UserFactory is used in automated tests to generate random users (default password password). Fixed demo accounts are defined in seeders only.
FakeDataSeeder creates:
- 30 clients — 10 potential, 5 soft-deleted (archive), 5 loyal active, 10 regular active
- 100 deals — distributed across clients
- Reference statuses — client:
potential,active; deal:in_progress,active,completed
Administrator
- Full access to all clients and deals
- System settings (
/settings) and status directories (CRUD + archive) - System log viewer (
/log-viewer) - User management (all roles)
- Personal tools (tasks, note, calendar, reminders) and profile (name, avatar, password; email is immutable)
Head
- All business data (clients, deals, dashboard with global KPIs)
- Manager management: list, detail, assign clients, enable/disable managers
- User management: create/edit users with
managerorheadroles (notadmin) - Status directories: full CRUD + archive at
/settings/client-statusesand/settings/deal-statuses - Personal tools and profile (own data only)
- No access to system settings (app name/locale) or system log
Manager
- Own clients only (
manager_idmatches the logged-in user) and their deals - Can create clients;
manager_idis set automatically to the current user on create - CRUD, archive, and restore for own clients and deals
- Dashboard KPIs scoped to own data
- Personal tools and profile (own data only)
- No access to managers, users, status directories, or system settings
All roles
- Locale switcher (EN / UA / RU)
- Light/dark theme
- File uploads on client and deal detail pages
- Docker Desktop (or Docker Engine + Docker Compose)
- Git
- Composer (for initial dependency installation on the host)
All
artisan,composer,npm, andphpcommands in day-to-day work run through Sail:./vendor/bin/sail …
git clone <repository-url> crm
cd crmcomposer installcp .env.example .envVerify database variables in .env — they must match compose.yaml:
| Variable | Value | Notes |
|---|---|---|
DB_CONNECTION |
mysql |
Not sqlite |
DB_HOST |
mysql |
Docker service name, not 127.0.0.1 |
DB_PORT |
3306 |
|
DB_DATABASE |
crm |
|
DB_USERNAME |
sail |
User created by the MySQL container |
DB_PASSWORD |
password |
Must match the root password in the container |
Set Sail user identifiers (Linux/macOS):
echo "WWWUSER=$(id -u)" >> .env
echo "WWWGROUP=$(id -g)" >> .env./vendor/bin/sail up -d./vendor/bin/sail artisan key:generate
./vendor/bin/sail artisan migrate --seed
./vendor/bin/sail npm install
./vendor/bin/sail npm run buildThe application is available at http://localhost. Use the demo accounts above to sign in.
Create a new project via Composer with an explicit Laravel version. The laravel new command is not used.
composer create-project laravel/laravel:^12.0 crm
cd crmcomposer require laravel/sail --dev
php artisan sail:install --with=mysql --no-interactionIf
compose.yamlalready exists in the repository (as in this project), skip thesail:installstep.
cp .env.example .envConfigure .env using the table above (DB_HOST=mysql, DB_USERNAME=sail, DB_PASSWORD=password, etc.) and add WWWUSER / WWWGROUP:
echo "WWWUSER=$(id -u)" >> .env
echo "WWWGROUP=$(id -g)" >> .env./vendor/bin/sail up -d
./vendor/bin/sail artisan key:generate
./vendor/bin/sail artisan migrate --seed
./vendor/bin/sail npm install
./vendor/bin/sail npm run build

