Mintfit

MintfitV2 Dashboard

System Overview & Monitoring

Development

System Health

Overall Status: Healthy

Last checked: 2026-03-07T15:28:51+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
5.53 MB
Active Connections
2

Queue Metrics

Pending Jobs
0
Failed Jobs
0
Worker Status
Unknown

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
21
Database Tables
51
Routes
323
Tests
89
Pending Jobs
0
Failed Jobs
0
Custom Commands
15

Detailed Statistics

Table Row Counts

Table Rows
ad_impressions 311
permissions 198
role_permissions 162
quiz_question_instances 105
transfer_entity_mappings 85
attempt_responses 79
migrations 54
ad_statistics 51
questions_history 44
content_history 41
quiz_sections 31
quiz_slots 31
ads_history 27
questions 27
quiz_versions 26
media 24
attempts 22
users 19
notifications 18
verification_attempts 18
identities 16
quizzes 13
contents 12
roles 12
attempt_slot_history 10
ad_placements 9
ads 9
placements 8
role_user 6
ad_clicks 5
notification_preferences 4
tags 4
tag_contexts 3
tenants 3
cache 0
cache_locks 0
content_progress 0
course_activities 0
course_activity_progress 0
course_certificates 0
course_enrollments 0
courses 0
manual_grading_assignments 0
media_aliases 0
media_conversions 0
tag_assignments 0
telescope_entries 0
telescope_entries_tags 0
telescope_monitoring 0
usage_events 0

Routes by Module

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

Tests by Module

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