Domain-driven design
Bounded contexts separate domain, application, and infrastructure responsibilities.
A PHP application framework
A structured foundation for PHP applications, from domain model to database.
Framework features
Bounded contexts separate domain, application, and infrastructure responsibilities.
Session authentication, CSRF validation, and guarded mutations.
Inspect routes, logs, runtime readiness, and migrations from the CLI.
Inspect request and SQL timings when application debug mode is enabled.
Driver-aware schema definitions for SQLite, MySQL, PostgreSQL, and SQL Server.
Unit and HTTP contract tests cover domain behavior and application responses.
Quickstart
Start a local PHP server and inspect the first JSON response.
Full quickstart →git clone https://github.com/yanpenalva/phpenalva.git
cd phpenalva
cp .env.example .env
composer install
rm -f database/database.sqlite
php bin/phpenalva migrate
php -S 127.0.0.1:8000 -t public
curl -s http://127.0.0.1:8000/api
Showcase
The application includes a shared page layout and routes for posts and contact. The landing route is /; /posts requires authentication, /post/{id} displays an individual post, and /contact renders the contact page. /debug is available only when APP_DEBUG=true.
Documentation