matthewaprice / phossil-starter
Starter site for phossil: routes, typed views and components that build to plain static HTML.
Package info
github.com/matthewaprice/phossil-starter
Type:project
pkg:composer/matthewaprice/phossil-starter
Requires
- php: >=8.4
- matthewaprice/phossil: ^0.1
Requires (Dev)
- phpunit/phpunit: ^13.4
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A new site for phossil, the 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
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 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.
What's here
app/is your site: routes inroutes/web.php, views, controllers, data, theLayoutaround every page, and the CSS, JS and images.tests/holds PHPUnit tests for the views and controllers.- The routing, components and build come from the
matthewaprice/phossilpackage invendor/. .claude/holds an optional pull request skill for Claude Code: run/pull-requeston a branch to check it and write its PR description. Delete the folder if you don't use Claude Code.
Build
With the containers still running, build the site and zip it:
composer build:zip
You get dist/, and dist.zip beside it, ready to upload to any static host.
Test, format and lint
composer test # PHPUnit, in the php container pnpm format # oxfmt: JS, CSS, JSON, Markdown pnpm format:check # the same, without writing pnpm lint # oxlint: app/js