Skip to content
Open source · MIT · PHP 8.4+

The PHP framework for
content-rich sites that need to ship fast.

Rhapsody gives freelancers, agencies and developers a complete toolkit — routing, Twig views, an image pipeline, SEO tools, authentication and a module marketplace — with minimal setup. One Composer command to start.

Terminal
composer create-project arout/rhapsody-app my-site
Built-in AI docs assistant: rhapsody askMIT licensedPHP 8.4+PHPStan level 9Twig viewsMySQL · PostgreSQL · SQLite · SQL ServerDoctrine ORM or PDO modelsImage & media pipelineOptional React islandsRhapsody Server: free Windows dev stack
Who it is for

Pick your path

Rhapsody is built for sites that are heavy on content and media: portfolios, publications, directories, marketplaces and client websites.

For developers

Readable code, and no hidden magic.

  • Explicit routes, plain controllers and automatic dependency injection.
  • Twig for views, with React islands or full SPA screens when you want them.
  • A typed codebase that passes PHPStan level 9, so your editor and CI know what is going on.
  • An AI assistant that has read the docs: ask it in your terminal or browser.
Start with the installation guide →
For freelancers & agencies

Deliver client sites without the overhead.

  • Deploys with a Git push or FTP/SSH to standard PHP hosting, with no worker daemons to babysit.
  • Image resizing, uploads, SEO schema and authentication are built in, not bolted on.
  • Reuse modules and themes from the marketplace across client projects.
  • Fewer moving parts means fewer support calls after launch.
Browse the marketplace →
The ecosystem

One framework. One marketplace. One local stack.

Everything you need from the first commit to client handoff, designed to work together.

Framework

Rhapsody Framework

The core: routing, Twig views, database layers, image pipeline, SEO tools, authentication and more. Free and open source under the MIT licence.

composer create-project arout/rhapsody-app
Read the docs →
Marketplace

Modules & themes

Add features to any Rhapsody site with a Composer package and one command. Publish your own modules and themes for other developers to use.

php rhapsody module:install vendor/name
Browse the marketplace →
Server

Rhapsody Server

A modern alternative to XAMPP and WAMP, built for developers who want more than “Apache + MySQL + PHP in a folder.” Free, open source, with built-in profiling and a one-click Rhapsody scaffold.

Windows 10 & 11 · Free

Explore Rhapsody Server →

What you get out of the box

Everything a content or media site needs, in one framework. Each feature has its own documentation page.

Routing & middleware

Explicit routes, route parameters, named routes and middleware, with controllers that receive their dependencies automatically.

Twig views & React islands

Server-rendered Twig templates by default. Add interactive React islands, or full single-page screens, only where you need them.

Database & migrations

MySQL, PostgreSQL, SQLite and SQL Server. Choose a simple PDO base model or Doctrine ORM, with Phinx migrations.

Image & media pipeline

On-demand image resizing with signed URLs, plus a file uploader with type and size rules and CSRF-aware JavaScript.

SEO tools

Per-page titles, descriptions and canonical URLs, plus a Schema.org JSON-LD builder, so search engines understand your pages.

Authentication & payments

Registration and login, social sign-in through OAuth2, and payment gateways such as Stripe and PayPal through Omnipay.

Security built in

CSRF protection, input validation, reCAPTCHA support and DDoS protection tools, with sensible defaults from day one.

Background work

Run tasks after the response is sent with defer(), or use the database-backed queue when work must survive a restart.

Developer tools

A debug toolbar, database snapshots, readable error pages and a command-line tool, plus an AI assistant that answers from the docs.

New · Built-in AI Assistant

Learn Rhapsody by asking it.

Every new framework asks you to learn it first: dozens of documentation pages, unfamiliar conventions, a lot of tab-hopping before your first feature ships. Rhapsody includes an assistant that has read its own documentation. Ask in plain English, and get the answer along with the exact pages it came from.

Terminal · example
php rhapsody ask "How do I attach middleware to a route?"
Chain ->middleware('auth') onto the route to limit
it to signed-in users [1]. Middleware aliases are
defined in config.php under middleware.map [1].

Sources:
  [1] Routing › Middleware - /docs/routing (cited)
  [2] Middleware & Authentication - /docs/middleware

Skip the page-hunting

Describe what you want to do instead of guessing which of the documentation pages covers it. The assistant finds the relevant section, shows the code, and links the full page.

Learn the framework in context

Each answer points to the pages it used, so every question becomes a guided tour of the docs. You learn the framework's vocabulary as you build, not before you can start.

