feat: Demo-Modus — UI ohne Login durchklicken - #7
Merged
Conversation
- src/lib/demo.ts: zentraler Demo-State, Mock-User + 7 Mock-Listings - Hooks (use-auth, use-listings, use-profiles, use-matches, use-profile, use-push) pruefen isDemoMode() und liefern Mock-Daten statt Supabase-Calls - CRUD-Ops mutieren in Demo nur lokalen State (verfallen mit Reload) - Matching im Demo: clientseitige Haversine + Type/Seats-Check (kein RPC) - LoginForm: "Demo ohne Login →" Button (ghost, am unteren Ende) - AppShell: oranges Banner oben mit "Beenden"-Link bei aktivem Demo-Mode Geeignet zum Durchklicken des Vercel-Previews ohne Supabase-Setup. Demo-User ist Admin, kann also auch den Admin-Bereich oeffnen. https://claude.ai/code/session_01G1v5ZGvnrS5hb6eX2hfxKb
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fuegt einen Demo-Modus hinzu, damit die UI ohne echten Login durchgeklickt werden kann — nuetzlich solange Telegram-Auth + Supabase ENV-Variablen noch nicht produktiv konfiguriert sind.
Was ist drin
src/lib/demo.ts— zentraler Demo-State (localStorage-Flagkommit_demo), Mock-User "Max Mustermann" (Admin), 4 weitere Mock-Profile, 7 Mock-Listings ueber Boetzingen / Freiburg / EndingenisDemoMode()und liefern Mock-Daten statt Supabase-Calls:use-auth— DEMO_SESSION/USER/PROFILE direkt,signOutschaltet Demo aususe-listings— initialer State + CRUD aus Mock-Array, kein Realtime-Channeluse-profiles— Lookup aus DEMO_PROFILESuse-matches— clientseitige Haversine + Type/Seats-Check (kein RPC)use-profile—updateProfileno-opuse-push—isSupported=falselogin-form.tsx— "Demo ohne Login →" Button (ghost, am unteren Ende)app-shell.tsx— oranges Banner oben "Demo-Modus — Aenderungen werden nicht gespeichert" mit "Beenden"-LinkTest plan
*.supabase.co-Requests waehrend Demo-Modehttps://claude.ai/code/session_01G1v5ZGvnrS5hb6eX2hfxKb
Generated by Claude Code