This section contains documentation for developers working on Elluminar, including architecture guidelines, development setup, platform-specific configurations, and best practices.
- Flutter SDK: Version 3.10+ required
- IDE: VS Code or Android Studio with Flutter/Dart plugins
- Platform SDKs: Xcode (macOS/iOS), Android Studio (Android)
- Database: Supabase account and project access
# Get dependencies
flutter pub get
# Run on different platforms
flutter run -d macos # macOS development
flutter run -d ios # iOS simulator
flutter run -d android # Android emulator
flutter run -d chrome # Web developmentarchitecture.md- App architecture overview and design patterns
state-management.md- Riverpod state management patterns
platform-specific/macos-setup.md- macOS development setup and considerations
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Flutter App │ │ Supabase │ │ Database │
│ │ │ │ │ │
│ • Screens │◄──►│ • Auth │◄──►│ • Users │
│ • Widgets │ │ • Real-time │ │ • Profiles │
│ • Services │ │ • Storage │ │ • Triggers │
│ • Providers │ │ • Edge Funcs │ │ • RLS Policies │
└─────────────────┘ └─────────────────┘ └─────────────────┘
- Providers: Global state management
- State Notifiers: Complex state logic
- Future Providers: Async data loading
- Stream Providers: Real-time data
- Trigger-Based: Database triggers handle user creation
- Multi-Platform: Email auth for macOS, OAuth for mobile/web
- Session Management: Persistent login state
- Services: Business logic layer
- Models: Data structures and serialization
- Providers: State management and data flow
- Planning: Review architecture and patterns
- State Design: Plan Riverpod providers and state
- UI Development: Create screens and widgets
- Service Integration: Connect to backend services
- Testing: Unit, widget, and integration tests
- Documentation: Update relevant docs
lib/
├── config/ # App configuration
├── models/ # Data models
├── providers/ # Riverpod providers
├── screens/ # UI screens
├── services/ # Business logic
├── theme/ # UI theming
└── widgets/ # Reusable components
- Null Safety: Always use null-safe code
- Immutability: Prefer immutable data structures
- Async/Await: Use proper async patterns
- Error Handling: Comprehensive error management
- Single Responsibility: Each class has one purpose
- Dependency Injection: Use Riverpod for dependencies
- Clean Architecture: Separate concerns clearly
- Testability: Write testable code
Key Considerations:
- OAuth Limitations: Email authentication only
- Desktop UX: Different interaction patterns
- Entitlements: Proper security settings
- Podfile Management: CocoaPods dependency management
Documentation: macOS Setup Guide
Key Considerations:
- Apple Sign-In: Required for App Store
- Permissions: Camera, microphone, notifications
- App Store Guidelines: Compliance requirements
- Testing: Simulator and device testing
Key Considerations:
- Google Services: OAuth and push notifications
- Permissions: Runtime permission handling
- Play Store: Release signing and validation
- Testing: Multiple device sizes and versions
Key Considerations:
- Browser Compatibility: Cross-browser testing
- PWA Features: Progressive Web App capabilities
- Performance: Bundle size optimization
- SEO: Search engine optimization
The app uses Riverpod for state management with the following patterns:
- Provider: Immutable data or computed values
- StateProvider: Simple mutable state
- StateNotifierProvider: Complex state logic
- FutureProvider: Async data fetching
- StreamProvider: Real-time data streams
// Global providers
final authStateProvider = StateNotifierProvider<AuthStateNotifier, AuthState>(...);
final themeProvider = StateProvider<ThemeMode>(...);
// Feature-specific providers
final consultantListProvider = FutureProvider<List<Consultant>>(...);
final activeCallProvider = StateProvider<VideoCall?>(...);- Services: Business logic testing
- Models: Data structure validation
- Providers: State management testing
- Location:
test/unit/
- Screens: UI component testing
- Widgets: Reusable widget testing
- User Interactions: Tap, scroll, input testing
- Location:
test/widget/
- Auth Flow: Complete authentication testing
- User Journeys: End-to-end workflows
- API Integration: Backend service testing
- Location:
test/integration/
# Unit tests
flutter test
# Widget tests
flutter test test/widget/
# Integration tests
flutter test integration_test/
# Coverage report
flutter test --coverage# Debug builds (development)
flutter run --debug
# Profile builds (performance testing)
flutter run --profile
# Release builds (production-like)
flutter run --release# iOS App Store
flutter build ios --release
# Android Play Store
flutter build appbundle --release
# macOS App Store
flutter build macos --release
# Web deployment
flutter build web --release- const Constructors: Use const widgets where possible
- Widget Rebuilds: Minimize unnecessary rebuilds
- ListView Optimization: Use ListView.builder for large lists
- Image Optimization: Proper image caching and sizing
- Provider Scoping: Scope providers appropriately
- State Normalization: Keep state flat and normalized
- Memoization: Cache expensive computations
- Lazy Loading: Load data on demand
- Indexed Queries: Use proper database indexes
- Pagination: Implement proper pagination
- Selective Loading: Only fetch needed data
- Caching: Cache frequently accessed data
- API Keys: Never commit secrets to version control
- Input Validation: Validate all user inputs
- Error Handling: Don't expose sensitive errors
- Logging: Don't log sensitive information
- Token Storage: Secure token management
- Session Timeout: Implement appropriate timeouts
- Permission Checking: Always verify user permissions
- HTTPS Only: Ensure all network traffic is encrypted
- Widget Inspector: UI debugging
- Performance View: Performance profiling
- Network Tab: HTTP request monitoring
- Logging: Application log viewing
- Xcode: iOS/macOS debugging
- Android Studio: Android debugging and profiling
- Chrome DevTools: Web debugging
- Dependency Conflicts: Clean and reinstall dependencies
- Platform Updates: Update platform-specific configurations
- Cache Issues: Clear Flutter and platform caches
- State Management: Check provider scoping and updates
- Authentication: Verify token validity and permissions
- Network: Check API endpoints and connectivity
- Architecture Questions: Review architecture.md
- State Management: Check state-management.md
- Platform Issues: See platform-specific guides
- Flutter Documentation: flutter.dev
- Riverpod Guide: riverpod.dev
- Supabase Docs: supabase.com/docs
- Branch: Create feature branches from
dev - Develop: Follow coding standards and patterns
- Test: Write appropriate tests
- Review: Submit pull request for review
- Deploy: Merge to appropriate branch
- Follows architecture patterns
- Includes appropriate tests
- Updates documentation
- Handles errors gracefully
- Follows coding standards
- Authentication - Authentication system integration
- Database - Database schema and operations
- OAuth - OAuth provider configuration