In your terminal or your browser

Run "php rhapsody ask" without leaving your editor, or open the same assistant as a page in your development site when you want room to read.

Works with no API key

The documentation ships inside the framework package with its own search index. Out of the box, "rhapsody ask" finds and prints the right sections locally, with no account and no network.

Cited, never guessed

With an AI key, answers are written only from the retrieved documentation and cite their sections. An answer that cites something it was not given is discarded, so what you see can always be checked against the docs.

Finds the gaps in the docs

Questions the documentation answers poorly are logged to a file in your project, so you can see exactly where a newcomer gets stuck.

Development-only by design

AI answers and the browser page run only in your development environment. Only your question and public documentation text are sent to the model: never your requests, sessions, or code.

Free to start

Gemini is the default provider, and Google AI Studio offers a free tier. Paste a key into .env; there is nothing to wire up.

Bring your own model

The assistant runs on a small provider-neutral interface. Swap Gemini for another model with one binding, and keep the same commands and the same checks.

Code that reads like what it does

A controller that validates and stores an upload, then queues follow-up work without making the visitor wait. No hidden configuration: what you see is what runs.

app/Controllers/MediaController.php
<?php
namespace App\Controllers;

use Rhapsody\Core\BaseController;
use Rhapsody\Core\FileUploader;
use Rhapsody\Core\Request;
use Rhapsody\Core\Response;

class MediaController extends BaseController
{
    public function upload(Request $request): Response
    {
        $result = new FileUploader($request)
            ->accept('image/jpeg', 'image/png')
            ->maxSize('5MB')
            ->store('uploads');

        // Runs after the response is sent. The visitor does not wait for it.
        defer(fn() => $this->thumbnails->build($result));

        return $this->json($result->toArray(), $result->ok() ? 200 : 400);
    }
}
Under the hood

Background work without a queue daemon

Rhapsody’s defer() runs a task after the response is sent, so visitors never wait for slow work and you do not need a worker process running. For work that must survive a crash or be retried, Rhapsody also includes a database-backed queue.

How long the visitor waits

Illustrative

Example: sending a welcome email while handling a sign-up. These figures are illustrative, not measured results. Reproducible benchmarks are in preparation.

Do the work in the request synchronous e.g. 1,250 ms
Hand off to a queue worker needs a running worker e.g. 85 ms
defer() after the response e.g. 90 ms

Queues add durability and retries. defer() adds simplicity. Use the one that fits the job.

What happens on a request

1

Your controller runs

You call defer(fn () => ...). The task is remembered, not run.

2

The response is sent

Under PHP-FPM or LiteSpeed the browser gets its page and the connection is closed.

3

Tasks run afterwards

Deferred tasks run in order. Failures are logged and never shown to the visitor.

Good to know: deferred tasks are not saved if the server stops, and PHP time limits still apply. Read the full reference →

How it compares

Where Rhapsody fits

Between a bare micro-framework and a full-stack ecosystem. Here is an honest side-by-side so you can decide.

FeatureRhapsodyLaravelSlim
Best for Content- and media-rich sites, client work Full-stack applications of almost any size Small APIs and custom stacks you assemble yourself
Included out of the box Routing, Twig, auth, uploads, image pipeline, SEO tools, modules Very broad: auth kits, queues, mail, scheduling and more Routing and PSR-7. You add the rest
Database layer PDO base model or Doctrine ORM Eloquent ORM None built in
Templating Twig, with optional React islands Blade, with Livewire or Inertia Bring your own
After-response work defer() and a database-backed queue defer(), plus queues with many drivers Bring your own
Image pipeline & SEO schema Built in Through packages Through packages
Ecosystem & community New and growing; a marketplace for modules and themes Very large, with extensive courses and packages Established and compact
Learning resources Documentation, tutorial and a built-in AI assistant Extensive official and community material Documentation and community guides

Based on our understanding as of November 2026. Spotted something out of date? Tell us and we will fix it.

4
Databases supported
MySQL, SQL Server, PostgreSQL, SQLite
2
Database layers
PDO BaseModel or Doctrine ORM
2
React modes
Islands or full SPA pages
12+
Validation rules
Extensible engine, clean input
Companion app · Free & open source

Rhapsody Server: the local dev stack that shows its work.

Apache or nginx, seven PHP versions, MariaDB, Redis and a mail catcher, in one Windows tray app with a web dashboard. It profiles your requests and SQL at the stack level, and it can scaffold a ready-to-run Rhapsody project in one click.

