Download the PHP package trunk/skeleton without Composer
On this page you can find all versions of the php package trunk/skeleton. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download trunk/skeleton
More information about trunk/skeleton
Files in trunk/skeleton
Package skeleton
Short Description A skeleton API application using the Trunk async PHP framework
License MIT
Informations about the package skeleton
Trunk Skeleton
A starter API application built on the Trunk async PHP framework.
Requirements
- PHP 8.1+
- Composer
- MySQL or PostgreSQL
Setup
This pulls the skeleton straight from Packagist, installs dependencies, and copies .env.example to .env with a fresh, randomly-generated JWT_SECRET already in place - no manual key:generate step needed.
Edit .env to set your database credentials, then:
Setting up from a clone instead
The API is now listening on http://127.0.0.1:8080 (configurable via APP_PORT).
What's included
This skeleton isn't a blank slate - it's a working, end-to-end register/login example wired against a real users table:
| Route | Description |
|---|---|
GET /health |
Built-in health check (always on, not user-defined). |
POST /register |
Creates a user (validated via RegisterRequest, password hashed with password_hash()) and returns a JWT. |
POST /login |
Verifies email/password against the users table and returns a JWT. |
GET /me |
Auth-protected - returns the authenticated user, resolved from the JWT via AuthMiddleware. |
Try it:
For a full walkthrough of adding your own resources (migrations, entities, FormRequests, controllers, relationships) on top of this, see the framework's Tutorial docs.
Project layout
Testing
See ../trunk/docs/guide/testing.md for the patterns used here (pure validation tests, a real-dependency controller test, and a fully-mocked async controller test).
Learn more
Full framework documentation: ../trunk/docs.