Skip to content

PHP 8.2 starter kit for shipping real products

Keel is an open-source PHP 8.2 starter kit for building SaaS applications.

It ships with passwordless authentication, Stripe billing, files + AI helpers, optional multi-tenancy, queue/audit automation, and developer tooling while keeping the codebase explicit and maintainable.

Auth
OTP + magic link
Data
PDO + MySQL
Assets
Tailwind + Vite
Quick install README-backed
$ composer install
$ npm install
$ cp .env.example .env
$ php database/migrate.php
$ npm run dev

The commands above are the same ones documented in the setup instructions. No generated CLI, no hidden scaffolding step.

Features

Everything on this page exists in the repository today.

Keel groups practical capabilities into clear building blocks so you can ship product features quickly without giving up ownership of the stack.

01

Auth & Security

  • OTP + Magic Link flows with no passwords, configurable per project via AUTH_METHOD.
  • Mail delivery is built in via PHPMailer: use SMTP for real sends, or MAIL_MAILER=log for zero-config local development (codes and magic links in storage/logs/mail.log).
  • CSRF protection, rate limiting, and dedicated 404/500 error pages ship out of the box.
02

Billing

  • Stripe Checkout + Billing Portal with subscription state synced by webhooks.
  • Keel never handles raw card data directly.
03

Data & Files

  • PDO + MySQL with explicit queries and no ORM abstraction layer.
  • File uploads validate real MIME types server-side, with local disk today and a swappable storage abstraction for later.
04

AI

  • A thin Claude API wrapper supports text, image-assisted, and JSON-structured completions.
05

Teams

  • Opt-in multi-tenancy with organizations, roles, invites, and org-level access control.
  • Includes both org-admin settings and a platform super-admin area.
06

Automation & Data

  • A database-backed background job queue runs from database/queue-work.php, with retries and failed-job capture.
  • Built-in activity logging records auth, billing, file, and organization events for audit trails.
  • API tokens support programmatic Bearer access alongside normal session auth.
07

Developer Experience

  • Tailwind + Vite with automatic dev/build asset switching in shared templates.
  • A hand-authored component layer (buttons, cards, tables, modals) is built on re-themeable design tokens.
  • Light/dark theme toggle includes persisted user preference support.
  • Lightweight PWA support is included via a manifest route plus app icons/favicons.
  • Self-maintaining sitemap.xml, robots.txt, and llms.txt: mark a route public once where it is registered, and it stays reflected everywhere with nothing to regenerate.
  • PHPUnit scaffold + GitHub Actions CI included for testable pull requests.
  • Docker Compose is available as an alternative for contributors not using XAMPP.

Quickstart

Get from clone to running app with the documented flow.

These steps mirror the README setup flow: install dependencies, create your environment file, run php database/migrate.php, then set auth and optional feature flags.

  1. Step 1

    Install dependencies

    composer install
    npm install
  2. Step 2

    Create your environment file

    cp .env.example .env
  3. Step 3

    Run migrations

    php database/migrate.php
  4. Step 4

    Set core auth + mail toggles

    AUTH_METHOD=both
    MAIL_MAILER=smtp
    MAIL_MAILER=log
  5. Step 5

    Enable optional billing + org features

    MULTI_TENANCY_ENABLED=false
    STRIPE_SECRET_KEY=
    STRIPE_PUBLISHABLE_KEY=
    STRIPE_WEBHOOK_SECRET=
    STRIPE_PRICE_PRO_MONTHLY=

Why Keel

Convention over configuration, without hidden magic.

Keel is opinionated where repetition wastes time: routing, controller structure, auth flow, mailer wiring, and asset handling already have a sensible shape.

It stays honest by keeping the machinery small. When you open the code six months later, the path from request to response is still obvious and local.

That balance is the point: enough structure to move quickly, not so much abstraction that the foundation starts steering the product.

FAQ

Quick answers for developers and crawlers.

What is Keel?

Keel is an open-source PHP 8.2 starter kit for building SaaS applications, with passwordless authentication, Stripe billing, optional multi-tenancy, and a plain-PHP MVC structure.

Is Keel free, and what license does it use?

Yes. Keel is open source under the MIT License.

Does Keel require Laravel or another framework?

No. Keel uses a custom lightweight MVC foundation and does not require Laravel or another PHP framework.

Is this related to the Kubernetes tool or the London startup also called Keel?

No. This Keel project is unrelated. It is an independent open-source PHP starter kit for SaaS applications.

How are public discovery files maintained?

Public routes are marked in route registration with the sitemap option, and sitemap.xml, robots.txt, and llms.txt are generated from that route metadata and shared docs registry at request time.