Bare-bones PHP mini-framework with an admin shell and WordPress-style hooks.
- PHP 8.1+
- Database: MySQL 5.7+ / MariaDB 10.3+ or SQLite 3 (choose one at install / in
.env) - Extensions:
pdo_mysqland/orpdo_sqlite(for the driver you use), plussodium,openssl,mbstring,curl,json - Apache (or Nginx) with document root pointed at
public/
- Copy this project to your server (or clone locally).
- Run
composer installifcore/vendoris missing. - Point the web server document root at
public/. - Visit the site → installer at
/install/(writes.env), or copy.env.example→.envby hand. - Create the admin account (2FA is available later under Account).
- Sign in at
/admin/login.
Public home page: Welcome to DLTN Framework.
public/ # web root (index.php)
core/ # framework (PHP, templates, assets, migrations)
content/ # operator zone (extensions, uploads, cache, avatars)
config/ # committed PHP config (reads env())
.env # secrets (generated by installer; not in git)
.env.example
docs/ # architecture + hooks + extending guides
AGENTS.md # entrypoint for AI coding agents
Laravel-style hybrid:
.env— secrets and environment-specific values (APP_KEY, DB_, SMTP_, …)config/*.php— structure and defaults; callenv('KEY', default)
Database (config/database.php):
DB_CONNECTION—mysqlorsqliteDB_HOST/DB_PORT/DB_DATABASE/DB_USERNAME/DB_PASSWORD(MySQL)- For SQLite, set
DB_CONNECTION=sqliteandDB_DATABASEto an absolute path undercontent/database/
App name and SMTP live in .env / config/ (not admin UI):
APP_NAMESMTP_*(host, port, username, password, encryption, from address/name)
Drop a folder in content/extensions/{slug}/ with a bootstrap file and headers:
<?php
/**
* Extension Name: Hello
* Description: Demo sidebar link.
* Version: 1.0.0
*/
add_filter('admin_menu', function (array $nav): array {
$nav[] = [
'link' => [
'href' => '/admin/hello',
'label' => 'Hello',
'cap' => 'view_dashboard',
'icon' => 'hand', // Lucide icon name
],
];
return $nav;
});Keep templates, PHP (src/ → Dltn\Ext\{Studly}\), assets (/ext/{slug}/...), and database migrations inside that folder. After adding schema, run php bin/migrate.php. Full recipes: docs/EXTENDING.md. Hook catalog: docs/HOOKS.md.
php bin/migrate.php # apply pending migrations
php bin/cron.php # cron hook + queue drain + rate-limit prune
php bin/queue.php # process jobs only
composer test # PHPUnitNginx sample: docs/nginx.conf.example.
Start at AGENTS.md, then:
| Doc | Contents |
|---|---|
| docs/ARCHITECTURE.md | Request lifecycle, directories, container, schema |
| docs/HOOKS.md | Every action/filter, args, call sites |
| docs/EXTENDING.md | Add admin pages, routes, mail, migrations |
| docs/CONVENTIONS.md | Naming, where code belongs, templates |
MIT © Dalton Sutton.