Write it in PHP. Ship it as HTML.
phossil is a small PHP site kit designed to deploy static html files and assets. You get routes, typed views and components while you build, and a folder of static files when you deploy.
Why phossil
Some websites can be a handful of pages with nothing happening on the server. You still want a real language to build them in: components with typed options, views you can refactor, and an IDE that flags a typo before your client does.
phossil keeps PHP for development and drops it for deployment.
While you work, nginx hands every request to PHP. When you're
done, composer build:zip requests every route,
saves the HTML, and zips it with the CSS, JS and images. A
client preview is then an upload to AWS Amplify or any static
host, with no server to set up.
A page is a route and a class
<?php
namespace App\Views\Pricing;
use App\Components\Layout;
use App\Components\LayoutOptions;
use App\Components\View;
readonly class Pricing extends View
{
public function render(): string
{
return $this->capture(function () {
Layout::create(
new LayoutOptions(
content: $this->content(),
title: 'Pricing',
description: 'Plans for every size of team.'
)
);
});
}
private function content(): string
{
return $this->capture(function () {
?>
<h1 class="text-2xl font-bold">Pricing</h1>
<p>One plan, no surprises.</p>
<?php
});
}
}
<?php
use App\Services\Router\Route;
use App\Services\Router\RouteType;
use App\Views\Home\Home;
use App\Views\Pricing\Pricing;
Route::create(
new RouteType(path: '', view: Home::class),
new RouteType(path: 'pricing', view: Pricing::class),
);
composer build:zip and served
as plain HTML.
How it works
Build the page
Views are readonly PHP classes. Components take typed options objects, so your IDE completes and checks them.
Preview it
docker compose up runs PHP, nginx and Vite.
Save a PHP file and the page reloads.
Ship it
composer build:zip renders every route to
HTML and zips the site for AWS Amplify or any static
host.
What's included
Typed components
Buttons, cards, dialogs and more, each configured by an options class with named, typed parameters.
One dev environment
PHP, nginx and Vite in Docker Compose, so every machine runs the same versions with the same config.
Vite and Tailwind
Tailwind CSS v4 with hot reload while you work, and hashed, cache-busting files in the build.