Customer feedback round (4 items):
- Packages: one-click "Sichtbar/Ausgeblendet" toggle per package (saved
immediately). Hidden packages disappear from the model page; the tier
look of the remaining cards is ranked across all packages so it stays
stable.
- Packages: badge per card (Empfohlen, Am beliebtesten, Tipp, Coming soon
or custom text) plus an optional video link shown as "Zum Video". Legacy
is_featured maps to "Empfohlen".
- New download area (/downloads + Admin -> Downloads): upload with
progress, inline audio player, allow-listed file types, optional access
password, new permission downloads.manage. Files live in
api/uploads/downloads/ (gitignored, created at runtime).
- Performance:
- SetupGate no longer refetches and remounts the whole app on every
navigation.
- Page loader waits only for pending API calls and above-the-fold images
(fixes an 8 s hang on /leistungen caused by lazy images inside the
hidden container).
- Admin pages lazy-loaded; icon library moved out of the main bundle
(initial JS 2.2 MB -> 0.48 MB).
- Background video loads only near the viewport and was re-encoded to
720p (32 MB -> 8.5 MB).
- Visitors without a session cookie get no PHP session, so their parallel
API requests no longer queue on the session lock.
- index.html is served with Cache-Control: no-cache so browsers don't
keep a stale build after deploys.
- Fonts (Barlow, Barlow Condensed, Michroma) are self-hosted instead of
loaded from Google Fonts; the default privacy policy mentions this, lists
all local storage uses and uses the new TDDDG name.
- A code update that adds a table no longer sends the site into the setup
wizard while an admin exists.
Run "Datenbankstruktur aktualisieren" after deploying (new package
columns, downloads table, app_settings.downloads_password).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 6 of the dashboard roadmap - the largest and riskiest item, since
it overwrites live production code. Pulls the current main branch from
the public Gitea repo over plain HTTPS (archive zip download + REST API
for commit info) and applies it to the live hifi/ tree - no SSH,
git binary, exec(), or shell_exec() anywhere, so it works on plain
shared PHP hosting with no CI/deploy pipeline (exactly the hosting this
site actually runs on, per DEPLOY.md's manual-FTP fallback).
Six independent endpoints (status/check/download/extract/backup/apply)
instead of one big request, mirroring the existing multi-step
SetupController pattern - this app has no job-queue infrastructure, and
a single ~127MB download+extract+backup+copy is the most likely way to
hit an unknown host's max_execution_time or reverse-proxy timeout.
GitUpdateService.php does the actual work; UpdateController.php is a
thin adapter that marks each step in-progress/failed in a new gitignored
update-state.php (same convention as db.php) so a crashed step shows as
failed rather than stuck, and a retry starts clean.
Security-critical bits:
- The backup zip necessarily contains db.php (must be fully restorable),
so it lives under hifi/_update/ behind a "Require all denied" .htaccess
written the instant the directory is created, and hifi/_update/ was
added to .gitignore in this same commit, before any code that could
write into it - both needed since a physically-existing file bypasses
this app's SPA-fallback/API rewrite rules entirely.
- Only hifi/'s own subtree is extracted from the archive (hifi-src/ and
everything else ignored) via a wrapper-folder-prefix detected at
runtime, not hardcoded.
- Copy-then-prune (not copy-only) across the whole hifi/ tree, since
Vite renames JS/CSS chunks on every build and a copy-only updater
would let stale chunks accumulate forever - guarded by a denylist
(db.php, setup.php, ga-service-account.json, update-state.php,
api/uploads/, plus local Claude-tooling dirs) that must never be
touched in either direction.
- index.html is swapped in last via copy+rename (near-atomic), after
the new hashed assets it references are already fully in place.
- Reuses SchemaController's existing migration logic as the last apply
step (extracted into a new runMigration() so it's callable without
Http::send()/exit ending the response early) and app_settings'
existing maintenance-mode column to show visitors a maintenance page
during the brief apply window, restoring whatever maintenance state
existed before the update ran (not just forcing it off).
Gated behind a new, narrower system.update permission (not the broader
settings.manage), with its own settings tab hidden from anyone lacking
it - unlike this app's usual "everyone with settings.manage sees every
tab" pattern, since this one can overwrite the whole site.
Verified in isolation (synthetic zip + fixture directories in a scratch
folder, not the real hifi/ tree): wrapper-folder detection and
selective hifi/-subtree extraction, and copy+prune with denylist
enforcement. Not yet verified: behavior on an actual shared-hosting
target (max_execution_time, ZipArchive availability, outbound HTTPS
egress, disk quota vs disk_free_space()) - per the plan, validate
against the Plesk test server from DEPLOY.md before ever running this
against a real client site. Also enabled the php_zip extension in the
local XAMPP php.ini, since it was disabled and this feature needs it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The client's hosting (All-Inkl) has no GitHub integration, so the
two-branch model - source on main, CI force-pushing the built hifi/
folder to a machine-generated deploy branch for Plesk to pull - doesn't
work there. main is now simultaneously the source of truth and the
deployable artifact:
- hifi/index.html, hifi/assets/, favicon, robots.txt and hifi/api/vendor
are committed instead of git-ignored. Secrets (db.php, setup.php,
ga-service-account.json) stay ignored as before.
- A prebuild script wipes hifi/assets + index.html before every vite
build, so the tree always holds exactly the current build - this was
the stale-hash-chunk problem that originally justified ignoring the
output (emptyOutDir stays false to protect hifi/api). Builds are
deterministic: rebuilding without source changes yields zero diffs.
- .github/workflows/build-deploy.yml is deleted; nothing writes to the
deploy branch anymore. The convention is to run npm run build before
committing (DEPLOY.md documents the workflow, the All-Inkl setup via
SSH clone/pull with docroot on <checkout>/hifi, and the Plesk test
server switch from deploy to main).
The remote deploy branch is left in place for now so the Plesk test
server keeps working until its Git source is switched to main; it can
be deleted afterwards.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New Dashboard section shows users/sessions/pageviews for the last 7
days plus top pages, fetched server-side via the GA4 Data API using a
Google service account (JWT-bearer flow, no OAuth consent screen
needed) - the same approach WordPress plugins like MonsterInsights use
to surface GA stats inline instead of linking out to analytics.google.com.
Backend: GoogleAnalyticsReporting support class (signs its own JWT with
openssl, exchanges it for an access token, calls runReport - no need
for the full Google API PHP client library for one endpoint) and
AnalyticsController (settings show/update, report fetch). The service
account JSON key is written to a gitignored config file, mirroring the
existing db.php/setup.php pattern for environment-specific secrets.
Admin: new "Dashboard-Anbindung" section in Website Settings (Property
ID + service account JSON paste, independent save action). Dashboard
gracefully shows a setup hint when not yet configured instead of an
error.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Baut bei jedem Push auf main automatisch das PHP-Backend (composer
install) und das React-Frontend (npm run build), und veroeffentlicht
das fertige Ergebnis im "deploy"-Branch. Plesk kann diesen Branch
ziehen, ohne selbst Composer/npm ausfuehren zu muessen - kein manuelles
Hochladen von Build-Artefakten mehr noetig.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Statt Env-Var-gesteuertem Dualbetrieb (lokal /hifi, live /) läuft jetzt
alles einheitlich unter der Domain-Wurzel - auch lokal (siehe neuer
VirtualHost auf Port 8080 in der Apache-Konfiguration, unabhängig von
Port 80 mit /hifi). Dabei einen Doppel-Slash-Bug in der Routenberechnung
gefunden und behoben (base_path '/' + '/api' ergab faelschlich '//api').
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Bisher war /hifi an mehreren Stellen fest einprogrammiert (vite base,
Router basename, API-Client, Upload-URLs, .htaccess). Fuer den geplanten
Deploy auf IONOS unter der Domain-Wurzel wird das jetzt ueber
VITE_BASE_PATH (Frontend-Build) bzw. eine optionale base_path.php
(Backend, gleiches Muster wie db.php/setup.php) gesteuert - lokal ohne
diese Werte bleibt alles unveraendert bei /hifi.
.htaccess.ionos enthaelt die Root-Domain-Variante fuer den CI-Build.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Passwortgeschuetzter Assistent fuer die Ersteinrichtung auf einem neuen
Server: Datenbank-Zugangsdaten testen & speichern, Datenbankstruktur
anlegen, ersten Admin-Account erstellen. Sperrt sich danach dauerhaft
selbst, sobald ein Admin-Account existiert.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>