Framework
Starter repository designed to help you leverage Fusio as a professional PHP framework foundation.
Your API configuration as code
Usually you configure operations, actions, schemas and scopes through the Fusio backend. The Framework starter repository turns this around: all configuration lives in files under version control, and your business logic lives in plain PHP classes. This means you can always rebuild a fully configured Fusio instance from your repository.
The deploy command reads the configuration files from resources/
and submits them to the internal REST API, just like the backend would. The project ships with a complete
todo resource including CRUD endpoints, events and a cronjob, which you can use as reference
implementation for your own resources.
# install the dependencies composer install # set FUSIO_CONNECTION in .env, then install the tables php bin/fusio migrations:migrate # create an administrator and login php bin/fusio adduser --role=1 php bin/fusio login # apply resources/* to the instance php bin/fusio deploy # try the API without a web server php bin/fusio serve GET /todo
Why use Fusio as a framework?
Get the full power of an API management platform while keeping the developer workflow you already know from classic PHP frameworks.
Version controlled
Operations, scopes, roles, events and cronjobs are plain YAML and PHP files, so every change is reviewable and reproducible.
Type-safe models
Describe your request and response models with TypeSchema and generate the DTOs and table classes automatically.
Clean architecture
A clear separation between thin actions, views for read requests and services for your business logic.
Database migrations
Manage your schema with Doctrine migrations on MySQL/MariaDB, PostgreSQL or SQLite.
SDK generation
Generate type-safe client SDKs for TypeScript, PHP, Python, Java, Go and C# directly from your API.
Docker ready
Includes a Dockerfile and a GitHub action which builds an image on every push, ready to run on Plant or any Docker platform.
How a resource is built
Every endpoint is made of a few small parts. The included todo resource shows each of them.
- 01Schema
The TypeSchema definition of your request and response models in
resources/typeschema.json. - 02Migration
A Doctrine migration in
src/Migrationswhich creates the database table. - 03Table
Generated type-safe table classes in
src/Table. - 04View & Service
Views build the JSON responses, services contain the business logic and dispatch events.
- 05Action
The thin entry point of an operation which calls the view or the service.
- 06Operation, Scopes & Roles
The route, HTTP method, models and action, and which users are allowed to call it.
- 07Deploy
php bin/fusio deployapplies everything to your instance.
Built for AI-assisted development
The repository ships with Claude Code skills and a
CLAUDE.md file which describes the project conventions. Run one of the skills or simply describe what you want,
i.e. "add a product resource".
| /fusio-setup | First-time setup of the database, API metadata, admin user and the first deploy |
| /fusio-resource | Adds a complete REST resource end to end, from schema to deploy |
| /fusio-migration | Creates or changes tables and regenerates the table classes |
| /fusio-cronjob | Adds a periodic background job |
| /fusio-deploy | Applies resources/* to the Fusio instance |
| /fusio-sdk | Generates a type-safe client SDK |
872762ea7adb24a64cd010ae6414f787af8b89e0