Files

24 lines
2.3 KiB
Markdown

# Platform folder
Everything that makes this installation one platform, outside the application's git repository. Without this
folder, or without one of its parts, the installation runs on the files in the code. Background and examples:
`references/MULTI_PLATFORM_INSTANCES.md`.
| Path | What | Behaviour |
|---|---|---|
| `config.php` | The platform config (copy of `config/timebank-default.php.example`, or of the active `config/<name>.php`) | Replaces `config/<TIMEBANK_CONFIG>.php`. `php artisan config:merge` adds new keys to it. |
| `theme.php` | One theme: `['id' => 'myplatform', 'name' => ..., 'colors' => ..., 'typography' => ..., 'logos' => ...]` | Becomes the active theme. |
| `lang/<locale>.json` | Changed texts, only the keys you change, e.g. `{"Welcome": "Welcome to My Platform"}` | Merged key by key. Placeholders such as `@PLATFORM_NAME@` keep working. |
| `lang/<locale>/<group>.php` | Changed texts of a PHP translation group | Merged key by key. Changing `routes.php` changes URLs. |
| `lang/vendor/<package>/<locale>/<group>.php` | Changed package texts (e.g. `wirechat`) | Merged key by key. |
| `views/...` | Changed templates, e.g. `views/emails/...`, `views/logos/<theme>.blade.php` | Replace the whole template. Copy with `php artisan platform:override <view>`. |
| `views/mail/html/...` | The email layout: header, footer, button, panel | Copy with `php artisan platform:override mail::html.header`. |
| `views/vendor/<package>/...` | Package templates | Copy with `php artisan platform:override <package>::<view>`. |
| `public/` | `favicon.ico`, `favicon-32x32.png`, `favicon-16x16.png`, `apple-touch-icon.png`, `mail-logo.png`, `mail-logo-inverted.png`; optional `favicon.svg`, `favicon-96x96.png`, `site.webmanifest`, `og-image.png` (preview for shared links, about 1200x630) | Served at `/platform/...` after `php artisan platform:link` (deploy.sh runs it). Optional files are linked only when present. |
- No secrets here: passwords and keys stay in `.env`. Then this folder can live in a private git repository of its
own, which is also its off-site copy (the server's backups stay on the server).
- After a change: `php artisan view:clear` for templates; restart the queue workers and Reverb for config changes.
- `php artisan platform:check` reports overrides that went stale: texts the code reworded, templates whose
original changed since the copy.