Lightweight MVC framework for rapid prototyping - A librarian package built on PHP League ecosystem.
- PHP 8.2+
composer installphp -S 0.0.0.0:1213 -t publicsrc/
├── Application.php # Entry point, DI container + router config
├── AbstractController.php # Base controller with render/json helpers
├── ControllerInterface.php # Contract for controllers
├── Controller/
│ └── HomeController.php # Concrete controllers extend AbstractController
├── Http/
│ └── RequestHandler.php # Handles PSR-7 request/response operations
├── Model/
│ ├── AbstractModel.php # In-memory CRUD model
│ └── ModelInterface.php
├── ServiceProvider.php # Dependency injection container configuration
└── View/
├── PlatesView.php # League Plates template engine wrapper
└── ViewInterface.php
- Controller: Handles HTTP requests
- Model: Data layer (abstract, implement as needed)
- View: Template rendering via Plates
- ServiceProvider: Configures dependency injection container
- RequestHandler: PSR-7 request/response handling utilities
composer test # Run PHPUnit tests
composer analyse # Run PHPStan static analysisRun all tests:
composer testRun a single test class:
vendor/bin/phpunit tests/Unit/ApplicationTest.phpRun a single test method:
vendor/bin/phpunit --filter testCreateReturnsDataWithIdRun tests matching a pattern:
vendor/bin/phpunit --filter AbstractModelRun PHPStan (level 6):
composer analyse
# or
vendor/bin/phpstan analyseNote: PHPStan runs against src/ only. Tests are excluded from analysis.
For detailed coding standards, architecture patterns, and development guidelines, refer to AGENTS.md.