Rhapsody Server · dashboard (example)
Services
  ● Apache / nginx   switch anytime
  ● PHP 8.4           7.1 … 8.5 available
  ● MariaDB           phpMyAdmin linked
  ● Redis             toggle on/off
  ● Mail catcher      built-in mailbox

Sites
  my-content-app.test  Rhapsody  PHP 8.4

Profiler
  GET /gallery    112 ms   9 queries

From zero to a running Rhapsody app

Create a Rhapsody project from the dashboard. It runs Composer, generates your .env, creates the database, runs migrations, and adds the virtual host and .test domain for you.

Match production, project by project

Run legacy and current projects side by side by choosing the PHP version each one deploys to, from 7.1 up to 8.5. Install more Apache or PHP versions from the Versions page.

Profiling without code changes

See request timing, the SQL each request triggered, and browser Web Vitals. A passive MariaDB proxy captures queries from any client, so no framework plugin is needed.

Ready on first run

Apache, PHP and MariaDB are bundled in the installer, so nothing has to download before you can start working.

Every site on a .test domain

Add a site with the native folder picker and get a clean local domain, without editing hosts files or vhost configs by hand.

Extensions from a UI

Toggle PHP extensions and Apache modules on the Modules page instead of hunting through php.ini.

Local mail, caught

An SMTP catcher with a built-in mailbox lets you read the email your app sends in development. Nothing reaches a real inbox.

Deeper tools on demand

Run Xdebug profiling when a request needs a closer look, and add an optional Lighthouse run for page-level scores.

An assistant that reads your logs

It checks service logs, profiler data, vhosts and PHP config before answering, then explains slow requests or failing services and suggests changes for you to apply.

Get Rhapsody Server for Windows

Free and open source · Windows 10 & 11

Questions, answered

Rhapsody is an open source (MIT) PHP 8.4+ MVC framework for content- and media-rich websites. It includes routing, Twig views, an image pipeline, SEO tools, authentication, a marketplace for modules and themes, and a free local development stack for Windows. Read the introduction →

Run "composer create-project arout/rhapsody-app my-site", then set APP_URL, APP_KEY and your database credentials in the .env file. The installation guide covers the optional steps before you go live. Installation guide →

It depends on what you are building. Rhapsody is smaller, ships with media and SEO tools, and aims to be quick to learn. Laravel has a far larger ecosystem, community and library of learning material. If you build content-rich sites for clients and want less to configure, Rhapsody is worth a look. For large team applications with deep ecosystem needs, Laravel is a strong choice.

Rhapsody is a framework for developers, not a ready-made CMS with an admin dashboard. If you want to build a custom content- or media-rich site in code, with full control over the output, it is a good fit. An editor-facing admin experience is not part of the core framework.

Rhapsody works with MySQL/MariaDB, PostgreSQL, SQLite and SQL Server. It needs PHP 8.4.1 or newer and runs on Apache, Nginx, LiteSpeed or Caddy, including standard shared hosting that offers PHP 8.4.

defer() runs a task after the response has been sent, so the visitor does not wait for it. Under PHP-FPM or LiteSpeed the connection is closed first. Deferred tasks are not saved: if the server stops they are lost. For work that must survive a crash or be retried, such as payments, use the built-in database-backed queue. Read about defer() →

No. "php rhapsody ask" searches the documentation bundled with the framework and prints the matching sections and their sources, with no key and no network access. Adding a free Gemini key in development turns those sections into a short, cited written answer. The AI features are never active in production. AI assistant guide →

No. Views use Twig by default. React is optional and can be mounted as small interactive islands inside Twig templates, or used for full single-page application screens through the React bridge. React integration →

Rhapsody Server is a free, open source local development stack for Windows: Apache or nginx, multiple PHP versions, MariaDB, Redis and a mail catcher in one tray app, with a request and SQL profiler. You do not need it to use Rhapsody, but it can scaffold a ready-to-run Rhapsody project in one click. About Rhapsody Server →

We are preparing reproducible benchmarks and will publish the method, the raw results and the configurations tested. Until then we do not quote performance numbers. The one chart on this page is labelled illustrative for that reason.

The framework is free and open source under the MIT licence. Modules and themes in the marketplace are set by their authors and can be free or paid. Browse the marketplace →

Create your first Rhapsody site

Free, open source and one command away. Then explore the docs, the marketplace and Rhapsody Server.

Terminal
# Create a new Rhapsody site
composer create-project arout/rhapsody-app my-site
cd my-site

# Set APP_URL, APP_KEY and your database in .env, then open the site

Need a local environment? Get Rhapsody Server for Windows →