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
4.8 KiB
4.8 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 | 01 | execute | 1 |
|
true |
|
|
Purpose: Establish the technical foundation required for all authentication features in Sage. Output: Working Flutter app that can communicate with Supabase backend using secure configuration.
<execution_context>
@/.opencode/get-shit-done/workflows/execute-plan.md
@/.opencode/get-shit-done/templates/summary.md
</execution_context>
Run `flutter pub get` to install dependencies.
flutter pub get completes successfully and all dependencies resolve
Flutter project exists with all required Supabase dependencies installed
Create secure Supabase configuration
lib/core/constants/supabase_constants.dart, .env
Create environment configuration:
1. Create .env file with SUPABASE_URL and SUPABASE_ANON_KEY placeholders
2. Create lib/core/constants/supabase_constants.dart that loads environment variables using flutter_dotenv
3. Add .env to .gitignore to prevent committing secrets
4. Provide clear instructions in comments about where to get the values
Constants file should export:
- supabaseUrl
- supabaseAnonKey
Environment variables load correctly without exposing sensitive data in version control
Secure configuration system exists with placeholder values ready for user setup
Initialize Supabase in main.dart
lib/main.dart
Update lib/main.dart to:
1. Import required packages (supabase_flutter, flutter_dotenv)
2. Load environment variables using dotenv.load()
3. Initialize Supabase in main() before runApp()
4. Use SharedPreferencesLocalStorage for session persistence (default, secure enough for v1)
5. Handle initialization errors gracefully
6. Create basic MyApp widget structure
Follow the PKCE flow pattern from research.
flutter run starts without Supabase initialization errors
Flutter app initializes Supabase client successfully on startup
1. Flutter project runs without errors (`flutter run`)
2. Supabase client initializes without throwing exceptions
3. Environment variables are loaded securely (not hardcoded)
4. Project structure follows recommended architecture from research
<success_criteria> Flutter app starts successfully, Supabase client is initialized and ready to handle authentication operations, and configuration is secure and maintainable. </success_criteria>
After completion, create `.planning/phases/01-authentication/01-01-SUMMARY.md`