TrueFramework

A small, opinionated PHP framework for building real applications fast. Routing, views, database access, forms, and email — bundled, autoloaded, and out of your way.

What's in the box

Pulling in the truecastdesign/truefw scaffold gives you a working project with three libraries already wired up:

  • true — the core. Application bootstrap, router, request/response, and a PHP-based view engine.
  • hopper — a thin PDO wrapper for MySQL and SQLite with a get($sql, $params, $type) shorthand for the patterns you write a hundred times a project.
  • welder — a form builder with validation, anti-spam, and one-line render output.

Everything is autoloaded by Composer. Boot a fresh project and you can write a route handler that talks to the database and renders a template without installing anything else.

Bring your own. The bundled libraries are the path of least resistance — they're not lock-in. You can drop in Doctrine, Eloquent, Symfony Forms, or anything else for the bits you'd rather control. See Use a different DB library and Use a different form library.

Start here

Philosophy

TrueFramework is built around three rules:

  1. Plain PHP, plain files. Controllers are flat .php files. Views are .phtml. There's no compile step, no service container DSL, no annotations.
  2. One way to do common things. The router, request, response, and view live on one $App object. You don't shop for "the right" routing library — there's one already there.
  3. Pluggable where it matters. Database and forms are libraries, not pillars. Use the bundled ones until they don't fit, then swap.