Skip to content

Latest commit

 

History

History
93 lines (75 loc) · 5.46 KB

File metadata and controls

93 lines (75 loc) · 5.46 KB

LaraFly

LaraFly

LaraFly is the PHP edition of the Firefly Framework — Spring Boot's cohesion, native to Laravel 13. It layers dependency injection with stereotypes, conditional auto-configuration, hexagonal ports & adapters, CQRS, event-driven architecture, first-party security, and a project CLI directly onto Laravel's own runtime. Nothing is forked or wrapped: a LaraFly app is, in every respect a Laravel developer would recognize, still a Laravel app — it just boots like a Spring Boot one.

The whole framework is one monorepo of small, independently-installable Composer packages, wired together by a single zero-reflection boot pipeline: a component scan compiles to a cached manifest once, and every request after that runs against plain PHP arrays — no runtime reflection on the hot path.

Why LaraFly?

  • Attribute-driven DI & auto-configuration#[Service], #[Repository], #[Configuration] classes are discovered by a compiled scan; install a capability package and its defaults wire themselves up, your own beans always win.
  • Hexagonal by construction — every subsystem exposes a port and one or more adapters, with architectural direction enforced by Deptrac, not convention alone.
  • Declarative transactions & CQRS#[Transactional] demarcates boundaries at scan time; a CommandBus/QueryBus mediator dispatches commands and queries, with domain events bridged onto the event-transport bus after commit.
  • Event-driven, with real brokers — an in-memory default plus RabbitMQ, Postgres LISTEN/NOTIFY, and Kafka adapters behind one EventPublisher port.
  • Secure by default — a Spring-Security-6-shaped principal model, deny-by-default HttpSecurity URL DSL, and method security (#[PreAuthorize]) enforced with no proxy magic.
  • Production-ready out of the box — an Actuator surface (health/info/beans) and a Prometheus/Micrometer-style metrics core, both secured by the same config as everything else.
  • A first-party test kit — a boot harness, recording doubles for every port, and web/data test-slice builders, dogfooded across the framework's own test suite.

Quickstart

composer create-project firefly/skeleton my-app
cd my-app
php artisan firefly:cache   # compile the zero-reflection boot manifests
php artisan serve

See Installation for requirements and manual setup, and Getting Started for a walkthrough of the generated app.

Documentation Map

Start here
Installation Requirements and how to stand up a new app
Getting Started Boot the skeleton, write your first controller/service
Tutorial A hand-built, 12-step walkthrough building a #[Repository]/#[Valid]/CQRS/#[EventListener] feature
Architecture The hexagonal design and the boot pipeline
Laravel Comparison Concept mapping for developers coming from plain Laravel

Module guides are grouped by concern under modules/:

Group Guides
Foundation Error Handling · Dependency Injection · Configuration · Application Context · Auto-Configuration · Validation
Web & API Web Layer · Web Filters
Resilience & Scheduling Resilience · Scheduling
Data & Domain Domain (DDD) · Data & Repositories · Relational Data · Transactions
Eventing & Messaging EDA · EDA Brokers · Messaging
CQRS Command/Query
Security Security
Operations Actuator · Observability
Testing Testing · Integration Testing
Tooling Installer

New to LaraFly? Follow the Tutorial — a hand-built, 12-step walkthrough from composer create-project to a #[Repository]/#[Valid]/CQRS/#[EventListener] feature slice, with a curl'd expected output at every step.

Want to see it all running together? The Lumen sample is a runnable digital-wallet & ledger vertical slice exercising #[Transactional], CQRS, domain events over EDA, method security, and a REST layer with RFC-7807 problem-details. The guided, book-style LaraFly by Example book — 13 chapters plus appendices, bilingual (English + Spanish), building this exact sample — is available in book/.

Quick Links


Apache-2.0 © Firefly Software Solutions Inc.