Generated: 2025-10-16 Project Type: Laravel REST API Service (Backend-only) Version: Laravel 10.x on PHP 8.2 Repository Type: Monolith
Digital is an enterprise-level Laravel REST API backend serving VueJS frontend and mobile applications. The system provides comprehensive business management capabilities including HR, CRM, Project Management, Asset Management, Procedures, OKR tracking, Vacation management, and AI-powered features.
| Metric | Count |
|---|---|
| Eloquent Models | 131 models |
| API Controllers | 99 controllers |
| Database Migrations | 368 migrations |
| API Routes | ~1,775 lines of route definitions |
| Business Modules | 8 core modules |
| Supported Languages | 5 (de, en, es, it, ro) |
Digital serves as a centralized platform for:
instance_id column on all models| Technology | Version | Purpose |
|---|---|---|
| PHP | 8.2+ | Backend language |
| Laravel | 10.x | MVC framework |
| MySQL | 5.7/8.0 | Primary database |
| Redis | Latest | Cache & queue backend |
| Package | Purpose |
|---|---|
| Laravel Sanctum | API token authentication |
| Laravel Scout | Full-text search (Meilisearch) |
| Laravel WebSockets | Real-time notifications |
| Spatie Sluggable | URL-friendly slugs |
| Panoscape History | Audit trail (ModelHistory) |
| Service | Purpose |
|---|---|
| AWS S3 | Cloud file storage |
| Stripe | Payment processing |
| OpenAI | AI features (GPT models) |
| Pinecone | Vector database (embeddings) |
| Meilisearch | Fast search engine |
| Firebase | Push notifications |
| Google APIs | Google service integrations |
| Package | Purpose |
|---|---|
| DomPDF | PDF generation |
| PHPWord | Word document export |
| Laravel Excel | Excel import/export |
| Intervention Image | Image manipulation |
Core Models: User, Department, Role, Skill, UserFile, Evaluation
Features: - Employee lifecycle management (onboarding, transfers, exits) - Organizational structure (departments, roles, hierarchy) - Performance evaluations & bonuses - Document management with expiry tracking - Skills & competencies tracking - Organizational charts
Rights: Role = Job Position (NOT permissions). Actual permissions managed via Rights system.
Core Models: Deal, Organization, Person, Pipeline, Stage
Features: - Sales pipeline management - Contact management (organizations & persons) - Deal tracking through customizable stages - Custom fields per entity type - Activity logging & history
Core Models: Project, Task, Meeting, MeetingSession, TaskTimer
Features: - Project creation & member management - Task assignment & tracking - Time tracking per task - Meeting scheduling & summaries - Task watchers & notifications - Task dependencies
Core Models: Procedure, Process, ProcessVersion, ProcedureLog, ProcedureApprovalRequest
Features: - Business process documentation - Multi-level approval workflows - Process versioning - Execution logging & analytics - Role-based procedure assignment - Checklist support
Core Models: Objective, KeyResult, MasterGoal, KeyResultLog
Features: - Company-wide objectives - Department/individual key results - Progress tracking & logging - Period-based planning - Cascade objectives (company → department → individual)
Core Models: VacationDay, VacationType, VacationPlanner, UserVacationDay, VacationApproval
Features: - Vacation request & approval workflow - Annual leave balance tracking - Vacation types (paid leave, sick leave, etc.) - Team vacation planning - Manager approval hierarchy - Vacation excuse documentation
Core Models: AssetManagementItem, AssetManagement, AssetManagementTemplate
Features: - Equipment & asset tracking - Asset assignment to employees - Maintenance schedules - Asset categories & templates - Depreciation tracking - Custom fields per asset type
Core Models: AiAgent, AiModel, AiThread, AiPrompt, AiLog
Features: - OpenAI GPT integration - Custom AI agents with specific roles - Conversation threading - Prompt templates - Pinecone vector embeddings - AI usage logging & analytics
| Model | Purpose | Applies To |
|---|---|---|
| Comment | Commenting system | Tasks, Deals, Meetings, etc. |
| Tag | Color-coded tagging | Any taggable entity |
| NotificationLog | In-app notifications | All users |
| ModelHistory | Audit trail | All entities with HasOperations trait |
| CustomField | Dynamic fields | Deals, Organizations, Persons, Assets |
| CustomFieldValue | Field values | Polymorphic storage |
CRITICAL: Role ≠ Permission
Scope Levels:
- 0 - NONE (no access)
- 1 - OWN (only self)
- 2 - DEPARTMENT_DOWN (own department + subordinates)
- 3 - ALL (instance-wide access)
Special Rights: - MASTER_ADMIN - Entrepreneur/System Owner (unrestricted access)
instance_id, foreign keys, frequently queried columnsinstance_id for tenant isolationuser_right with scope)/routes/api.php (~1,775 lines)Request:
json
{
"Authorization": "Bearer {token}",
"Content-Type": "application/json"
}
Success Response:
json
{
"success": true,
"data": {...},
"message": "Operation successful"
}
Error Response:
json
{
"success": false,
"message": "Error description",
"errors": {...}
}
users.firebase_tokenresources/lang/{locale}/__('general.message_key')npm run productionavatars/{user_id}/documents/{entity_type}/{entity_id}/exports/temp/Required background workers: - Email queue worker - Notification dispatcher - Scheduled task runner (cron)
Laravel scheduler runs: - Document expiry notifications - Batch email sending - Data cleanup tasks - Report generation
Comprehensive module documentation available in /docs-old/:
Total existing documentation: 13 files (~604 KB)
Document Generated: 2025-10-16 Workflow: BMAD document-project v1.2.0 Scan Level: Exhaustive (intelligent inventory)