Developer Documentation
v2.0 | Production-Ready
Moderne PWA mit Flask-Backend, Service Worker und Analytics.
┌─────────────────────────────────────────────────────────────┐
│ CLIENT (PWA) │
├─────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐ │
│ │ app.js │ │ sw.js │ │ IndexedDB │ │
│ │ (Main App) │ │(ServiceWorker)│ │ (Offline Queue) │ │
│ └──────┬───────┘ └──────┬───────┘ └────────┬─────────┘ │
│ └─────────────────┼────────────────────┘ │
│ ┌──────┴──────┐ │
│ │ Cache API │ │
│ └─────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
HTTPS / Push
│
┌─────────────────────────────────────────────────────────────┐
│ SERVER (Flask) │
├─────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐ │
│ │ Routes │ │ Push API │ │ Analytics │ │
│ │ (app.py) │ │ (VAPID) │ │ (Tracking) │ │
│ └──────┬───────┘ └──────┬───────┘ └────────┬─────────┘ │
│ └─────────────────┼────────────────────┘ │
│ ┌──────┴──────┐ │
│ │ SQLite DB │ │
│ └─────────────┘ │
└─────────────────────────────────────────────────────────────┘
| Layer | Tech | Purpose |
|---|---|---|
| Frontend | Vanilla JS | Zero deps, max perf |
| SW | Workbox-style | Cache, Push, Sync |
| Backend | Flask | API, Push, Analytics |
| Push | VAPID | iOS 16.4+, Android |
| DB | SQLite | Users, Events |
| Deploy | Coolify | CI/CD, Docker |
Web Push mit VAPID. iOS 16.4+, Android, Desktop.
iOS 16.4+Service Worker mit intelligenten Caching-Strategien.
100% OfflinePrivacy-first. Core Web Vitals, Engagement, Properties.
DSGVOOffline-Events automatisch synchronisieren.
AutoQuick Actions vom Homescreen.
PWAUser-kontrollierte SW-Updates.
UX| iOS | Support | Hinweis |
|---|---|---|
| 16.4+ | Voll | Web Push via PWA |
| 16.0-16.3 | Teil | Nur Notification API |
| <16.0 | Nein | - |
| Kategorie | Events |
|---|---|
| Core | app_open, app_installed |
| Engagement | scroll_depth, button_click, rage_click |
| Session | session_end, page_hidden, page_visible |
| Network | went_offline, went_online |
| Perf | web_vital_lcp, web_vital_inp, web_vital_cls |
| Event | Daten |
|---|---|
app_open |
source, is_installed, referrer |
session_end |
duration_seconds, pages_viewed |
scroll_depth |
percent, page |
| Event | Daten |
|---|---|
button_click |
button_id, button_text |
rage_click |
click_count, element_id |
| Property | Beispiel |
|---|---|
screen_width | 1920 |
timezone | Europe/Berlin |
connection_type | 4g |
is_standalone | true |
color_scheme | dark |
/api/push/vapid-public-key
VAPID Public Key abrufen
/api/push/subscribe
Push-Subscription registrieren
/api/push/send-test
Test-Notification senden
/api/analytics/track
Event tracken
/api/analytics/summary?days=7
Summary abrufen
/health
Health Check
| Asset | Strategie |
|---|---|
| HTML | Network-First |
| CSS, JS | Stale-While-Revalidate |
| Images | Cache-First |
| API | Network-Only |
| Header | Wert |
|---|---|
| CSP | default-src 'self' |
| X-Content-Type | nosniff |
| X-Frame | DENY |
| Referrer | strict-origin |