A comprehensive, enterprise-grade CRM system with advanced reporting, workflows, multi-tenancy, and ML integration capabilities.
- Multi-Tenant Architecture: Fully isolated tenant data with subscription management
- Comprehensive CRM Modules: Leads, Contacts, Accounts, Opportunities, Activities, Products, Quotes, Invoices
- Advanced RBAC: Role-based access control with field-level permissions
- Workflow Automation: Visual workflow builder with triggers, conditions, and actions
- Powerful Reporting: Custom report builder with exports (CSV, Excel, PDF)
- RESTful API: Complete JSON REST API with JWT authentication
- Audit Logging: Complete change history tracking
- File Management: S3-compatible storage for attachments
- Multi-language Support: i18n ready
- PWA Ready: Progressive web app for mobile access
- ML/AI Integration: Predictive scoring and analytics hooks
- Backend: PHP 7.3+ with Slim Framework
- Database: MySQL 8.0+ (utf8mb4)
- Cache/Queue: Redis
- Authentication: JWT with refresh tokens
- ORM: Eloquent (standalone)
- API: RESTful JSON
- Frontend: Vue 3 + Vite (optional, API-first design)
- Docker & Docker Compose (recommended)
- OR: PHP 7.3+, MySQL 8.0+, Redis, Composer
-
Clone the repository
git clone https://github.com/your-org/splash-crm.git cd splash-crm -
Copy environment file
cp .env.example .env
-
Update
.envfile# Generate JWT secret JWT_SECRET=$(openssl rand -base64 32) # Update .env with the generated secret sed -i "s/JWT_SECRET=/JWT_SECRET=$JWT_SECRET/" .env
-
Start Docker containers
docker-compose up -d
-
Install dependencies
docker-compose exec app composer install -
Run database migrations
docker-compose exec app php bin/migrate.php -
Seed demo data (optional)
docker-compose exec app php bin/seed.php -
Access the application
- API: http://localhost:8000
- PHPMyAdmin: http://localhost:8080
- MailHog: http://localhost:8025
After seeding, use these credentials to login:
Administrator:
- Email:
[email protected] - Password:
password123
Sales Representative:
- Email:
[email protected] - Password:
password123
Login
POST /api/v1/auth/login
Content-Type: application/json
{
"email": "[email protected]",
"password": "password123"
}Response:
{
"success": true,
"message": "Login successful",
"data": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGc...",
"refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGc...",
"token_type": "Bearer",
"expires_in": 3600
}
}Using the Access Token
GET /api/v1/leads
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGc...GET /api/v1/leads- List all leadsPOST /api/v1/leads- Create a new leadGET /api/v1/leads/{id}- Get a specific leadPUT /api/v1/leads/{id}- Update a leadDELETE /api/v1/leads/{id}- Delete a lead
GET /api/v1/contacts- List all contactsPOST /api/v1/contacts- Create a new contactGET /api/v1/contacts/{id}- Get a specific contactPUT /api/v1/contacts/{id}- Update a contactDELETE /api/v1/contacts/{id}- Delete a contact
GET /api/v1/accounts- List all accountsPOST /api/v1/accounts- Create a new accountGET /api/v1/accounts/{id}- Get a specific accountPUT /api/v1/accounts/{id}- Update an accountDELETE /api/v1/accounts/{id}- Delete an account
GET /api/v1/opportunities- List all opportunitiesPOST /api/v1/opportunities- Create a new opportunityGET /api/v1/opportunities/{id}- Get a specific opportunityPUT /api/v1/opportunities/{id}- Update an opportunityDELETE /api/v1/opportunities/{id}- Delete an opportunity
The system includes 14 comprehensive migration files covering:
- Core: Tenants, Users, Roles, Permissions
- CRM: Leads, Contacts, Accounts, Opportunities, Activities
- Sales: Products, Quotes, Invoices, Payments
- Automation: Workflows, Reports, Dashboards
- Support: Audit Logs, Attachments, Notes, Tags
splash-crm/
├── app/
│ ├── Http/
│ │ ├── Controllers/ # API controllers
│ │ └── Middleware/ # Authentication, CORS, etc.
│ ├── Models/ # Eloquent models
│ ├── Services/ # Business logic services
│ └── helpers.php # Helper functions
├── bin/
│ ├── migrate.php # Migration runner
│ └── seed.php # Seeder runner
├── config/ # Configuration files
├── database/
│ ├── migrations/ # SQL migration files
│ └── seeders/ # Data seeders
├── docker/ # Docker configuration
├── public/
│ └── index.php # Application entry point
├── routes/
│ ├── api.php # API routes
│ └── web.php # Web routes
├── storage/ # Logs, cache, uploads
├── composer.json # PHP dependencies
├── docker-compose.yml # Docker services
└── README.md # This file
composer test# Static analysis
composer phpstan
# Code style check
composer phpcs
# Auto-fix code style
composer phpcbf- Password Hashing: bcrypt with automatic rehashing
- JWT Authentication: Signed tokens with refresh capability
- RBAC: Role and permission-based access control
- Field-Level Security: Granular field permissions
- SQL Injection Protection: Parameterized queries via Eloquent
- Audit Logging: All changes tracked
MIT License - see LICENSE file for details
Splash CRM - Enterprise CRM, Simplified