Phase 1: Authentication & Account Basics - 7 plans in 4 waves - Covers AUTH-01 through AUTH-05 requirements - Foundation for household features in Phase 2 - Ready for execution
6.9 KiB
6.9 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, user_setup, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | user_setup | must_haves | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01-authentication | 04 | execute | 2 |
|
|
true |
|
Purpose: Connect UI components to Supabase authentication, manage auth state globally, and handle navigation based on user authentication status. Output: Working authentication system with session persistence and protected routes.
<execution_context>
@/.opencode/get-shit-done/workflows/execute-plan.md
@/.opencode/get-shit-done/templates/summary.md
</execution_context>
1. SplashPage that:
- Shows while checking initial auth state
- Navigates to login or home after auth check
- Has proper loading indicator
- Handles app startup sequence
2. Router configuration that:
- Uses GoRouter for declarative routing
- Has protected routes (redirect to login if not authenticated)
- Has public routes (login, signup, password reset)
- Listens to AuthProvider for auth state changes
- Includes proper route definitions:
- / → redirect based on auth state
- /login → login page
- /signup → signup page
- /home → protected home route (placeholder)
- Handles deep linking properly
- Includes proper error handling for navigation
Navigation correctly redirects based on authentication status and all routes are accessible
Complete navigation system that protects routes and responds to authentication changes
Integrate auth system with main app
lib/main.dart
Update main.dart to:
1. Wrap MyApp with appropriate providers (Riverpod/ChangeNotifierProvider)
2. Initialize AuthProvider with AuthRepositoryImpl
3. Configure router with auth state integration
4. Set up proper error boundaries
5. Ensure proper initialization order
6. Add proper app structure with MaterialApp.router
7. Configure theme and other app-level settings
8. Ensure proper disposal of resources
App starts with splash screen, properly checks auth state, and navigates to appropriate initial screen
Complete app integration with authentication system
1. Authentication repository successfully connects to Supabase and handles all auth methods
2. State management responds correctly to auth state changes
3. Navigation system properly protects routes and redirects based on auth status
4. Session persistence works across app restarts
5. Error handling provides user-friendly feedback
6. Loading states work properly during authentication operations
<success_criteria> Complete authentication system with Supabase integration, state management, and protected navigation ready for UI connection. </success_criteria>
After completion, create `.planning/phases/01-authentication/01-04-SUMMARY.md`