assegaiphp / core
A progressive PHP framework for building efficient and scalable server-side applications.
Requires
- php: >=8.3
- ext-fileinfo: *
- assegaiphp/attributes: ^1.0
- assegaiphp/common: ^0.4
- assegaiphp/forms: ^0.4.5
- assegaiphp/util: ^0.4.2
- assegaiphp/validation: ^0.3.1
- erusev/parsedown: ^1.7
- filp/whoops: ^2.15
- jimmiw/php-time-ago: ^3.3
- psr/log: ^3.0
- symfony/console: ^7.1
- twig/markdown-extra: ^3.10
- twig/twig: ^3.10
- vlucas/phpdotenv: ^5.4
Requires (Dev)
- dev-main
- 0.7.3
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.4
- 0.6.3
- 0.6.2
- 0.6.1
- 0.5.38
- 0.5.37
- 0.5.36
- 0.5.35
- 0.5.34
- 0.5.33
- 0.5.32
- 0.5.31
- 0.5.30
- 0.5.29
- 0.5.28
- 0.5.27
- 0.5.26
- 0.5.25
- 0.5.24
- 0.5.23
- 0.5.22
- 0.5.21
- 0.5.20
- 0.5.19
- 0.5.18
- 0.5.17
- 0.5.16
- 0.5.15
- 0.5.14
- 0.5.13
- 0.5.12
- 0.5.11
- 0.5.10
- 0.5.9
- 0.5.8
- 0.5.7
- 0.5.6
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.12
- 0.4.11
- 0.4.10
- 0.4.9
- 0.4.8
- 0.4.7
- 0.4.6
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.11
- 0.3.10
- 0.3.9
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-develop
- dev-amasiye-patch-1
- dev-main-abandoned
This package is auto-updated.
Last update: 2026-03-18 00:23:03 UTC
README
A progressive PHP framework for building effecient and scalable server-side applications.
Description
Assegai is a framework for building efficient, scalable PHP server-side applications. It uses modern PHP (~ PHP 8.1) and combines elements of OOP (Object Oriented Programming) and FP (Functional Programming).
Philosophy
In recent years, PHP has gained a lot of features out the box that make it a really compelling language for developers. Assegai aims to take advantage of these wonderful features and provide an application architecture which allows for the effortless creation of highly testable, scalable, loosely coupled and easily maintainable applications. The architecture is heavily inspired by Nestjs.
Getting started
Quick Start
$ composer require assegaiphp/core
<?php // <path-to-project>/index.php ... /* * Set the path to the request URI. */ $_GET['path'] = trim($_SERVER['REQUEST_URI'], '/'); /* * This is the entry point of the application. */ require_once './bootstrap.php';
Bootstrap the app
<?php // <path-to-project>/bootstrap.php use Assegai\Core\AssegaiFactory; use Liferaftinc\RudderDashboard\AppModule; require './vendor/autoload.php'; /** * Bootstraps the application. * * @return void */ function bootstrap(): void { $app = AssegaiFactory::create(AppModule::class); $app->run(); } bootstrap();
Start the dev server
$ php -S localhost:5000 -t <path-to-project>
Server-rendered UI, HTMX, and Web Components
Assegai is not JSON-only. The framework supports classic server-rendered views through view(...), component-backed pages through render(...), automatic HTMX inclusion in rendered HTML, and first-class Web Components hydration through safe data-props helpers plus automatic bundle injection.
For the full walkthrough, see Pages and Components.
Data, ORM, and Relations
For data-backed applications, Assegai ships with a TypeORM-inspired workflow around modules, repositories, entities, and migrations. The fuller persistence track now lives in:
- Data and ORM
- ORM Setup and Data Sources
- ORM Entities, Repositories, and Results
- ORM Relations
- ORM Migrations and Database Workflows
Constrained Route Params
Assegai routes support constrained dynamic params using angle-bracket syntax:
#[Get(':id<int>')] public function findById(#[Param('id')] int $id): object { // ... }
Built-in constraints currently include int, slug, uuid, alpha, alnum, hex, and ulid.
- To check out the guide, visit assegaiphp.com. 📚
Questions
For questions and support please use the official Discord channel. The issue list of this repo is exclusively for bug reports and feature requests.
Issues
Please make sure to read the Issues Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.
Consulting
With official support, you can get expert help straight from the Assegai core team. We provide dedicated technical support, migration stratgies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about support here.
Support
Assegai is an MIT-licensed open source project. It can grow thanks to sponsors and support by the amazing backers. If you'd like to join them, please read more here.
Stay in touch
- Author - Andrew Masiye
- Website - https://assegaiphp.com
- Twitter - @assegaiphp
License
Assegai is MIT licensed.