Zap
Documentation / Getting started

Overview

Zap is a lightweight PHP framework that gives your application a clear path from an HTTP request to a route, controller, and rendered response. Start with the pieces you need and keep the rest of your app simple.

A familiar, lightweight workflow

Define routes in one place, move application behavior into controllers, and render reusable Blade views with the framework's shared layout and asset helpers.

Route clearly

Named routes, dynamic parameters, constraints, and middleware organize HTTP endpoints.

Build with Blade

Compose pages from layouts, sections, partials, and reusable view components.

Ship assets

Use the asset catalog for framework scripts and styles, with optional Vite integration.

How a request moves through Zap

The front controller starts the session and container, bootstraps the router, captures the request, and dispatches the matching action. Controllers return a response directly or render a view.

HTTP request
 → public/index.php
 → bootstrap/app.php
 → app/Routes/
 → controller action
 → Response or Blade view

Keep your application organized

Application code stays under app/; framework internals live in core/. Composer's PSR-4 mappings define the namespaces, so the project can move between environments without hardcoded machine paths.

app/
 Controllers/
 Middlewares/
 Routes/
 Views/
bootstrap/
config/
core/
public/
resources/
  • Put application endpoints in app/Routes/web.php and app/Routes/api.php.
  • Keep Blade templates and partials inside app/Views/.
  • Configure registered browser assets in config/js.php and config/css.php.

Frontend tools when you need them

Zap includes optional frontend libraries alongside its PHP request flow. Use Litewire for reactive components, Flasher for user notifications, and DataGrid for tabular data.

Ready to get started?

Install the dependencies and follow the quick-start guide.

Installation guide