A Flutter-based consultation platform connecting users with expert consultants across various domains.
- 🔐 Multi-Provider Authentication - Email/password + OAuth (Google, Facebook, GitHub) with CUID Bridge
- 👤 Dynamic User Profiles - Role-based profiles (User/Consultant) with real-time updates
- 👨⚕️ Expert Consultations - Browse, book, and manage consultation sessions
- 📅 Smart Scheduling - Advanced availability management and booking system
- 💳 Integrated Payments - Stripe and Razorpay payment processing
- 📱 Cross-Platform - Seamless experience on Web, Android, and iOS
- 🔍 Advanced Search - Filter consultants by domain, expertise, and availability
- 🆔 CUID Bridge - Preserve existing production data while leveraging Supabase Auth
- ⚡ Real-time Updates - Live notifications and data synchronization
📚 New to Flutter + Supabase? Check out our Complete Flutter + Supabase Integration Guide - a comprehensive tutorial applicable to any Flutter + Supabase project!
- 🔧 Flutter SDK (3.8.1+)
- 🎯 Dart SDK (included with Flutter)
- ☁️ Supabase Account - Sign up here
- 🗃️ PostgreSQL Knowledge (helpful for database operations)
-
📥 Clone the repository
git clone <repository-url> cd elluminar_mobile
-
📦 Install dependencies
flutter pub get
-
⚙️ Environment Configuration
# Copy environment template cp config/environment-template.env .env # Edit .env with your credentials # SUPABASE_URL=your-project-url # SUPABASE_ANON_KEY=your-anon-key # Add OAuth credentials (see OAuth section below)
-
🗄️ Database Setup (CUID Bridge System)
# Run the generated SQL policies and triggers cd scripts/supabase dart run utilities/apply_policies.dart # This sets up: # - CUID ↔ Supabase Auth UUID mapping # - Row Level Security policies # - Database triggers and functions
-
🏃♂️ Run the application
# Web (recommended for development) flutter run -d chrome # Mobile platforms flutter run -d android # Android flutter run -d ios # iOS (macOS only)
🔧 Need help with setup? See our Getting Started Guide for detailed setup instructions.
- ✅ Email/Password - Fully implemented with CUID bridge
- ✅ Google OAuth - Configured and working
⚠️ Facebook OAuth - Needs App ID configuration⚠️ GitHub OAuth - Needs OAuth app setup- ✅ CUID Bridge - Production data preservation system
Add these to your .env file:
# Supabase Core (Required)
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
# OAuth Providers (Optional)
GOOGLE_CLIENT_ID=your-google-client-id
FACEBOOK_CLIENT_ID=your-facebook-app-id # Configure at developers.facebook.com
GITHUB_CLIENT_ID=your-github-client-id # Configure at github.com/settings/developers📧 Email: temp@gmail.com
🔑 Password: 123456
📚 Complete OAuth Setup Guide: See Authentication Documentation for detailed OAuth configuration, CUID bridge explanation, and troubleshooting.
| Component | Technology | Purpose |
|---|---|---|
| Frontend | Flutter (Dart) | Cross-platform UI and client logic |
| Backend | Supabase | Authentication, database, real-time, storage |
| Database | PostgreSQL | CUID-based schema with UUID bridge |
| State Management | Riverpod | Reactive state and dependency injection |
| Navigation | GoRouter | Declarative routing and deep linking |
| Payments | Stripe + Razorpay | Multi-provider payment processing |
| Logging | Logger package | Development and production logging |
- 🆔 CUID Bridge System - Preserves existing production data while using Supabase Auth
- 🔄 Template-Based SQL Generation - Automated policy, trigger, and function generation
- 🔒 Advanced RLS Policies - Role-based security with user-specific and admin policies
- ⚡ Real-time Everything - Live updates for consultations, bookings, and notifications
- 🏥 Domain-Specific Models - Healthcare and consultation-focused data structures
🔧 Technical Deep-Dive: See our Flutter + Supabase Integration Guide for complete architecture patterns, database design, and implementation details.
# Generate new policies and triggers
cd scripts/supabase
dart run generators/refactored_policy_generator.dart
dart run generators/refactored_trigger_generator.dart
# Apply to database
dart run utilities/apply_policies.dart
# Test the system
./utilities/test_refactored_system.sh# Development
flutter run -d chrome --debug
# Production builds
flutter build web --release # Web production
flutter build apk --release # Android
flutter build ios --release # iOS (macOS only)
# Quality checks
flutter analyze # Static analysis
flutter test # Unit tests# Generate database types (optional)
supabase gen types dart --local > lib/types/database.dart
# Generate app icons
flutter pub run flutter_launcher_icons:main- Flutter + Supabase Integration Guide - Complete technical guide with code examples
- Getting Started - Project setup and initial configuration
- Project Management - Organization and development workflow
- Authentication System - Complete auth guide with CUID bridge
- API Documentation - Endpoints, models, and integration patterns
- Troubleshooting - Common issues and solutions
- Architecture Overview - System design and patterns
- Features Documentation - Individual feature implementations
- Database Schema - Tables, relationships, and migrations
- Migration Guides - Version updates and data migration
- Implementation Notes - Technical decisions and fixes
lib/
├── 🔧 config/ # App configuration and environment setup
├── 📊 models/ # Data models (CUID-based with UUID bridge)
├── 🔄 providers/ # Riverpod state providers and dependency injection
├── 📁 repositories/ # Data access layer and API integration
├── 📱 screens/ # UI screens and page components
│ ├── auth/ # Authentication screens
│ ├── booking/ # Consultation booking flow
│ ├── consultation/ # Consultation management
│ ├── home/ # Main dashboard
│ └── profile/ # User and consultant profiles
├── ⚙️ services/ # Business logic and external integrations
│ ├── auth/ # Authentication services
│ ├── api/ # API communication layer
│ └── error_handling/ # Error management and logging
├── 🎨 theme/ # App theming and styling
└── 🧩 widgets/ # Reusable UI components and custom widgets
scripts/supabase/
├── 📁 generators/ # SQL generation tools
│ ├── refactored_policy_generator.dart
│ ├── refactored_trigger_generator.dart
│ └── migration_generator.dart
├── 📁 templates/ # SQL templates for code generation
│ ├── policies/ # RLS policy templates
│ ├── triggers/ # Database trigger templates
│ └── functions/ # Database function templates
├── 📁 utilities/ # Database management utilities
├── 📁 sql/ # Generated and manual SQL files
│ ├── migrations/ # Database migration files
│ └── fixes/ # Database fix scripts
├── 📁 generated/ # Auto-generated SQL outputs
└── 📁 legacy/ # Deprecated scripts (for reference)
docs/ # Comprehensive documentation
config/ # Environment and build configuration
tests/ # Test files and utilities
| Issue | Quick Fix | Reference |
|---|---|---|
| 🔐 CUID mapping errors | Run AuthCuidMappingService().performHealthCheck() |
Auth Guide |
| 🚫 RLS Policy violations | Re-run dart run utilities/apply_policies.dart |
Database Docs |
| 🔑 OAuth login failures | Check .env credentials and redirect URLs |
OAuth Setup |
| 🏗️ Build failures | Run flutter clean && flutter pub get |
Troubleshooting |
| 🌐 Web platform issues | Clear browser cache and restart dev server | - |
| 📱 Mobile platform issues | Check platform-specific configurations | Platform Guides |
# Complete project reset
flutter clean
flutter pub get
cd scripts/supabase && dart run utilities/apply_policies.dart
flutter run -d chrome
# Database reset (⚠️ Development only)
supabase db reset📖 Detailed Solutions: See our Troubleshooting Guide for comprehensive issue resolution and debugging steps.
We welcome contributions! Here's how to get started:
- 🍴 Fork the repository
- 🌿 Create a feature branch:
git checkout -b feature/amazing-feature - 💻 Develop following our Architecture Guide
- 🧪 Test your changes:
flutter test && flutter analyze - 📝 Document new features or changes
- 📤 Submit a pull request
- ✅ Follow Flutter/Dart best practices
- 🏗️ Use the existing architecture patterns
- 🔒 Ensure RLS policies for new database features
- 📚 Update documentation for new features
- 🧪 Add tests for critical functionality
- 🔄 Use the template-based generators in
scripts/supabase/generators/ - ✅ Test SQL changes locally before submitting
- 📋 Create migrations for schema changes
- 🔒 Always include appropriate RLS policies
This project is part of the Elluminar Platform.
| Resource | Description |
|---|---|
| 📚 Technical Guide | Complete Flutter + Supabase integration |
| 🔐 Authentication Docs | Auth system and CUID bridge |
| 🚨 Troubleshooting | Common issues and solutions |
| 🏗️ Architecture Guide | System design and patterns |
🚀 Ready to build amazing consultation experiences? Let's get started!