assegaiphp / starter
The official starter application for AssegaiPHP.
Requires
- php: ^8.4
- ext-curl: *
- ext-pdo: *
- assegaiphp/core: ~0.11.1
- vlucas/phpdotenv: ^5.4
Requires (Dev)
- pestphp/pest: ^4.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-16 16:24:07 UTC
README
AssegaiPHP Starter
The official starter application for AssegaiPHP. It provides the maintained project layout, configuration defaults and public-asset routing.
Starter 0.11.1 requires Core ~0.11.1 and intentionally does not ship a composer.lock. Creating or installing a project resolves a compatible 0.11.x framework release, beginning with the coordinated 0.11.1 correction, and writes a lock file owned by that application. Core 0.11.0 no longer satisfies this starter's minimum requirement.
It gives you a working Assegai app with:
- a root module in
src/AppModule.php - a controller and service in
src/ - project settings in
assegai.json - shared app config in
config/default.php - authentication and session policy in
config/auth.php - sensitive overrides in
config/secure.php
Requirements
- PHP 8.4+
- Composer 2.x
Getting Started
Create a new project from this starter:
composer create-project assegaiphp/starter my-app
cd my-app
If you cloned the repository instead, install its dependencies:
composer install
Installation creates local .env and config/secure.php files from their tracked examples without overwriting existing local configuration.
Generate the application key with a Console release that provides key:generate:
assegai key:generate
This initializes a missing, empty, or scaffold-placeholder APP_SECRET_KEY and can also create .env from .env.example when needed. Commit the example with placeholders and keep .env private.
To rotate an existing key, run assegai key:generate and confirm, or explicitly pass --force. Rotation may invalidate tokens and encrypted data using the old key. Restart long-running processes afterward and share the same key across instances of one environment. Do not regenerate keys on every install, update, or deployment.
Then start the app:
assegai serve
You can also use the project Composer script if you prefer:
composer run start
Useful Commands
Run the test suite:
assegai test
Generate a new feature:
assegai generate resource movies
Configure a database:
assegai database:configure cinema_db
Add ORM support when you need the data layer:
assegai add orm
Runtime Options
The default local runtime uses PHP's built-in server.
If you want to try the long-lived runtime path, you can use OpenSwoole:
assegai serve --runtime=openswoole
The OpenSwoole path is currently experimental. Treat it as an opt-in runtime for careful testing, not a required switch for every app.
Project Layout
src/AppModule.php: the root module for your appsrc/AppController.php: a starter controllersrc/AppService.php: a starter serviceconfig/default.php: shared app configurationconfig/auth.php: authentication redirect policy and framework-owned session settingsconfig/secure.php.example: tracked template for local secrets and database credentialsconfig/secure.php: ignored local overrides created during setup; it takes precedence over the lower-priority config files when presentassegai.json: Assegai project settings, scripts, runtime config, and CLI behaviorindex.php: front controller and safe public-asset router for the PHP runtimebootstrap.php: runtime-neutral application bootstrap
Learn More
- Guide: https://assegaiphp.com/guide
- Support: https://assegaiphp.com/support
- Website: https://assegaiphp.com
Release Maintenance
Starter participates in the coordinated framework release inventory. CI checks its manifest through the pinned shared package policy before running the PHP jobs. The tracked pre-push hook uses the same reader and release data with explicitly selected local checkouts. Whole-release readiness additionally requires the reviewed inventory and generated owner evidence. See the 0.11.1 release and upgrade notes for hook setup, verification stages and required evidence.
License
This project is released under the MIT License.