A modern PHP 8.4+ MVC framework with attribute-based routing, PHP-DI, and Twig. Runs in Docker (PHP 8.4-FPM, Nginx, MariaDB 11, Redis 7).
Work in Progress: APIs and internals may change. This project will eventually serve as a backend to my personal website.
git clone https://github.com/whleucka/echo.git && cd echo
cp .env.example .env # configure credentials
docker-compose up -d --build # php, nginx, db, redis
./bin/php composer install # enter php container
./echo migrate:fresh # migrate database
./echo storage:fix # fix permissions on storage and cache directoriesOpen http://localhost.
Development (default, APP_DEBUG=true):
- OPcache disabled: code changes take effect instantly, no container restarts
- Xdebug enabled (port 9003, trigger mode with
XDEBUG_SESSIONcookie or query param) - Verbose errors displayed
Production (docker-compose.prod.yml):
- OPcache enabled with aggressive caching
- No Xdebug
- Errors logged only
# Production deployment
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build| Topic | Description |
|---|---|
| Routing | Attribute routing, groups, subdomain routing, middleware |
| Database / ORM | Model (CRUD, relationships, aggregates) and QueryBuilder |
| Admin Modules | ModuleController CRUD: tables, forms, JOINs, filters, actions, permissions |
| Events | Event system: creating events/listeners, dispatching, built-in events |
| Helpers | All global helper functions |
| Mailable API, send/queue | |
| Caching | Redis and file-based caching |
| Console | All CLI commands |
| Testing | PHPUnit setup and usage |
docker-compose exec -it php bash # PHP container
docker-compose exec -it db mariadb -u root -p # database CLI
docker-compose exec -it redis redis-cli # Redis CLIapp/ # Application code (App\ namespace)
Http/Controllers/ # Route controllers (auto-discovered)
Models/ # Active Record models
Events/ # Application events
Listeners/ # Event listeners
Helpers/ # Global helper functions
Services/ # Business logic services
Providers/ # Service providers
src/Framework/ # Framework internals (Echo\ namespace)
config/ # PHP config files
templates/ # Twig templates
migrations/ # Database migrations
tests/ # PHPUnit tests
docs/ # Documentation
bin/console # CLI entry point
public/index.php # Web entry point
MIT: see LICENSE.