Add guest/try-now option — play without account #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The app currently requires Google or GitHub login before users can do anything. This creates friction — new users can't see what the app offers before committing to an account.
What to do
Allow anonymous users to play a limited singleplayer quiz without signing in.
Files to change
apps/api/src/routes/gameRouter.ts— currently all game routes go throughrequireAuthmiddleware. Make auth optional on game routes, or create a separate guest route.apps/api/src/middleware/authMiddleware.ts— consider adding anoptionalAuthmiddleware that attaches user info if present but doesn't reject anonymous requests.apps/web/src/routes/play.tsx— thebeforeLoadguard redirects to/loginif no session. Change to allow anonymous access.apps/web/src/routes/index.tsxorlogin.tsx— add a 'Try without account' button that navigates directly to/play.Acceptance criteria
Notes
The
GameSessionStore(inapps/api/src/gameSessionStore/) is already anonymous — sessions are keyed by UUID, not user ID. No backend game logic changes should be needed.