Tasks completed: 3/3 - Initialize Flutter project with Supabase dependencies - Create secure Supabase configuration system - Initialize Supabase in main.dart SUMMARY: .planning/phases/01-authentication/01-01-SUMMARY.md USER-SETUP: .planning/phases/01-authentication/01-USER-SETUP.md
84 lines
2.2 KiB
Markdown
84 lines
2.2 KiB
Markdown
# Phase 1: User Setup Required
|
|
|
|
**Generated:** 2026-01-28
|
|
**Phase:** 01-authentication
|
|
**Status:** Incomplete
|
|
|
|
## Environment Variables
|
|
|
|
| Status | Variable | Source | Add to |
|
|
|--------|----------|--------|----------|
|
|
| [ ] | `SUPABASE_URL` | Supabase Dashboard → Settings → API → Project URL | `.env` |
|
|
| [ ] | `SUPABASE_ANON_KEY` | Supabase Dashboard → Settings → API → anon/public key | `.env` |
|
|
|
|
## Dashboard Configuration
|
|
|
|
- [ ] **Configure redirect URLs for password reset**
|
|
- Location: Supabase Dashboard → Authentication → URL Configuration
|
|
- Add: `com.example.sage://reset-callback` (adjust for your app scheme)
|
|
- Add: `https://your-domain.com/auth/callback` (for web deployment)
|
|
|
|
## Account Setup
|
|
|
|
1. **Create Supabase Project**
|
|
- Go to https://supabase.com/dashboard
|
|
- Click "New Project"
|
|
- Choose organization (create new if needed)
|
|
- Set project name: "Sage" or your preferred name
|
|
- Choose database password (save securely)
|
|
|
|
2. **Get Configuration Values**
|
|
- After project creation, navigate to Settings → API
|
|
- Copy "Project URL" (starts with https://)
|
|
- Copy "anon public" key (starts with eyJhb...)
|
|
|
|
3. **Configure Environment Variables**
|
|
```bash
|
|
# Copy .env.example to .env
|
|
cp .env.example .env
|
|
|
|
# Edit .env with your actual values
|
|
nano .env
|
|
```
|
|
|
|
4. **Verify Configuration**
|
|
```bash
|
|
# Test Flutter app with real credentials
|
|
flutter run
|
|
```
|
|
|
|
## Local Development
|
|
|
|
For local development with Flutter:
|
|
```bash
|
|
# Install dependencies (already done)
|
|
flutter pub get
|
|
|
|
# Run with real Supabase credentials
|
|
flutter run
|
|
```
|
|
|
|
## Verification
|
|
|
|
Once setup is complete, verify:
|
|
|
|
```bash
|
|
# Check environment variables are loaded
|
|
flutter test test/widget_test.dart
|
|
|
|
# Should see "Supabase initialized successfully" in console
|
|
# No authentication errors should occur
|
|
```
|
|
|
|
## Next Steps
|
|
|
|
After completing this setup:
|
|
|
|
1. Run `flutter run` to verify Supabase connection works
|
|
2. Environment variables should load without errors
|
|
3. App should display "Supabase connection: ✓ Ready" on home screen
|
|
4. Ready for Phase 1 Plan 2 (Authentication UI implementation)
|
|
|
|
---
|
|
|
|
**Once all items complete:** Mark status as "Complete" |