Mintfit

MintfitV2 Dashboard

System Overview & Monitoring

Development

System Health

Overall Status: Healthy

Last checked: 2026-04-18T08:55:44+00:00

Database

healthy

Database connection is healthy

Cache

healthy

Cache is healthy

Database Connection

Status
Connected
Database
mintfit
Host
mysql:3306
Version
11.8.5-MariaDB-ubu2404
Database Size
6.64 MB
Active Connections
2

Queue Metrics

Pending Jobs
0
Failed Jobs
1
Worker Status
Unknown

Recent Failures

Queue Exception Failed At
default Symfony\Component\Process\Exception\ProcessFailedException: The command "PATH=$PATH:/usr/local/bin:/opt/homebrew/bin NODE_PATH=`npm root -g` "node" '/var/www/html/vendor/spatie/browsershot/src/../... 2026-04-02 18:42:30

Project README

MintfitV2

A modern Learning Management System (LMS) built as a modular monolith with Laravel 12. Designed to replace Moodle with a flexible, API-driven architecture that maintains microservice-style boundaries while keeping deployment simple.

Key Features

  • API-Only Backend - Stateless JWT authentication, JSON responses
  • Modular Monolith - Self-contained modules with strict boundaries enforced by Deptrac
  • Docker-Based - Complete development environment with one command
  • Anonymous Sessions - Guest users can interact before registration
  • Multi-Tenancy - Built-in tenant isolation
  • RBAC - Role-based access control with flexible permission system

Architecture

Each module is a self-contained domain with clean separation:

modules/{ModuleName}/
├── Domain/           # Entities, DTOs, value objects
├── Application/      # Services (public API), use cases
└── Infrastructure/   # Repositories, controllers, models

Module Communication: Modules interact only via Service injection. Services return DTOs, never models.

Current Modules: Health, Tenant, Identity, User, Block, Notification, Dashboard

Quick Start

# Complete setup (first time)
make setup

# Start development environment
make start

Services:

Common Commands

# Development
make start              # Start all services
make logs               # View application logs
make shell              # Open shell in container

# Database
make db-migrate         # Run migrations
make db-seed            # Seed database
make db-reset           # Fresh database with seeds

# Testing & Quality
make test               # Run all tests
make analyze            # Run all checks (tests, pint, deptrac, phpstan)
make pint               # Format code
make deptrac            # Check module boundaries

# Modules
make module NAME=Product TYPE=stateful    # Generate new module
make module-test MODULE=Tenant            # Test specific module
make module-migrate MODULE=Tenant         # Migrate specific module

# View all commands
make help

Creating a New Module

# Interactive mode (recommended)
make module NAME=Product

# With options
make module NAME=Order TYPE=stateful WITH_EVENTS=1 WITH_TESTS=1

The generator creates:

  • Complete module structure (Domain, Application, Infrastructure)
  • DTOs with validation rules
  • Service with CRUD operations
  • Repository and Model
  • Controller and routes
  • Migration and seeder
  • Tests (Feature and Unit)
  • Permission provider (stateful modules)

After generation:

  1. Customize DTOs and validation rules
  2. Update migration schema
  3. Configure permissions in config/module_rbac.php
  4. Run make module-migrate MODULE=YourModule
  5. Run make module-test MODULE=YourModule

Git Hooks

Pre-commit hooks enforce code quality automatically before each commit:

  • Laravel Pint - Enforces PSR-12 code style
  • Deptrac - Validates module boundaries
  • PHPStan - Static analysis (level 5)

Installation:

make install-hooks

The hooks are stored in .githooks/ and symlinked to .git/hooks/. If any check fails, the commit is blocked.

Bypass (not recommended):

git commit --no-verify

See .githooks/README.md for more details.

Documentation

  • CLAUDE.md - Complete project documentation (architecture, patterns, commands)
  • CONTRIBUTING.md - Module system rules and conventions
  • API Documentation - Auto-generated, view at /docs endpoint

Technology Stack

  • Framework: Laravel 12 (PHP 8.2+)
  • Database: MariaDB 11
  • Cache/Queues: Redis
  • Authentication: JWT (stateless)
  • Frontend: Tailwind CSS 4, Vite
  • Testing: PHPUnit with SQLite
  • API Docs: Scribe
  • Architecture Enforcement: Deptrac, PHPStan

Development Workflow

  1. Understand the architecture - Read CONTRIBUTING.md
  2. Explore existing modules - Look at Health, Tenant, or Block for patterns
  3. Create or modify modules - Use make module or follow existing patterns
  4. Test your changes - Write tests, run make test
  5. Verify quality - Run make analyze before committing

Architecture Enforcement

Deptrac enforces module boundaries:

  • Modules can ONLY access other modules via Services
  • No direct access to Repositories, Models, or Infrastructure
  • Layered architecture: Domain → Application → Infrastructure

PHPStan ensures type safety and catches bugs before runtime.

Run make analyze to verify both.

Important Notes

  • This is NOT standard Laravel - Strict module boundaries enforced
  • All authentication is stateless JWT (no sessions)
  • Services are the public API for modules
  • Always return DTOs from Services, never models
  • Use ULIDs for primary keys (via HasUlids trait)
  • API-only - No Blade views or traditional forms (except Dashboard module for internal monitoring)

License

Proprietary - All rights reserved

System Overview

Modules
24
Database Tables
55
Routes
343
Tests
99
Pending Jobs
0
Failed Jobs
1
Custom Commands
16

Detailed Statistics

Table Row Counts

Table Rows
permissions 272
quiz_question_instances 264
ad_impressions 229
attempt_slot_history 229
role_permissions 224
attempt_responses 186
questions_history 94
ad_statistics 93
content_history 74
quiz_slots 70
migrations 67
quiz_sections 60
questions 59
quiz_versions 54
media 52
attempts 44
identities 42
notifications 42
ads_history 35
certificates 22
ad_placements 18
ads 18
roles 16
contents 14
quizzes 14
certificate_definitions 12
placements 8
role_user 7
tenants 6
ad_clicks 5
tags 4
tag_contexts 3
failed_jobs 1
cache 0
cache_locks 0
content_progress 0
course_activities 0
course_activity_progress 0
course_enrollments 0
courses 0
manual_grading_assignments 0
media_aliases 0
media_conversions 0
moodle_import_mappings 0
moodle_import_runs 0
notification_preferences 0
tag_assignments 0
telescope_entries 0
telescope_entries_tags 0
telescope_monitoring 0

Routes by Module

Quiz 34
Core 33
Content 32
Course 24
Ads 23
User 21
Question 19
Media 18
Rbac 18
Certificate 16
Notification 13
Attempt 11
Evaluation 11
Tag 11
Tenant 9
Block 8
Pdf 7
Verification 7
Transfer 7
Identity 6
Statistics 5
Metrics 4
Dashboard 3
MoodleImport 2
Health 1

Tests by Module

Evaluation 12
Block 11
Quiz 9
Rbac 7
Identity 6
Certificate 5
Tenant 5
Content 4
Course 4
MoodleImport 4
Question 4
User 4
Ads 3
Attempt 3
Media 3
Notification 3
Tag 3
Transfer 3
Dashboard 1
Health 1
Metrics 1
Pdf 1
Statistics 1
Verification 1