Skip to content

feat(auth): Story 2.3 - User Authentication (Login/Logout)#2

Merged
BradleyFestraets merged 2 commits intomainfrom
feature/story-2.3-user-authentication
Nov 30, 2025
Merged

feat(auth): Story 2.3 - User Authentication (Login/Logout)#2
BradleyFestraets merged 2 commits intomainfrom
feature/story-2.3-user-authentication

Conversation

@BradleyFestraets
Copy link
Owner

Summary

Implements complete user authentication flow for Story 2.3 of Epic 2.

Changes

Login Page Enhancements

  • Updated login form using shadcn/ui components (Card, Input, Label, Button)
  • Added 'Forgot Password?' link for password recovery flow
  • Improved visual design with Card container and proper styling
  • Updated registration link to point to /register/venue

Logout Implementation

  • Created \LogoutButton\ client component using next-auth/react signOut
  • Redirects to /login after logout
  • Styled with secondary button variant and LogOut icon

Dashboard Infrastructure

  • Created authenticated dashboard layout with header navigation
  • User menu dropdown showing name and email with logout option
  • Navigation links: Dashboard, Menu, Orders, Staff, Settings
  • Auth guard that redirects unauthenticated users to login
  • Venue context from URL slug with authorization checks

Dashboard Pages

  • Main venue dashboard with stats cards (tables, revenue, orders, rating)
  • Quick action buttons for common operations
  • Venue information display (address, contact, website, hours)
  • Multi-venue selector page for users with access to multiple venues

Acceptance Criteria

  • Login form exists with email/password fields
  • Logout button accessible from dashboard
  • Redirect to dashboard after login
  • Redirect to login after logout
  • Session management via NextAuth database strategy

Testing

  • All 6 unit tests passing
  • TypeScript and ESLint checks passing

Files Changed

  • \src/app/login/page.tsx\ - Enhanced login form with shadcn/ui
  • \src/components/auth/LogoutButton.tsx\ - New logout button component
  • \src/app/dashboard/[slug]/layout.tsx\ - New dashboard layout
  • \src/app/dashboard/[slug]/page.tsx\ - Main venue dashboard
  • \src/app/dashboard/page.tsx\ - Multi-venue selector

Story: 2.3 - User Authentication (Login/Logout)
Epic: 2 - Venue Management & User Onboarding

Implements complete user authentication flow with enhanced UI components:

Login Page Enhancements:
- Updated login form using shadcn/ui components (Card, Input, Label, Button)
- Added 'Forgot Password?' link for password recovery flow
- Improved visual design with Card container and proper styling
- Updated registration link to point to /register/venue

Logout Implementation:
- Created LogoutButton client component using next-auth/react signOut
- Redirects to /login after logout
- Styled with secondary button variant and LogOut icon

Dashboard Infrastructure:
- Created authenticated dashboard layout with header navigation
- User menu dropdown showing name and email with logout option
- Navigation links: Dashboard, Menu, Orders, Staff, Settings
- Auth guard that redirects unauthenticated users to login
- Venue context from URL slug with authorization checks

Dashboard Pages:
- Main venue dashboard with stats cards (tables, revenue, orders, rating)
- Quick action buttons for common operations
- Venue information display (address, contact, website, hours)
- Multi-venue selector page for users with access to multiple venues

Acceptance Criteria Met:
 Login form exists with email/password fields
 Logout button accessible from dashboard
 Redirect to dashboard after login
 Redirect to login after logout
 Session management via NextAuth database strategy

Story-2.3
@vercel
Copy link
Contributor

vercel bot commented Nov 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
crowdiant-ai Ready Ready Preview Comment Nov 30, 2025 9:37am

@BradleyFestraets BradleyFestraets merged commit 3c46d1d into main Nov 30, 2025
2 of 3 checks passed
@BradleyFestraets BradleyFestraets deleted the feature/story-2.3-user-authentication branch November 30, 2025 09:37
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