Skip to content
This repository was archived by the owner on Dec 14, 2025. It is now read-only.

Repository files navigation

🏥 Elluminar Mobile

A Flutter-based consultation platform connecting users with expert consultants across various domains.

🌟 Key Features

  • 🔐 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

🚀 Quick Start

📚 New to Flutter + Supabase? Check out our Complete Flutter + Supabase Integration Guide - a comprehensive tutorial applicable to any Flutter + Supabase project!

Prerequisites

  • 🔧 Flutter SDK (3.8.1+)
  • 🎯 Dart SDK (included with Flutter)
  • ☁️ Supabase Account - Sign up here
  • 🗃️ PostgreSQL Knowledge (helpful for database operations)

Installation & Setup

  1. 📥 Clone the repository

    git clone <repository-url>
    cd elluminar_mobile
  2. 📦 Install dependencies

    flutter pub get
  3. ⚙️ 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)
  4. 🗄️ 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
  5. 🏃‍♂️ 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.

🔐 Authentication & OAuth

Authentication System Status

  • 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

Quick OAuth Setup

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

Test Credentials

📧 Email: temp@gmail.com
🔑 Password: 123456

📚 Complete OAuth Setup Guide: See Authentication Documentation for detailed OAuth configuration, CUID bridge explanation, and troubleshooting.

🏗️ Project Architecture

Tech Stack

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

Unique Architecture Features

  • 🆔 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.

🛠️ Development

Database Management

# 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

Building & Testing

# 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

Code Generation

# Generate database types (optional)
supabase gen types dart --local > lib/types/database.dart

# Generate app icons
flutter pub run flutter_launcher_icons:main

📚 Documentation Hub

🚀 Getting Started

🔐 Authentication & Security

🏗️ Architecture & Development

🔧 Migration & Deployment

📂 Project Structure

Core Application

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

Database & DevOps

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)

Documentation & Configuration

docs/                       # Comprehensive documentation
config/                     # Environment and build configuration  
tests/                      # Test files and utilities

🚨 Quick Troubleshooting

Common Issues & Solutions

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

Emergency Commands

# 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.

🤝 Contributing

We welcome contributions! Here's how to get started:

Development Workflow

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch: git checkout -b feature/amazing-feature
  3. 💻 Develop following our Architecture Guide
  4. 🧪 Test your changes: flutter test && flutter analyze
  5. 📝 Document new features or changes
  6. 📤 Submit a pull request

Code Standards

  • ✅ 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

Database Changes

  • 🔄 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

📄 License

This project is part of the Elluminar Platform.


🆘 Need Help?

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!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages