Search by

matthewaprice / phossil

matthewaprice

Routing, typed views and components for PHP sites that build to static HTML.

Package info

github.com/matthewaprice/phossil

Homepage

pkg:composer/matthewaprice/phossil

Statistics

Installs: 9

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-10-31 18:17 UTC

This package is auto-updated.

Last update: 2026-10-31 21:51:16 UTC


README

Note: This repository contains the core for the phossil site kit. To create an application with phossil, visit matthewaprice/phossil-starter

phossil is a PHP site kit with routing and typed components that builds to plain static HTML, ready for AWS Amplify or any static host.

You get routes, typed views and components while you build, and a folder of static files when you deploy.

Read the documentation at phossil.dev

Why

I love PHP, and I wanted the same dist/ workflow JavaScript developers take for granted. phossil gives you one. Here are a couple of project types that I use this kit for:

  • Simple sites that never needed a server. Build once and host the HTML anywhere.
  • Bigger sites that will need infrastructure later but need client feedback now. Ship a static preview today and keep the PHP for when you add the backend.

Either way, it's one command: composer build:zip renders every route and zips it with your assets for a host like AWS Amplify.

Quick start

phossil runs PHP, nginx and Vite in Docker. You also need PHP and Node on your machine, for Composer and pnpm:

  • Docker, with Compose
  • PHP 8.5 with Composer
  • Node 24 or later, with pnpm
composer create-project matthewaprice/phossil-starter my-site
cd my-site
pnpm install       # Vite, Tailwind, oxfmt and oxlint
docker compose up --build

create-project copies the phossil starter into my-site/ and installs phossil, the matthewaprice/phossil package in this repo, into vendor/. It then asks whether to start a git repository with a first commit, and what to call its default branch (press Enter for main). Answer n to the first question to skip it.

Open http://localhost:8000.

Build

With the containers still running, build the site and zip it:

composer build:zip

You get dist/, and dist.zip beside it at the root of the repo, ready to upload to any static host.

Format and lint

pnpm format        # oxfmt: JS, CSS, JSON, Markdown
pnpm format:check  # the same, without writing
pnpm format:build  # run on the built dist folder
pnpm lint          # oxlint: app/js

Documentation

Sites built with phossil

These sites run on phossil in production:

License

MIT