The application skeleton. What composer create-project libxa/libxa installs,
and what libxa new installs on your behalf.
Installing
composer create-project libxa/libxa my-app
cd my-app
php libxa migrate
php libxa serve
What you get
- The directory layout, with application code under
src/app/and the web root atsrc/public/ - Session-based authentication: register, login, logout and a protected page, with a test suite that drives all four through the real HTTP kernel
- Vite and Tailwind v4, wired to the framework's manifest reader
- The Apache rules that make routing work on a real server
DEPLOYMENT.md, covering Apache, nginx, Caddy and shared hosting
The deployment rule
Point the document root at src/public/, and send anything that is not a
real file to index.php.
That deserves its own heading because getting it wrong produces a very specific
symptom: the home page loads and every other route returns 404. Until 0.4.0 the
kit shipped no .htaccess at all, so that was every deployment of it.
It does not reproduce locally. php libxa serve passes
src/public/router.php to PHP's built-in server, and that shim hands any path
which is not a real file to index.php. A real server needs the rule written
out.
Testing
php vendor/bin/phpunit
The suite boots the real application, migrates a throwaway SQLite database per test and drives requests through the actual HTTP kernel, so a green run means register, login, protected page and logout genuinely work.
DeploymentConfigTest asserts the rewrite rules still ship and still say what
they need to. The original bug was those files not existing, so CI fails rather
than a deployment.
Before going live
composer install --no-dev --optimize-autoloader
npm ci && npm run build
In .env: APP_ENV=production, APP_DEBUG=false, and a real APP_KEY.
APP_ENV also decides where @vite() points. Left on local, asset URLs go to
the dev server on port 5173 and every page renders with no stylesheet at all,
with nothing logging an error.