juststeveking / kit
Opinionated Laravel API starter kit: token authentication, standards-compliant HTTP via api-toolbox, and contract-tested OpenAPI docs.
Requires
- php: ^8.5
- juststeveking/api-toolbox: ^0.3.1
- laravel/framework: ^13.30
- laravel/octane: ^2.21
- laravel/sanctum: ^4.3
- laravel/tinker: ^3.0
- readalizer/readalizer: ^1.0
Requires (Dev)
- driftingly/rector-laravel: *
- fakerphp/faker: ^1.23
- knuckleswtf/scribe: ^5.11
- larastan/larastan: ^3.9
- laravel/boost: ^2.4
- laravel/pail: ^1.2.5
- laravel/pint: ^1.27
- laravel/vet: ^0.2
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- parsedown/parsedown: 1.7.4
- pestphp/pest: ^4.4
- pestphp/pest-plugin-laravel: ^4.1
- pestphp/pest-plugin-type-coverage: ^4.0
- phpstan/phpstan: ^2.1
- rector/rector: *
- roave/security-advisories: dev-latest
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-docs/split-readme
- dev-fix/ship-ci-workflows
- dev-feature/webhook-allowed-rate
- dev-chore/rector
- dev-feature/webhook-callback
- dev-feature/cloudevents
- dev-feature/webhooks
- dev-chore/require-api-toolbox-0.3.1
- dev-chore/api-toolbox-0.3.1
- dev-improvements
This package is auto-updated.
Last update: 2026-10-20 15:05:13 UTC
README
A Laravel starter kit for token-authenticated APIs, built on the published HTTP standards. Every
error is RFC 9457 problem details, creating things takes an Idempotency-Key, lists page through Link
headers, webhooks go out as signed CloudEvents, and the OpenAPI spec is checked against the running
API on every build. It ships with a production image on Octane and FrankenPHP.
The standards themselves come from api-toolbox. Kit is the application around it, with the conventions already in place and a CI pipeline that fails when something breaks them.
Install
laravel new my-api --using=juststeveking/kit
cd my-api
The installer sets up .env, the key and a migrated SQLite database. Emails are queued, so run a
worker beside the API:
php artisan serve php artisan queue:work
Routes live under http://127.0.0.1:8000/v1/, with no /api prefix, and mail goes to the log
until you configure a mailer. Registering a user is a quick check that it all works:
curl -X POST http://127.0.0.1:8000/v1/auth/register \ -H "Content-Type: application/json" \ -d '{"name": "Jane Doe", "email": "jane@example.com", "password": "Password123!", "device_name": "cli"}'
Getting started goes from here to an authenticated request.
What is in it
- PHP 8.5, Laravel 13, Sanctum, Pest, PHPStan at level 10, Pint with the PER preset, and Rector
- Invokable controllers, Form Requests, readonly payload objects and plain JSON resources
php artisan make:endpoint, which scaffolds an endpoint the way the rest of Kit is built- Every error as
application/problem+json, typed from the apiguide.dev catalogue, with adetailtranslated fromAccept-Language Idempotency-Key,DeprecationandSunset,Linkheader pagination, ETags, request IDs and W3C trace context, and an API catalog at/.well-known/api-catalog- Outbound webhooks that consumers subscribe to themselves: CloudEvents, signed with RFC 9421, retried on a published schedule, and recorded attempt by attempt
- OpenAPI from Scribe attributes, contract tests that compare the spec with real responses, and a legible gate that keeps it readable by agents
- A Dockerfile for Octane on FrankenPHP, built and booted in CI on every push
- Laravel Vet auditing every dependency, and a weekly update PR
- An
AGENTS.mdthat tells coding agents how to build on Kit without undoing it
Documentation
| Page | What it covers |
|---|---|
| Getting started | Installing, running locally, your first requests, where things live |
| Authentication | Session tokens, API keys, abilities, verification and password reset |
| Building endpoints | make:endpoint and each piece it writes |
| Errors | Problem details, and raising errors of your own |
| HTTP standards | Idempotency, pagination, ETags, deprecation, request IDs, media types |
| Localization | Accept-Language, translated errors, adding a language |
| Webhooks | What subscribers receive, and adding your own events |
| API documentation | Scribe, the OpenAPI spec, contract tests and legible |
| Security | Transport, CORS, trusted hosts, rate limits and audit logging |
| Deployment | The Docker image, workers, the scheduler and Octane |
| Quality and CI | The checks, the workflows, and reviewing dependencies with Vet |
| Configuration | Every environment variable Kit adds |
License
MIT