Search by

psyao / kami-starter

psyao

A Laravel application wired for Psyao Kami, the Laravel and Filament CMS.

Package info

github.com/psyao/kami-starter

Type:project

pkg:composer/psyao/kami-starter

Statistics

Installs: 379

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-11-16 20:07 UTC

This package is auto-updated.

Last update: 2026-11-16 20:08:20 UTC


README

A Laravel application wired for Psyao Kami, the Laravel and Filament CMS at home on shared hosting. Once created, the site owns this code: nothing is ever synced back from here, and everything existing sites must receive ships in the psyao/kami package.

Create a site

Requirements: PHP 8.5 with the extensions Kami lists, Composer, and, on the developer's machine only, Node for the front-end build and gitleaks for the commit hook (brew install gitleaks).

laravel new site --using=psyao/kami-starter
cd site
php artisan kami:install

kami:install asks for the first administrator, who signs in at /admin and sets an authenticator app up there; so does composer setup, which also builds the front. Without a terminal, pass the administrator's details as Kami's installation guide shows. The home page answers 404 until it is published: publish it in the admin, or seed the demo with php artisan db:seed --class=DemoSeeder, which composer setup runs. The demo publishes it and a Page with two Tags, at /about in French and /en/about in English. It also publishes two News items, listed by their Archive at /news and /en/news, and fills the primary Menu with links to the home page, the Page and the Archive.

To put the site online and deploy it again, follow Kami's deployment guide. On shared hosting, point the host's task planner at the Tick's URL, as Kami's hosting guide shows. Accept Laravel Boost when the installer offers it, or run php artisan boost:install later: either gives a coding agent Laravel's, Filament's and Kami's guidelines and skills.

What it wires

  • routes/web.php: Kami::routes(), the fallback route that serves every Entry at its Path, after the site's own routes.
  • bootstrap/app.php: Kami's front security headers and CSP on the web group too.
  • app/Providers/Filament/AdminPanelProvider.php: the panel, with KamiPlugin, strict authorization, Kami's local avatar provider and Kami's admin security headers.
  • app/Models/User.php: KamiUser with HasKamiRoles, and Filament's MFA contracts with HasKamiMfa; only a User holding a Kami Role gets into the admin, and one who may manage Users sets an authenticator app up first.
  • app/Filament/Resources/Users/: the Users screen, with Kami's Roles field and a one-time link for each new User to set their password; app/Policies/UserPolicy.php opens it to kami.users.manage only; lang/{en,fr}/users.php are its labels. The first administrator comes from kami:install, later Users from this screen or kami:user:grant.
  • config/kami.php: four example types in app/Content, a Home Singleton at /, a Page, the Tag Taxonomy its tags Field links to, and News, whose Archive lists them newest first at /news; a primary Menu, one level deep, which editors fill in the admin; two Locales (fr, the default, and en) and the administrator and editor Roles, the editor managing Menus but not Redirects. database/migrations/*_create_kami_type_*_table.php are the types' tables, written by kami:make:migration; a type with no Field, as Tag, has none.
  • app/Forms/ContactForm.php: a contact Form under kami.forms, its accessible markup on the home page inside <x-kami::form> (see Kami's Forms guide). Each Submission is stored; its recipient is MAIL_FROM_ADDRESS. lang/{en,fr}/kami-forms.php name it, validation.attributes its fields; lang/fr/validation.php carries Laravel's validation messages in French, which Laravel does not ship.
  • database/seeders/DemoSeeder.php: the demo, through SaveEntry. Delete it when the site has its own content. To remove a type you have migrated, delete it from config/kami.php and drop its table with ContentMigrator::dropType() in a migration.
  • lang/{en,fr}/kami-types.php: the admin's labels for the types; lang/{en,fr}/kami-menus.php: the Menu's, also its <nav>'s accessible name; lang/fr.json: the layout's strings in French.
  • resources/views/components/layouts/site.blade.php: a minimal accessible layout (lang, skip link, landmarks), built by Vite and Tailwind, with no JavaScript, no web font and nothing inline. Its header renders the primary Menu with <x-kami::menu handle="primary" />. resources/views/kami/home.blade.php, page.blade.php and news.blade.php render the types in it, and news-archive.blade.php the News Archive, with <x-kami::pagination>.
  • public/.htaccess: no trailing-slash redirect before Laravel, so a former URL costs one 301.
  • resources/views/errors/: 4xx pages in the site's layout; 500 and 503 in minimal.blade.php, a shell with no database query and no Vite asset, styled by public/errors.css. bootstrap/app.php calls Kami::exceptions(), so they answer in the URL's Locale.
  • .github/workflows/tests.yml: Pint, Larastan, Rector and the tests on every pull request, and the Vite + Tailwind build as an artifact, so the server never runs Node.
  • boost.json: Kami's and Filament's guidelines and skills, preselected for boost:install, which the installer runs without prompting for them.
  • lefthook.yml, pint.json, rector.php, phpstan.neon.dist: Kami's rules and level, from the package. Hooks install with composer install once the site is a Git repository.
  • tests/ArchTest.php: Filament stays in app/Filament, app/Providers/Filament and the User model (its FilamentUser and MFA contracts), so a Filament major touches only them.

composer analyse runs Larastan, composer test the tests.