mmi / mmi-standard
MMi Framework project - standard edition
Package info
github.com/milejko/mmi-standard
Language:Makefile
Type:project
pkg:composer/mmi/mmi-standard
2.0.0
2026-05-11 15:30 UTC
Requires
- mmi/mmi: ^5.0
This package is auto-updated.
Last update: 2026-05-11 15:30:56 UTC
README
A skeleton application built on the MMi Framework (v5+).
Requirements
| Tool | Version |
|---|---|
| PHP | 8.4+ |
| Composer | 2.x |
| Docker (optional) | 20+ |
Quick start
Option A — PHP built-in server
composer install
make up # starts php -S 127.0.0.1:8080
Open http://127.0.0.1:8080.
Option B — Docker (Apache)
make docker-up # builds image, runs container, opens bash inside it
The container maps port 8080 → 80 and mounts the project root as a volume, so code changes are reflected immediately without rebuilding.
Environment configuration
Copy .env to .env.local and adjust values. .env.local is git-ignored.
| Variable | Default | Description |
|---|---|---|
APP_DEBUG_ENABLED |
1 |
Enable debug output |
APP_VIEW_CDN |
(empty) | CDN prefix for assets |
APP_BASE_URL |
(empty) | Base URL override |
CACHE_SYSTEM_ENABLED |
1 |
Internal framework cache |
CACHE_PUBLIC_ENABLED |
1 |
Public HTTP cache |
DB_HOST |
localhost |
Database host |
DB_USER |
(empty) | Database user |
DB_NAME |
test |
Database name |
DB_PASSWORD |
(empty) | Database password |
Project structure
src/
App/
AppRouterConfig.php # Route definitions
di.app.php # DI container config
Resource/
template/
layout.tpl # Global HTML layout
Sample/
HelloController.php # Example controller
resource/
template/
hello/
index.tpl # View for HelloController::indexAction
etc/
apache2/
sites-enabled/
000-default.conf # Apache vhost (used in Docker)
web/ # Document root (generated by composer install, git-ignored)
var/ # Cache, logs, sessions (git-ignored)
Adding a module
- Create a controller in
src/<ModuleName>/extendingMmi\Mvc\Controller:
namespace MyModule; use Mmi\Mvc\Controller; class ArticleController extends Controller { public function indexAction(): void {} }
-
Add a template at
src/<ModuleName>/resource/template/<controller>/<action>.tpl. -
Register a route in
AppRouterConfig.php:
$this->setRoute('my-module', 'articles', ['module' => 'my-module'], ['controller' => 'article', 'action' => 'index']);
DI container
src/App/di.app.php returns a PHP-DI array. Override or add services there:
return [ RouterConfig::class => create(AppRouterConfig::class), MyService::class => create(MyServiceImpl::class), ];
Make targets
| Target | Description |
|---|---|
make up (default) |
Start PHP built-in server on port 8080 |
make docker-up |
Build image, start container, open interactive bash |
make docker-down |
Stop and remove the container |