Fujitsu-ZIPPIN/
├── src/
│ ├── pages/.html ← HTML pages (Handlebars partials)
│ │ ├── profile.html ← User profile page (all authenticated)
│ │ └── onboarding.html ← Onboarding & name edit flow
│ ├── partials/ ← Shared partials (topbar, sidebar, etc.)
│ ├── js/layout.js ← Shared JS (nav, RBAC, polling, toasts)
│ ├── js/i18n.js ← Internationalization (i18next)
│ ├── js/pages/.js ← Page-specific logic (ES modules)
│ │ ├── profile.js ← Profile page logic
│ │ └── onboarding.js ← Onboarding page logic
│ ├── styles/main.css ← All CSS (tokens + components + dark mode)
│ └── locales/en.json, fr.json ← Translation files
├── functions/
│ ├── api/_middleware.js ← Auth, CSRF, rate limiting
│ ├── api/access.js ← Access management CRUD (users, roles, teams)
│ ├── api/access/role.js ← User profile & permissions
│ ├── api/onboarding.js ← Onboarding & team requests
│ ├── api/setup.js ← DB migrations (v1–v10)
│ ├── api/sites.js ← Site listing & filtering
│ ├── api/config.js ← App configuration & links
│ ├── api/dashboard-config.js ← Per-user widget layout
│ ├── api/operations.js ← TUGA RPi proxy
│ ├── api/api-health.js ← Health checks (17+ endpoints)
│ ├── api/unifi.js ← UniFi Cloud API proxy
│ ├── api/trigger-settings.js ← Alert thresholds config
│ ├── api/trigger-alerts.js ← Active alerts
│ ├── api/history.js ← Historical snapshots
│ ├── api/langflow.js ← Langflow AI proxy
│ ├── api/messages.js ← AI chat CRUD
│ ├── api/logs.js ← Activity logging
│ ├── api/secrets.js ← Credential retrieval
│ ├── api/receipt-api/logs.js ← Receipt metrics (push from Azure)
│ │ └── api/receipt-api/stats.js ← Receipt analytics
│ └── lib/auth-utils.js ← Shared auth utilities
├── workers/cron-stats/index.js ← Cron worker (polling + triggers)
├── vite.config.js ← Build config (Handlebars + multi-page)
└── index.html ← Entry point (redirects to /pages/home.html)