Commit graph

7 commits

Author SHA1 Message Date
Maaxxs
96aa799d43 Consolidate the site onto a single branch: main now carries the build output
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>
2026-07-20 06:59:33 +02:00
Maaxxs
24df7a602c Add Google Analytics dashboard widget (GA4 Data API integration)
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>
2026-07-07 01:57:32 +02:00
Maaxxs
faf85ee68a Add GitHub Actions workflow to auto-build and publish to deploy branch
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>
2026-07-05 16:05:19 +02:00
Maaxxs
75684df837 Simplify to always run at domain root instead of dual /hifi vs / support
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>
2026-07-05 15:04:39 +02:00
Maaxxs
618a32182c Make base path configurable for root-domain deployment (IONOS)
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>
2026-07-05 14:23:30 +02:00
Maaxxs
fe6b463135 Add first-time setup wizard (/setup)
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>
2026-07-05 14:06:12 +02:00
Maaxxs
f3ab7d0816 Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend)
React/Vite Frontend (hifi-src) + PHP/MariaDB Backend (hifi/api) fuer
den Car-Hifi Umbau-Shop HifiPlanet in Amorbach, inkl. Admin-Panel,
2FA, Wartungsmodus, Cookie-Consent und rechtlichen Pflichtseiten.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-05 13:37:06 +02:00