Repolode
spiral

spiral/framework

A PSR-compatible PHP full-stack framework for long-running apps, built on the RoadRunner application server.

Stars
2,064
Forks
93
Open issues
44
Last commit
21 hours ago

What is it?

Spiral is a full-stack PHP framework made from more than sixty PSR-compatible components. Its execution model is hybrid: services such as gRPC, queues and WebSockets are handled by the RoadRunner application server, while the application's PHP code stays in memory between requests. The framework includes anti-memory-leak tooling to support this long-living model.

The framework covers common web application needs: queues (AMQP, SQS, Beanstalk, Kafka) with background workers and supervision, gRPC server and client, pub/sub and event broadcasting, and database support for MySQL, MariaDB, SQLite, PostgreSQL and SQL Server with auto-migrations. It also provides authentication, RBAC, validation, encrypted cookies, signed sessions and CSRF protection. The ORM is Cycle, and code scaffolding is available from the CLI.

Spiral suits MVC, HMVC or CQRS web apps, queue-driven services, RPC-oriented backends and CLI applications. Its bridges integrate RoadRunner, Cycle ORM, Temporal workflows and data grids.

Key features

  • 01Long-running PHP execution with RoadRunner handling gRPC, queues and WebSockets
  • 02Queue support for AMQP, SQS, Beanstalk and Kafka with background workers
  • 03Database support for MySQL, MariaDB, SQLite, PostgreSQL and SQL Server with auto-migrations
  • 04Authentication, RBAC, validation, encrypted cookies and CSRF protection
  • 05PSR-3, 4, 7, 11, 12, 14, 15, 16 and 17 compliant components

Use cases

  • Building MVC or HMVC web applications in PHP
  • Running queue-driven background processing services
  • Exposing gRPC services from a PHP backend
  • Developing CLI applications with the same framework stack

Quick start

  1. 1

    Install the application installer via Composer

    composer create-project spiral/app my-app
  2. 2

    Start the development server by changing into the project directory and running the RoadRunner server

Things to know

  • Requires running a long-lived PHP process under RoadRunner, which differs from typical PHP hosting.
  • Application code stays in memory permanently, so developers must guard against memory leaks.

In collections

Topics

FAQ

What is framework?
A PSR-compatible PHP full-stack framework for long-running apps, built on the RoadRunner application server. Spiral is a full-stack PHP framework made from more than sixty PSR-compatible components. Its execution model is hybrid: services such as gRPC, queues and WebSockets are handled by the RoadRunner application server, while the application's PHP code stays in memory between requests. The framework includes anti-memory-leak tooling to support this long-living model.
Is framework free to use? What license does it have?
framework is open source under the MIT license. Check the license terms before using it in commercial products.
Is framework still maintained?
Actively maintained. The last commit to framework was on Nov 6, 2026.
What can I use framework for?
Building MVC or HMVC web applications in PHP Running queue-driven background processing services Exposing gRPC services from a PHP backend Developing CLI applications with the same framework stack
How do I install framework?
Install the application installer via Composer: composer create-project spiral/app my-app Start the development server by changing into the project directory and running the RoadRunner server
Where can I get framework?
The source code and installation instructions are on GitHub: https://github.com/spiral/framework

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects