# madhurchouhan7/synovia_ai_telehealth_app architecture

> Architecture diagram of the GitHub repository madhurchouhan7/synovia_ai_telehealth_app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/madhurchouhan7/synovia_ai_telehealth_app
- Repository: https://github.com/madhurchouhan7/synovia_ai_telehealth_app

## Overview

##### Project Type & Purpose
- This is a _full-stack, cross-platform_ telehealth mobile application built with Flutter (Dart) that runs on Android, iOS, Web, Linux, macOS, and Windows.
- Backend is implemented as Firebase services: Auth (user management), Firestore (cloud storage), Firebase Functions (Node.js serverless logic).
- Local storage uses Hive for offline caching of chat history, settings, and symptom records.
- External integrations: Google’s Gemini Pro AI (via Functions), Google Maps API for doctor lookup, Firebase Analytics/Crashlytics.

##### File Structure Analysis
- Top-level “android”, “ios”, “web”, “linux”, “macos”, “windows” directories contain platform-specific runners and configs.
- “lib/” holds Dart application code:
- config/ (routing)
- features/ (domain modules: auth, AI chatbot, symptom checker, health assessment, nearby doctors, reports, reminders, onboarding, profile, errors, etc.)
- utils/ (asset loading, utilities)
- main.dart (entry point)
- “functions/” contains Node.js Cloud Functions that expose REST endpoints and call Gemini AI.
- Configuration: firebase.json/.firebaserc for Firebase setup; pubspec.yaml for Dart dependencies; package.json for Functions.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Frontend Layer
    subgraph "Flutter Client" 
        direction TB
        Entry["Entry Point\nlib/main.dart"]:::client
        Routes["Routing Config\nlib/config/routes.dart"]:::client
        Theme["UI Theme & Core Styling\nlib/core/colors.dart"]:::client
        subgraph "Features"
            direction TB
            Chat["AI Chatbot Feature"]:::client
            Symptom["Symptom Checker Feature"]:::client
            Doctors["Find Nearby Doctors Feature"]:::client
            AuthFeat["Authentication Feature"]:::client
            HealthAss["Comprehensive Health Assessment Feature"]:::client
            Reports["Reports & Insights Feature"]:::client
            Remind["Reminders Feature"]:::client
            Onboarding["Onboarding Flow Feature"]:::client
            Profile["Profile Page Feature"]:::client
            Home["Home Dashboard Feature"]:::client
            WelcomeFeat["Welcome & Insights Landing Feature"]:::client
            ErrorFeat["Error Handling Screens"]:::client
            Utils["Static Resources & Utilities"]:::client
        end
    end

    %% Local Data Layer
    subgraph "Local Data Layer"
        direction TB
        Hive["Hive Local Storage"]:::storage
    end

    %% Remote Data Layer
    subgraph "Remote Data Layer"
        direction TB
        Auth["Firebase Authentication"]:::serverless
        Firestore["Firestore Database"]:::storage
        subgraph "Functions & Config"
            direction TB
            Functions["Firebase Cloud Functions\n(functions/index.js)"]:::serverless
            FBJSON["firebase.json"]:::serverless
            FBRC[".firebaserc"]:::serverless
            Options["lib/firebase_options.dart"]:::serverless
        end
    end

    %% External Services
    subgraph "External Services"
        direction TB
        Gemini["Gemini Pro AI"]:::external
        Maps["Google Maps API"]:::external
        Analytics["Firebase Analytics & Crashlytics"]:::external
    end

    %% Connections
    Entry -->|uses| Routes
    Entry -->|styles| Theme
    Entry -->|initializes Providers| Chat
    Entry -->|initializes Providers| Symptom
    Entry -->|initializes Providers| Doctors
    Entry -->|initializes Providers| AuthFeat
    Entry -->|initializes Providers| HealthAss
    Entry -->|initializes Providers| Reports
    Entry -->|initializes Providers| Remind
    Entry -->|initializes Providers| Onboarding
    Entry -->|initializes Providers| Profile
    Entry -->|initializes Providers| Home
    Entry -->|initializes Providers| WelcomeFeat
    Entry -->|initializes Providers| ErrorFeat
    Entry -->|loads assets| Utils

    Entry <--> Auth
    Entry --> Functions
    Functions --> Gemini
    Gemini --> Functions
    Functions --> Firestore
    Entry <--> Firestore
    Entry <--> Hive
    Entry --> Maps
    Entry --> Analytics

    %% Click Events
    click Entry "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/blob/main/lib/main.dart"
    click Routes "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/blob/main/lib/config/routes.dart"
    click Theme "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/blob/main/lib/core/colors.dart"
    click Chat "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/tree/main/lib/features/ai chat bot/"
    click Symptom "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/tree/main/lib/features/ai symptoms checker/"
    click Doctors "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/tree/main/lib/features/find nearby doctors/"
    click AuthFeat "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/tree/main/lib/features/auth/"
    click HealthAss "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/tree/main/lib/features/comprehensive_health_assessment/"
    click Reports "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/tree/main/lib/features/reports/"
    click Remind "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/tree/main/lib/features/reminders/"
    click Onboarding "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/tree/main/lib/features/onboarding_screen/"
    click Profile "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/tree/main/lib/features/profile page/"
    click Home "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/tree/main/lib/features/home/"
    click WelcomeFeat "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/tree/main/lib/features/welcome/"
    click ErrorFeat "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/tree/main/lib/features/error/"
    click Utils "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/blob/main/lib/utils/assets_manager.dart"
    click Functions "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/blob/main/functions/index.js"
    click FBJSON "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/blob/main/firebase.json"
    click FBRC "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/blob/main/.firebaserc"
    click Options "https://github.com/madhurchouhan7/synovia_ai_telehealth_app/blob/main/lib/firebase_options.dart"

    %% Styles
    classDef client fill:#bbdefb,stroke:#333,stroke-width:1px;
    classDef serverless fill:#c8e6c9,stroke:#333,stroke-width:1px;
    classDef external fill:#ffe0b2,stroke:#333,stroke-width:1px;
    classDef storage fill:#eeeeee,stroke:#333,stroke-width:1px;
```
