modufolio / appkit
A lean PHP framework built on Symfony components and Doctrine ORM, with hand-wired DI, attribute routing, and first-class Inertia.js support
Requires
- php: ^8.2
- ext-curl: *
- ext-dom: *
- ext-exif: *
- ext-fileinfo: *
- ext-gd: *
- ext-intl: *
- ext-libxml: *
- ext-pdo: *
- ext-simplexml: *
- ext-sqlite3: *
- ext-zip: *
- claviska/simpleimage: ^4.0
- doctrine/dbal: ^4
- doctrine/migrations: ^3.6
- doctrine/orm: ^3
- endroid/qr-code: 6.0.9
- firebase/php-jwt: ^7.0
- laminas/laminas-escaper: ^2.18
- modufolio/http: ^0.1
- nikic/php-parser: ^5.6
- psr/http-factory: ^1.0
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: 3.0
- spomky-labs/otphp: ^11.3
- symfony/cache: ^7.4
- symfony/clock: ^7.4
- symfony/config: ^7.4
- symfony/console: ^7.4
- symfony/filesystem: ^7.4
- symfony/http-foundation: ^7.4
- symfony/password-hasher: ^7.4
- symfony/property-access: ^7.4
- symfony/property-info: ^7.4
- symfony/routing: ^7.4
- symfony/serializer: ^7.4
- symfony/uid: ^7.4
- symfony/validator: ^7.4
- symfony/var-exporter: ^7.4
- symfony/yaml: ^7.4
- willdurand/negotiation: ^3.1
Requires (Dev)
- doctrine/data-fixtures: ^2.2
- fakerphp/faker: ^1.24
- modufolio/json-api: ^0.1
- phpunit/phpunit: ^10.5 || ^11
This package is not auto-updated.
Last update: 2026-06-05 15:30:08 UTC
README
A small, hand-wired PHP application kernel built on Symfony components, Doctrine ORM, Firebase JWT, and a strict-typed PSR-7 fork. Designed for security-conscious SaaS applications that want Symfony-grade components without Symfony's full kernel, bundle system, and compile step.
Why it exists
- Slim is too thin. No Doctrine, no validation, no security primitives — the consumer wires everything.
- Symfony is too heavy. A compiled DI container, an event dispatcher, bundles, MakerBundle, recipes. Excellent for large apps; more than most SaaS workloads need.
- Laravel is opinionated and non-Symfony. Facades, ActiveRecord, and a separate ecosystem.
- Appkit sits in between. Symfony components plus Doctrine plus a thin abstract kernel, with a hand-compiled container so the file you read is the resolution path that runs.
What it solves
- Fast boot. No DI compile step, no cache invalidation. Config files are
loaded with
require; OPcache handles the rest. - Transparent control flow. No event dispatcher by design. Reading
handleAuthentication()top-to-bottom shows exactly what runs. - RoadRunner-aware. Every stateful service implements
ResetInterface; the kernel rebuildsApplicationStateper request. - Security hardening already wired. CSRF rotation on login, session-fixation defence, token unserialize allowlist, password timing-parity dummy, brute-force protection, generic 401 responses.
- Strict typing. PHP 8.2+,
declare(strict_types=1)throughout. The bundled PSR-7 implementation is a strict-typed fork ofnyholm/psr7.
Quick start
composer create-project modufolio/appkit-skeleton my-app
cd my-app
composer start
The skeleton lives in its own repository: modufolio/appkit-skeleton.
A minimal controller
<?php declare(strict_types=1); namespace App\Controller; use Modufolio\Appkit\Core\AbstractController; use Modufolio\Psr7\Http\Response; use Psr\Http\Message\ResponseInterface; use Symfony\Component\Routing\Attribute\Route; final class HelloController extends AbstractController { #[Route('/hello/{name}', methods: ['GET'])] public function show(string $name): ResponseInterface { return Response::json(['message' => "Hello, {$name}"]); } }
Documentation
Full guides under docs/:
- Getting started — install, configure, and run your first app
- Kernel — request lifecycle, service container, boot
- Routing — routes, parameters, access control
- Controllers — controllers and parameter attributes
- Dependency injection — wiring services with config files
- Templates — layouts, snippets, sections, asset helpers
- Security — firewalls, access control, CSRF, roles
- Authenticators — form login, JWT, OAuth 2.1, 2FA, brute-force
- Database — Doctrine ORM, QueryBuilder, pagination, soft delete
- Forms — validation,
ValidationResult, payload mapping - Exception handling — turning exceptions into HTTP responses
- File uploads — validating and storing uploaded files
- Image processing — Darkroom, Dimensions, DiskManager
- Console — built-in commands,
make:entity, writing your own - Toolkit — array, file, string, and directory utilities
- Testing — PHPUnit, EntityFactory, static analysis
- Deployment — Nginx/Caddy, permissions, RoadRunner, databases
- Configuration — environment variables and config reference
Start with the introduction for the architecture overview and the design philosophy the rest of the documentation assumes.
Requirements
- PHP 8.2 or later
- Composer
- Extensions:
curl,dom,exif,fileinfo,gd,intl,libxml,pdo,simplexml,sqlite3,zip
See composer.json for the canonical dependency list.
License
MIT. See LICENSE.