A PHP application framework

Build with clarity.
Ship with PHPenalva.

A structured foundation for PHP applications, from domain model to database.

PHPenalva · 2.1.0PHP · 8.0+
Get started Read the guides

Framework features

Clear boundaries. Practical tools.

Domain-driven design

Bounded contexts separate domain, application, and infrastructure responsibilities.

Secure authentication

Session authentication, CSRF validation, and guarded mutations.

Framework console

Inspect routes, logs, runtime readiness, and migrations from the CLI.

Debug panel

Inspect request and SQL timings when application debug mode is enabled.

Per-driver migrations

Driver-aware schema definitions for SQLite, MySQL, PostgreSQL, and SQL Server.

Automated tests

Unit and HTTP contract tests cover domain behavior and application responses.

Quickstart

Install, migrate, serve.

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

Web pages and HTTP routes

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

Guides for the codebase