Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Guest Mode Support #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add Guest Mode Support #31

wants to merge 2 commits into from

Conversation

VDuda
Copy link
Member

@VDuda VDuda commented Feb 13, 2025

Overview

This PR implements guest mode functionality, allowing users to interact with the application without requiring authentication. It includes a unified authentication system that handles both guest and authenticated users seamlessly.

Commits

  • f7d63d2 - feat: implement guest mode support
  • feb6dc3 - refactor: implement unified auth system for guest and clerk users

Key Changes

Authentication System

  • Created custom useAuth hook to handle both guest and Clerk authentication
  • Implemented unified auth utilities that work for both auth modes
  • Prevented Clerk initialization during guest mode for better performance
  • Updated components to use the new auth system

Guest Mode Infrastructure

  • Added guest user support to Prisma schema with migrations
  • Implemented guest session management with secure cookie handling
  • Created guest banner component for clear user feedback
  • Modified notebook routes to support guest user access

UI/UX Improvements

  • Updated user navigation with guest-specific UI elements
  • Added clear visual indicators for guest mode
  • Maintained consistent UX across both auth modes

Technical Notes

  • Guest sessions expire after 1 week
  • Guest data is preserved in the database but isolated from authenticated users
  • Clerk is only initialized for non-guest users
  • Migration includes new fields: sessionId and isGuest for User model

@VDuda VDuda force-pushed the feat/vlad/guest-mode branch from a3a6c62 to 44b6ed9 Compare February 15, 2025 20:33
- Add credit status component with usage tracking
- Add guest mode indicator with sign-in benefits
- Update middleware to support guest mode access
- Add mock data for testing UI components
- Add Progress component from Radix UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant