Wiki: screens, themes, install with an agent

lil-koneko committed 2026-12-04 04:10:46 +01:00
1 parent ebd01144d2
commit 38bfbfa1c5
4 files changed
+57 -2

No files matched your search

+12
@@ -36,3 +36,15 @@ Publish the file with `php artisan vendor:publish --tag=manager-config`; it land
| `statistics` | off | `MANAGER_STATISTICS` |
A module that needs another one (`requires()`) fails at boot when that one is off. Run `php artisan migrate` after switching a module on; its tables only exist from then on.
## Screens and looks
| Key | Env | Default | |
|---|---|---|---|
| `ui` | `MANAGER_UI` | `package` | `package` (built-in screens) or `none` (JSON only) |
| `name` | `MANAGER_NAME` | app name | name in the menu and on the login |
| `theme` | `MANAGER_THEME` | `dark` | what everyone sees until they choose |
| `user_themes` | `MANAGER_USER_THEMES` | `true` | each account picks its own |
| `themes_path` | | `resources/manager-themes` | JSON theme files, see [[Screens and themes]] |
| `themes` | | `[]` | themes by key, in the config |
| `middleware` | | `['web', 'manager.auth']` | `manager.auth` is `auth`, but sends visitors to the manager's own login when the app has none |
+14 -2
@@ -11,8 +11,20 @@ php artisan migrate
1. Put `IriksIT\Manager\Concerns\HasManagerAccess` on the `User` model of the app. Keep `is_super_admin` out of `$fillable`.
2. Set `manager.user_model` (env `MANAGER_USER_MODEL`) when the model is not `App\Models\User`.
3. Make the first account, a super admin: `php artisan manager:create-user`. It is the only way to make one.
4. Open `/manager` (change it with `MANAGER_PATH`). The manager sits behind the `web` and `auth` middleware, so the login is the one the app already has.
4. Open `/manager` (change it with `MANAGER_PATH`). The package brings its own screens, a login and a profile; an app that has a route named `login` keeps using its own.
The answers of every action are JSON. The screens (frontend) are not part of the package yet.
## With an AI agent
```bash
php artisan manager:install --modules=users,media,posts --user-model="App\Models\User"
php artisan config:clear && php artisan migrate && php artisan storage:link
php artisan manager:doctor --json
```
`manager:doctor` checks the user model and trait, the tables of the active modules, the routes, the login, a super admin, the media disk and
(with audit on) the proxy setup. Each problem has a `fix`; the exit code is non-zero on a failure. The guide for an agent is
`resources/ai/INTEGRATION.md` in the package (tested with a fresh agent that only had that file), and `resources/boost/guidelines/core.blade.php` is read by Laravel Boost.
The screens: see [Screens and themes](Screens-and-themes). `MANAGER_UI=none` leaves only the JSON routes.
Behind a proxy: set up trusted proxies before switching on the audit log, or every visitor looks like one address.
+30
@@ -0,0 +1,30 @@
# Screens and themes
The package brings its own screens: a small Vue app on the JSON routes, built and committed in `resources/dist`, and served by the package
(`/manager/_assets/...`). A site needs no Node and no publish step. A browser that opens a manager address gets the page; a request that asks
for JSON gets the data.
| Module | Screens |
|---|---|
| core | login, logout, profile (name, password, theme), dashboard, menu |
| users | accounts, groups with permissions |
| media | library with upload, edit and picker (used for covers) |
| posts | list, form, categories and tags |
| pages, reviews | read-only lists (the modules are skeletons) |
| audit | log with filters, bans, rules, notes |
| statistics | report with periods, comparison, lists, heatmap, programs, CSV |
Switch off with `MANAGER_UI=none` (an app that builds its own screens on the JSON routes). Text is English, Dutch is included; the language is the app locale.
## Themes
- Built in: `dark` and `light`. `MANAGER_THEME` is what everyone sees until they choose.
- Per account: `MANAGER_USER_THEMES=true` (default) lets each account pick a theme in its profile (table `manager_user_settings`).
- The house style of a site: `php artisan manager:make-theme acme --brand=#e4002b --name="Acme" --logo=/img/logo.svg --font="Inter, sans-serif" --radius=0.5rem [--light]`
writes `resources/manager-themes/acme.json`; set `MANAGER_THEME=acme`. Themes can also be listed in `manager.themes`.
- A theme is colours (`ink`, `panel`, `panel2`, `line`, `muted`, `text`, `brand`, `brand_alt`), a radius, two fonts, a name and a logo. Every
value is checked before it goes into the page, so a theme file cannot put CSS or markup in it.
## Working on the screens
Sources are in `ui/` (Vue 3, TypeScript, Tailwind 4, Vite). `npm ci && npm run build` writes `resources/dist`; commit it. PR CI type-checks and fails when the committed bundle is out of date.
+1
@@ -3,6 +3,7 @@
- [[Home]]
- [[Installation]]
- [[Modules]]
- [[Screens and themes]]
- [[Configuration]]
- [[Permissions]]
- [[Privacy]]