# Tenant Admin Onboarding Fusion TODO
Created: 2025-10-10
Owner: Codex (handoff)

## Context
- Blend the immersive welcome + ordering journey from fotospiel-tenant-app/tenant-admin-app with the new management modules under /event-admin.
- Align with the detailed PRP (docs/prp/tenant-app-specs/*.md) and onboarding plan notes (docs/process/changes/2025-10-10-tenant-admin-onboarding-plan.md).
- Preserve existing dashboard/events/tasks/billing screens while introducing a guided first-run experience and mobile-first polish.

## References
- docs/prp/tenant-app-specs/README.md
- docs/prp/tenant-app-specs/pages-ui.md
- docs/prp/tenant-app-specs/functional-specs.md
- docs/process/changes/2025-10-10-tenant-admin-onboarding-plan.md
- resources/js/admin/router.tsx
- resources/js/admin/components/AdminLayout.tsx
- resources/js/admin/pages/DashboardPage.tsx
- fotospiel-tenant-app/tenant-admin-app/src/App.tsx (legacy welcome flow)

## Priority: Now ( unblock design + scope )
- [x] Audit the legacy Capacitor app assets (intro carousel, package picker, CTA cards, animation helpers) and list what should be ported or rebuilt in Tailwind/React. Capture findings in docs/process/changes/2025-10-10-tenant-admin-onboarding-plan.md with component parity notes. See "Component Audit - 2025-10-10".
- [x] Define shared onboarding design primitives inside Laravel PWA (e.g. gradient backgrounds, full-height hero layout, swipeable stepper). Propose implementation sketch for new components such as TenantWelcomeLayout and WelcomeStepCard. Documented under "Proposed Laravel PWA Welcome Primitives".

## Priority: Next ( build the welcome flow )
- [x] Introduce /event-admin/welcome/* routes and constants, plus a lightweight layout distinct from AdminLayout. Update resources/js/admin/router.tsx and resources/js/admin/constants.ts accordingly.
- [x] Implement onboarding steps (Hero, HowItWorks, PackageSelection, OrderSummary, FirstEventSetup) that reuse existing APIs (getTenantPackagesOverview, createEvent, checkout helpers). Landing, package, summary, and setup screens are live; summary links to Billing for payments, direct in-flow checkout still TBD.
- [x] Persist onboarding progress (e.g. useOnboardingProgress in auth context or dedicated store) and add guard logic so tenants without active events land on the welcome flow after login. Provide a way to resume the flow from the dashboard CTA.
- [x] Refresh DashboardPage.tsx to surface the new welcome CTA ("Plan your first event") and quick links back into the guided flow without breaking existing management cards. Guided setup card and header action now link to `/event-admin/welcome`.

## Priority: Later ( polish + delivery )
- [x] Align theming, typography, and transitions with the legacy mobile look (consider porting key styles from fotospiel-tenant-app/tenant-admin-app/src/styles). Tenant admin layout now reuses marketing brand palette, fonts, and gradient utilities; Tailwind variables capture the shared tokens.
- [x] Review PWA manifest/offline setup so die kombinierte Welcome+Management-Experience TWA-/Capacitor-ready ist (Manifest + `admin-sw.js` dokumentiert).
- [x] Extend docs: PRP-Onboarding-Abschnitte aktualisiert, Screenshots unter `docs/screenshots/tenant-admin-onboarding/` ergänzt, Testscope notiert.
- [x] Add automated coverage: Vitest + Testing Library für Welcome Landing, Dashboard-Guard und Checkout-Komponenten; `npm run test:unit` führt Suite aus.
- [x] Finalise direct checkout: Paddle-Flows markieren Fortschritt, API-Mocks + Unit-Tests decken Erfolgs- und Fehlerpfade ab.
- [x] Lokalisierung ausbauen: Landing-, Packages-, Summary- und Event-Setup-Screens sind nun DE/EN übersetzt; Copy-Review für weitere Module (Tasks/Billing/Members) bleibt offen.

## Risks & Open Questions
- Confirm checkout UX expectations (Stripe vs Paddle) before wiring package purchase into onboarding.
- Validate whether onboarding flow must be localized at launch; coordinate mit den neuen i18n JSONs und fehlenden Übersetzungen.
- Determine deprecation plan for fotospiel-tenant-app/tenant-admin-app once the merged flow ships.

## Priority: Immediate (Tenant admin refresh 2025-10-18)
- [x] Replace the `/event-admin/login` landing with a public welcome screen that explains Fotospiel for non-technical couples, keeps the login button, and updates `resources/js/admin/router.tsx`, `constants.ts`, and new `WelcomeTeaserPage`.
- [x] Align authentication by migrating the tenant-admin flow to Sanctum PATs, dropping `VITE_OAUTH_CLIENT_ID`, updating the exchange endpoints, and documenting the env expectations in `docs/prp/tenant-app-specs/api-usage.md` / `13-backend-authentication.md`.
- [x] Rebrand the Filament tenant panel away from “Admin” by adjusting `AdminPanelProvider` (brand name, home URL, navigation visibility) and registering a new onboarding home page.
- [x] Build the Filament onboarding wizard (welcome → task package selection → event name → color palette → QR layout) with persisted progress on the tenant record and guards that hide legacy resource menus until completion.
- [x] Expose QR invite generation in Filament via a dedicated page/component that reuses the join-token flow from `EventDetailPage.tsx`, ensuring tokens stay in sync between PWA and Filament.
- [x] Update PRP/docs to cover die neue Welcome Journey, OAuth-Ausrichtung, Filament-Onboarding und QR-Tooling; Regression Notes + Tests dokumentiert.

