• Open source · MIT
  • PHP 8.5+
  • Version 2

Zana

A modular PHP framework for business applications.

Build your application from self-contained modules. A strict container checks the whole application when it starts, so wiring mistakes never reach production traffic.

$ composer create-project mj-zana/skeleton-web my-site

# one folder per business capability
modules/
  Contact/
    Domain/
    Application/
    Infrastructure/
    Presentation/
  Billing/
  …

Why teams choose Zana

Modules first

Each module owns its domain, use cases, storage and screens. Dependency rules between modules are declared and checked by tests.

Fails at startup, not in production

The container validates every service when the application builds, with one scope per unit of work.

Fast

The compiled container resolves 100 services 3.3 times faster than at runtime. An HTTP round trip costs about 70 µs in a booted application.

Standard interfaces

PSR interfaces throughout, so your code and libraries stay portable.

Built for business logic

Aggregates, value objects, domain events, a mediator with validation, units of work.

Documentation you can trust

Every code sample in the docs is a runnable file, checked by tests against its documented output.

Install only what you use

Every package: PHPUnit and PHPStan level 8

Foundation

  • container
  • core
  • configuration
  • logging
  • events

Delivery

  • http
  • routing
  • console
  • security
  • session

Business logic

  • ddd
  • mediator
  • validation
  • serialization

Infrastructure

  • database
  • cache
  • filesystem
  • queue
  • scheduler

Websites

  • view
  • view-twig
  • view-markdown
  • translation
  • media
  • communication
  • audit

Tooling

  • testing
  • maker

Built with Zana

Zanabler builds client projects on Zana, and this website runs on it.

  • zanabler.comMultilingual website and back office

Ready for websites

Everything a server-rendered, multilingual website with a back office needs.

  • Twig and PHP views
  • Translation
  • Error pages
  • CSRF and security headers
  • Mail
  • Sessions and sign-in
  • Responsive images
  • Newsletter