Commit Graph

9 Commits

Author SHA1 Message Date
Dani B
1410e32005 feat(01-11): implement auth-aware router and splash screen
- Created AppRouter with GoRouter for declarative navigation
- Added protected routes that redirect to login if not authenticated
- Implemented splash screen with loading state and auth checking
- Set up route definitions for login, signup, home, and splash
- Added error handling for navigation failures
- Includes authentication state-based redirects

Files modified:
- lib/core/router/app_router.dart
- lib/features/authentication/presentation/pages/splash_page.dart
2026-01-28 11:05:02 -05:00
Dani B
be4607e0eb feat(01-11): create authenticated home page
- Created HomePage widget with user welcome message
- Added logout button placeholder
- Displays user email and avatar when authenticated
- Includes placeholder for future inventory features
- Responsive design with proper styling

- Files modified: lib/features/home/presentation/pages/home_page.dart
2026-01-28 10:56:32 -05:00
Dani B
294d53774b feat(01-04): implement AuthRepository with Supabase
- Complete AuthRepositoryImpl using supabase.auth methods
- Handles all auth operations: signUp, signIn, signOut, resetPassword
- Maps Supabase User to AuthUser model
- Converts Supabase errors to custom exceptions
- Implements OAuth and anonymous sign-in methods
- Includes proper error handling and null safety
- Follows repository pattern with clean architecture
2026-01-28 10:36:54 -05:00
Dani B
7b3d1bbd63 feat(01-03): create signup page with password confirmation
- Complete registration screen with email/password/confirm password fields
- Integrated AuthForm widget for consistent form handling
- Terms of Service and Privacy Policy checkboxes with placeholder dialogs
- Password confirmation validation matching requirement
- Sign in navigation to login screen
- Loading states during registration process
- Responsive design matching login page layout
- Error handling for duplicate emails and registration failures

Authentication UI components complete and ready for backend integration.
2026-01-28 10:13:13 -05:00
Dani B
8d8ee17586 feat(01-03): create login page with form integration
- Complete login screen with email/password authentication form
- Integrated AuthForm widget for consistent form handling
- Added forgot password placeholder functionality
- Sign up navigation to registration screen
- Loading states during authentication process
- Responsive design with SafeArea and centered layout
- App icon and welcome messaging
- Error handling for invalid credentials

Ready for authentication logic integration.
2026-01-28 10:09:34 -05:00
Dani B
122b45e04d feat(01-03): create reusable auth components
- AuthButton widget with loading states and variants (primary, secondary, outline)
- AuthForm widget with email/password fields and real-time validation
- Password visibility toggle functionality
- Responsive design with proper accessibility labels
- Form validation for email format and password strength

Components ready for use in login/signup pages.
2026-01-28 10:05:05 -05:00
Dani B
58f2b5bce4 fix(01-02): resolve compilation errors in auth models
- Fixed import path in AuthRepository to reach core errors
- Updated AuthUser.fromSupabase() to handle DateTime parsing safely
- Added UnknownAuthException for fallback error handling
- Fixed null-aware operators in AuthUser model
- All authentication files now compile without errors
2026-01-28 09:34:56 -05:00
Dani B
06e3ea48fb feat(01-02): create AuthRepository interface
- Abstract AuthRepository class defines all authentication operations
- Core methods: signUp, signIn, signOut, resetPassword, getCurrentUser
- Stream-based auth state changes with authStateChanges()
- Profile management: updateProfile, sendEmailVerification
- Security features: changePassword, deleteAccount, refreshSession
- OAuth support: signInWithOAuth, signInAnonymously
- Comprehensive documentation with exception specifications
2026-01-28 09:14:37 -05:00
Dani B
c45bb22971 feat(01-02): create AuthUser data model
- AuthUser class wraps Supabase User for clean architecture
- Includes fromSupabase() factory constructor for conversion
- Provides copyWith() method for immutable updates
- Contains essential fields: id, email, created_at, email_verified
- Optional fields: display_name, avatar_url, last_sign_in_at
- Proper null safety and equality operators implemented
2026-01-28 09:09:50 -05:00