Appearance
Deploy
The files that put the site on a server, written from the site as it is: a server script, cloud-init, a Deployer recipe, a CI workflow.
kitloom/
The deploy kit. One command writes the files that put the site on a server, filled in from the site as it is — which admin and at which path, whether a theme is built with npm, whether the worker runs Horizon, whether the database is WordPress's — so nothing of the deploy is typed from a page of documentation and got wrong for this site:
bash
php artisan kitloom:deploy-kit # the targets
php artisan kitloom:deploy-kit server # one VPS on Ubuntu 24.04
php artisan kitloom:deploy-kit laravel-cloud # cloud.laravel.com
php artisan kitloom:deploy-kit forge # Laravel Forge or Ploi on any VPS
php artisan kitloom:deploy-kit docker # any Docker host: compose, Coolify, AWS ECS / App Runner
php artisan kitloom:deploy-kit digitalocean-app # DigitalOcean App PlatformThe files are plain text in the project, to read, edit and commit. Run the kit again after a change — a Vue theme added, Horizon installed, another domain — and it rewrites its own files and keeps the ones you edited. Nothing of the package runs while the site serves pages.
The server target
One server on Ubuntu 24.04 — a DigitalOcean Droplet, a Hetzner server, an AWS EC2 instance or Lightsail — with Nginx, PHP-FPM, MySQL on the same server (or a managed one elsewhere) and the site deployed in releases, so a deploy never serves half a site and can be rolled back.
| File | What it is |
|---|---|
deploy/ | Sets the server up, run once as root: PHP-FPM with the extensions, Nginx with the site's server block, MySQL with the site's database and user, Composer with your kitloom token (and the Nova license on a Nova site), Node.js when a theme needs it, Redis when Horizon does; the deploy user that owns the site and runs PHP; the site's folder and its . with a key and the database password made up; the scheduler in cron; the worker as a systemd service; a certificate from Let's Encrypt. Safe to run again: what is there is left, what is missing is added |
deploy/ | The same script run by cloud-init at the server's first boot — a Droplet's User data, Hetzner's Cloud config, an EC2 instance's User data. Fill in the credentials in a copy; don't commit the copy |
deploy. | A Deployer recipe: each release in a folder of its own, composer install, the themes built, optimize, migrate, then current switched to it, PHP-FPM reloaded, the worker restarted, and the front page and the admin's login page asked for a 200. dep rollback switches back to the release before. dep kitloom: makes the first administrator |
. | Every push to main runs the recipe, with one secret, a private SSH key. -- writes . instead, -- neither |
deploy/ | The steps above for this site, in order |
The kitloom token is saved on the server by server., in the deploy user's Composer configuration, and nowhere in the repository: CI needs only the SSH key.
The first time
composer require --, and commit the kit's files.dev deployer/ deployer - A server with 2 GB of memory (4 GB for a shop or Horizon) and
deploy/as its user data — orcloud- init. yaml scp deploy/andserver. sh root@<ip>: ssh root@<ip> bash server., which asks for the credentials.sh - The DNS record of the domain to the server, then the certificate:
certbot --as root (nginx - d example. com - d www. example. com -- redirect server.takes it itself when the record is already there).sh - The server's deploy key, printed at the end of
server.(orsh /with cloud-init), as a read-only deploy key of the repository.var/ log/ kitloom- server. log vendor/, thenbin/ dep deploy vendor/.bin/ dep kitloom: user
A site moving from WordPress loads WordPress's database into the server's MySQL instead of making an administrator; DB_ in the server's . (/) is its $table_. The mailer, the modules' keys and the rest of Configuration go into that . too; a deploy keeps it.
The laravel-cloud target
Laravel Cloud keeps its settings in its dashboard, not in files, so the kit writes the checklist with this site's values and the variables to paste:
| File | What it is |
|---|---|
deploy/ | The checklist: the application and its PHP, the resources (Laravel MySQL, the public media bucket, a private bucket when Import & Export or Backup use one, Valkey with Horizon), the build commands with your token (and Nova's), the deploy command, the scheduler and the worker, the first deploy, backups |
deploy/ | The environment variables next to what Cloud fills in: MEDIA_, MEDIA_ to fill, IMPORT_ when the module is there, KITLOOM_, the queue on Valkey with Horizon, DB_ for a WordPress database |
Cloud resets the file system on every deploy and each replica has its own, so the uploads live in a bucket and the caches are built in the build; the README says why each line is there. The S3 adapter the bucket needs is asked for (composer require league/) only while it is missing.
The forge target
Laravel Forge and Ploi set the server up and deploy on a push; what they cannot know is kitloom's:
| File | What it is |
|---|---|
deploy/, deploy/ | The deploy script to paste: composer install, the themes built when a theme needs it, migrate, optimize, PHP-FPM reloaded, the worker restarted the way it runs (queue: or horizon:) |
deploy/ | The lines to add to the site's environment under what Forge filled in: the theme, the prefix, the queue, the mailer to set |
deploy/ | The checklist of their screens: the server, the token as the server's user, the site, the environment, the deploy script, the PHP upload size, the scheduler, the worker as a daemon, SSL, the first administrator |
A Forge deploy updates the site in place, a few seconds of a half-updated site; for releases switched in one move the server target's Deployer recipe runs on a Forge server too.
The docker target
One image for any Docker host — a VPS with docker compose, Coolify, AWS ECS or App Runner: PHP-FPM and Nginx in one container, the packages installed with the kitloom token as a build argument of a stage that is not in the image, the themes built in; the same image runs the worker and the scheduler with another command.
| File | What it is |
|---|---|
Dockerfile | php: with the extensions, Nginx and supervisord; a vendor stage with COMPOSER_ (the token never reaches the image's history); a stage with Node for the themes when a theme needs it (PHP stays there: a TypeScript theme asks it for the page types); the image with the entrypoint, port 8080, a health check on / |
docker/ | nginx., php. (uploads, OPcache without file checks), supervisord., entrypoint. (the caches from the container's environment, migrations and storage: for the site, any command as www- for the worker and the scheduler; a managed database's CA from DB_), auth. |
. | vendor, node_modules, the built themes, the environment and the credentials stay out of the build |
compose. | One host: the site on port 80, the worker, the scheduler, MySQL 8.4, Redis with Horizon; volumes for the uploads and the database; COMPOSER_ from the shell |
deploy/ | The environment of every container, and MySQL's; to fill in and keep out of the repository |
deploy/ | docker compose on one host, and what a platform that runs the image needs: the uploads on S3, HEALTH_, the worker and the scheduler as services, a private disk for Import & Export |
The digitalocean-app target
The docker image and ., an App Platform spec for doctl apps create: the web service, the worker and the scheduler as components of the same image, built from the GitHub repository on every push; a managed MySQL bound into the environment (${db. and the rest, the CA certificate through the entrypoint); the uploads in a Space behind its CDN; Valkey with Horizon; the domain. The secrets — APP_, COMPOSER_ for the build, the Space's key and secret — are filled in the dashboard, so the spec can be committed. deploy/ has the steps and what the platform's reset disk asks of the site.
Options
| Option | |
|---|---|
-- | The site's domain; by default the host of APP_, or example. while that is a local address |
-- | The Git repository the server clones; by default the origin remote |
-- | The PHP the server gets; by default the lowest the project's composer. allows (^8. — 8.4) |
-- | server only: github (default), gitlab or none |
-- | Rewrite files you edited, or files the kit did not write |
-- | Write into another folder |
What it reads off the site
| Where it shows | |
|---|---|
| The admin — Nova or Filament, and its path | server. saves Laravel's Composer credential for Nova; deploy. checks the admin's login page after a deploy |
| The themes — a Vue or React theme installed, or Blade only | Node.js on the server and npm run build in the release, or neither |
| Horizon installed and on | Redis on the server, QUEUE_, the worker runs php artisan horizon |
| Sentry installed | A SENTRY_ line to fill in . |
| The database's prefix | DB_ in ., so a WordPress database is read as it is |
| Import & Export, Backup installed | A private bucket on Laravel Cloud, and its disk in the variables |
| The S3 adapter installed | Laravel Cloud's and App Platform's checklists ask for it only while it is missing |
| The repository on GitHub | . names it (owner/); another host leaves a placeholder and a step |
| Live (kitloom/live) installed and on | Reverb as a third process beside the worker and the scheduler, and / passed on to it — see below |
| AI installed, with its OAuth sign-in (Passport) | Passport's keys outlive a deploy: made once in the shared storage/ (deploy., forge., ploi.), or PASSPORT_ and PASSPORT_ in the environment (Docker, App Platform, Laravel Cloud) |
Passport's keys
AI agents sign in to the site with OAuth (kitloom/ai on Laravel Passport), and every token they get is signed with Passport's key pair: when it changes, every connected agent is signed out, and two servers with two pairs refuse each other's tokens. Where storage/ lasts from one deploy to the next — the server target's shared folder, Forge's and Ploi's site folder — the deploy makes the pair once with php artisan passport:. Where the disk is reset or there are several instances — Docker, App Platform, Laravel Cloud — the pair is in the environment, made on your machine by
bash
php artisan kitloom:passport-keyswhich prints PASSPORT_ and PASSPORT_ as one line each (Passport turns the \ back into line breaks), as key: prints a key: secrets for the platform, never for the repository. The kit writes neither key into its files, so running it again never changes them. Each target's deploy/ says how to rotate them.
Reverb
With kitloom/live installed and on, the site sends its changes to the pages open in browsers through Laravel Reverb, and the kit writes its process next to the worker's: a kitloom- systemd service with a raised open-files limit, restarted by deploy. (server); a reverb service of the image, with REVERB_ (docker) or an App Platform component with the route / (digitalocean-); a daemon to add and reverb: in the deploy script (forge). Browsers connect to the site's own address: the web server passes / on to Reverb with the WebSocket headers, and Reverb's HTTP API (/) stays inside. Laravel Cloud runs Reverb itself as a WebSocket cluster, which fills in the variables when it is attached: the checklist says so, and nothing runs of the site's own. Reverb's keys come from APP_, so none of it asks for a variable to fill in. Without the module none of it is written.
deploy/. remembers what the kit wrote, as a hash per file. Keep it with the files: it is how the next run tells its own files from yours.
With an AI agent
A project made from the skeleton carries a Claude Code skill, .: what a kitloom site needs on a server, the targets and when each fits, the procedure — ask what it cannot know, run the kit, read deploy/, do the steps with the provider's CLI, check the site answers, make the first administrator — and the rules: confirm before anything that costs money or changes DNS, keep the token out of the chat and the repository. Any other agent takes the same as a prompt: With an AI agent.
For developers
A target is a Kitloom\ — its name, its options, the files it writes for a Site, the steps left — given to Targets in the provider. Stubs in stubs/ use [[value]], [[#flag]]…[[/ and [[^flag]]…[[/ (Kit\); the flags come from Site. Tests render the targets with facts built by hand and run bash - and php - over what comes out.