# raccoon0g/studyconnect architecture

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

- Interactive diagram: https://gitdiagram.com/raccoon0g/studyconnect
- Repository: https://github.com/raccoon0g/studyconnect

## Overview

##### Project type and purpose
- This is a multi-platform Flutter application (“study_connect”) targeting Android, iOS, web, Linux, Windows, and macOS.
- The README is boilerplate Flutter; the real purpose emerges from the code: a learning/study-connect app with user authentication, exercises, chat, notifications, and Firestore-backed data.

##### File structure
- Top-level “android”, “ios”, “linux”, “macos”, “windows”, “web” folders: platform shell projects.
- “lib/” contains the entire Dart application:
· models/ – domain data classes
· services/ – business-logic-to-backend connectors (Firebase Auth, Firestore, notifications)
· utils/ – helper functions and UI/dialog abstractions
· routes/ – named route definitions
· screens/ – presentation layer (UI pages)
· widgets/ – reusable UI components
- assets/ – static payload (audio, images) for the Flutter app.
- firebase.json, firestore.rules, firestore.indexes.json, .firebaserc, android/app/google-services.json: Firebase configuration.

##### README for additional insights
- No architecture details in README, but presence of Firebase metadata + services folder implies the app uses Firebase Auth, Firestore, Cloud Messaging, and possibly Storage.

##### Detail and granularity
- “assets” feeding into Presentation for media

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Platform Shells
    subgraph "Platform Shells"
        Android["Android"]:::platform
        iOS["iOS"]:::platform
        Web["Web"]:::platform
        Linux["Linux"]:::platform
        macOS["macOS"]:::platform
        Windows["Windows"]:::platform
    end

    %% Flutter Engine
    FlutterEngine["Flutter Engine & Dart VM"]:::client

    %% Presentation Layer
    subgraph "Presentation Layer"
        Screens["Screens"]:::client
        Widgets["Widgets"]:::client
        Routes["Routes"]:::client
        Assets["Assets"]:::client
        subgraph "Assets"
            Audio["Audio"]:::client
            Images["Images"]:::client
        end
    end

    %% Business Logic Layer
    subgraph "Business Logic Layer"
        ServicesModule["Services"]:::client
        Utils["Utils"]:::client
        EvalService["EvaluacionService"]:::client
        NotificationService["NotificationService"]:::client
        LocalNotificationService["LocalNotificationService"]:::client
    end

    %% Data Models
    Models["Data Models"]:::client

    %% Firebase Backend
    subgraph "Firebase Backend"
        Auth["Auth Service"]:::external
        Firestore["Firestore Database"]:::db
        FCM["Cloud Messaging"]:::external
        Storage["Storage"]:::external
    end

    %% Firebase Config
    subgraph "Firebase Configuration Files"
        Config1["firebase.json"]:::external
        Config2[".firebaserc"]:::external
        Config3["firestore.rules"]:::external
        Config4["firestore.indexes.json"]:::external
        Config5["google-services.json"]:::external
        Config6["storage.rules"]:::external
    end

    %% Connections
    Android --> FlutterEngine
    iOS --> FlutterEngine
    Web --> FlutterEngine
    Linux --> FlutterEngine
    macOS --> FlutterEngine
    Windows --> FlutterEngine

    FlutterEngine --> Screens
    FlutterEngine --> Widgets
    FlutterEngine --> Routes
    FlutterEngine --> Assets

    Screens --> ServicesModule
    Widgets --> ServicesModule
    Routes --> ServicesModule
    Assets --> ServicesModule

    ServicesModule --> EvalService
    ServicesModule --> NotificationService
    ServicesModule --> LocalNotificationService
    ServicesModule --> Utils

    EvalService --> Auth
    EvalService --> Firestore
    NotificationService --> FCM
    LocalNotificationService --> FCM
    ServicesModule --> Storage

    Auth --> ServicesModule
    Firestore --> ServicesModule
    FCM --> ServicesModule
    Storage --> ServicesModule

    ServicesModule --> Models
    Models --> ServicesModule

    Config1 --> Auth
    Config2 --> Auth
    Config3 --> Firestore
    Config4 --> Firestore
    Config5 --> Auth
    Config6 --> Storage

    %% Click Events
    click Screens "https://github.com/raccoon0g/studyconnect/tree/main/lib/screens/"
    click Widgets "https://github.com/raccoon0g/studyconnect/tree/main/lib/widgets/"
    click ServicesModule "https://github.com/raccoon0g/studyconnect/tree/main/lib/services/"
    click EvalService "https://github.com/raccoon0g/studyconnect/blob/main/lib/services/evaluacion_service.dart"
    click NotificationService "https://github.com/raccoon0g/studyconnect/blob/main/lib/services/notification_service.dart"
    click LocalNotificationService "https://github.com/raccoon0g/studyconnect/blob/main/lib/services/local_notification_service.dart"
    click ServicesModule "https://github.com/raccoon0g/studyconnect/blob/main/lib/services/services.dart"
    click Utils "https://github.com/raccoon0g/studyconnect/tree/main/lib/utils/"
    click Models "https://github.com/raccoon0g/studyconnect/tree/main/lib/models/"
    click Routes "https://github.com/raccoon0g/studyconnect/blob/main/lib/routes/routes.dart"
    click Audio "https://github.com/raccoon0g/studyconnect/tree/main/assets/audio/"
    click Images "https://github.com/raccoon0g/studyconnect/tree/main/assets/images/"
    click Android "https://github.com/raccoon0g/studyconnect/tree/main/android/"
    click iOS "https://github.com/raccoon0g/studyconnect/tree/main/ios/"
    click Web "https://github.com/raccoon0g/studyconnect/tree/main/web/"
    click Linux "https://github.com/raccoon0g/studyconnect/tree/main/linux/"
    click macOS "https://github.com/raccoon0g/studyconnect/tree/main/macos/"
    click Windows "https://github.com/raccoon0g/studyconnect/tree/main/windows/"
    click Config1 "https://github.com/raccoon0g/studyconnect/blob/main/firebase.json"
    click Config2 "https://github.com/raccoon0g/studyconnect/blob/main/.firebaserc"
    click Config3 "https://github.com/raccoon0g/studyconnect/blob/main/firestore.rules"
    click Config4 "https://github.com/raccoon0g/studyconnect/blob/main/firestore.indexes.json"
    click Config5 "https://github.com/raccoon0g/studyconnect/blob/main/android/app/google-services.json"
    click Config6 "https://github.com/raccoon0g/studyconnect/blob/main/storage.rules"

    %% Styles
    classDef platform fill:#cccccc,stroke:#333,stroke-width:1px;
    classDef client fill:#bbe1fa,stroke:#1e90ff,stroke-width:1px;
    classDef external fill:#b8e994,stroke:#27ae60,stroke-width:1px;
    classDef db fill:#f8c291,stroke:#e58e26,stroke-width:1px;
```
