Files
Sage/.planning/phases/01-authentication/01-01-PLAN.md
Dani B f9150e04d5 docs(01): create phase 1 authentication plans
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
2026-01-28 00:26:56 -05:00

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
pubspec.yaml
lib/main.dart
lib/core/constants/supabase_constants.dart
.env
true
service why env_vars dashboard_config
supabase Authentication backend and database
name source
SUPABASE_URL Supabase Dashboard → Settings → API → Project URL
name source
SUPABASE_ANON_KEY Supabase Dashboard → Settings → API → anon/public key
task location
Configure redirect URLs for password reset Supabase Dashboard → Authentication → URL Configuration
truths artifacts key_links
Flutter project initializes with Supabase client
Environment variables are loaded securely
Supabase connection is established without errors
path provides contains
pubspec.yaml Flutter project dependencies supabase_flutter
path provides min_lines
lib/main.dart Supabase initialization 15
path provides min_lines
lib/core/constants/supabase_constants.dart Supabase configuration constants 10
path provides contains
.env Environment variables SUPABASE_URL
from to via pattern
lib/main.dart Supabase.initialize main() function Supabase.initialize
from to via pattern
lib/core/constants/supabase_constants.dart .env environment variable loading String.fromEnvironment|dotenv
Create Flutter project foundation with Supabase integration and secure configuration.

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>

@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/01-authentication/01-RESEARCH.md Initialize Flutter project with Supabase dependencies pubspec.yaml Create Flutter project if it doesn't exist. Add required dependencies to pubspec.yaml: - supabase_flutter: ^2.12.0 - flutter_dotenv: ^5.1.0 - go_router: ^13.0.0 - riverpod: ^2.5.0 - flutter_secure_storage: ^9.0.0
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`