# charls362/c-asistencias architecture

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

- Interactive diagram: https://gitdiagram.com/charls362/c-asistencias
- Repository: https://github.com/charls362/c-asistencias

## Overview

##### Project type and purpose
- This is a cross-platform Flutter application (“miapp”) targeting Android, iOS, Linux, macOS, Windows and Web.

##### File structure
- Top-level directories:
- `android/`, `ios/`, `linux/`, `macos/`, `windows/`, `web/` → platform-specific embedding code and configurations.
- `lib/` → shared Dart code: UI screens, routing, business logic, data access, PDF generation.
- `test/` → widget tests.
- Core architecture folders under `lib/`:
- UI layer → `*_screen.dart` files (Widgets, navigation)
- Data layer → `db_helper.dart`, `db_clase.dart` (SQLite helper classes)
- Service layer → `pdf_generator.dart` (PDF creation)
- Entry point → `main.dart` (initialization, dependency injection, route setup)
- No explicit “backend” directory—this is a standalone client app using local storage.

##### README for additional insights
- It’s the auto-generated Flutter starter README. No custom architecture notes. We infer architecture purely from code and file layout.

##### Detail
- How `main.dart` bootstraps the app and wires up routes and services.
- Platform-specific plugin channels if any (e.g., sqflite native code in Android/iOS folders).

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Platform Integration" 
        AndroidEmbedder["Android Embedder"]:::platform
        IOSEmbedder["iOS Embedder"]:::platform
        LinuxEmbedder["Linux Embedder"]:::platform
        MacOSEmbedder["macOS Embedder"]:::platform
        WindowsEmbedder["Windows Embedder"]:::platform
    end

    subgraph "Flutter Core" 
        Main["main.dart (App Bootstrap)"]:::frontend

        subgraph "UI Layer" 
            LoginRegister["Login/Register Screen"]:::frontend
            HomeScreen["Home Screen"]:::frontend
            AttendanceScreen["Attendance Control Screen"]:::frontend
            CreateCourseScreen["Course Creation Screen"]:::frontend
            StudentScreen["Student View Screen"]:::frontend
            SplashScreen["Splash Screen"]:::frontend
        end

        BusinessLogic["Business Logic / Controllers"]:::logic

        subgraph "Data Access Layer"
            DBHelper["DBHelper (SQLite Helper)"]:::data
            DBClase["Data Models (db_clase.dart)"]:::data
        end

        PDFService["PDF Report Generator"]:::service
    end

    subgraph "Assets & Resources"
        AssetsShared["Shared Static Assets"]:::asset
        AndroidAssets["Android Drawables & Icons"]:::asset
        IOSAssets["iOS Asset Catalog"]:::asset
        WebAssets["Web Icons & Manifest"]:::asset
    end

    %% Connections
    AndroidEmbedder -->|"launches"| Main
    IOSEmbedder -->|"launches"| Main
    LinuxEmbedder -->|"launches"| Main
    MacOSEmbedder -->|"launches"| Main
    WindowsEmbedder -->|"launches"| Main

    Main -->|"routes to/screens"| LoginRegister
    Main --> HomeScreen
    Main --> AttendanceScreen
    Main --> CreateCourseScreen
    Main --> StudentScreen
    Main --> SplashScreen

    LoginRegister -->|"user actions"| BusinessLogic
    HomeScreen --> BusinessLogic
    AttendanceScreen --> BusinessLogic
    CreateCourseScreen --> BusinessLogic
    StudentScreen --> BusinessLogic
    SplashScreen --> BusinessLogic

    BusinessLogic -->|"query()/update()"| DBHelper
    BusinessLogic -->|"uses models"| DBClase
    BusinessLogic -->|"generateReport()"| PDFService

    LoginRegister -->|"loads icons/images"| AssetsShared
    HomeScreen --> AssetsShared
    AttendanceScreen --> AssetsShared
    CreateCourseScreen --> AssetsShared
    StudentScreen --> AssetsShared
    SplashScreen --> AssetsShared

    AndroidAssets --> AssetsShared
    IOSAssets --> AssetsShared
    WebAssets --> AssetsShared

    %% Click Events
    click LoginRegister "https://github.com/charls362/c-asistencias/blob/master/lib/login_register_screen.dart"
    click HomeScreen "https://github.com/charls362/c-asistencias/blob/master/lib/home_screen.dart"
    click AttendanceScreen "https://github.com/charls362/c-asistencias/blob/master/lib/attendance_control_screen.dart"
    click CreateCourseScreen "https://github.com/charls362/c-asistencias/blob/master/lib/create_course_screen.dart"
    click StudentScreen "https://github.com/charls362/c-asistencias/blob/master/lib/student_screen.dart"
    click SplashScreen "https://github.com/charls362/c-asistencias/blob/master/lib/splash_screen.dart"
    click Main "https://github.com/charls362/c-asistencias/blob/master/lib/main.dart"
    click DBHelper "https://github.com/charls362/c-asistencias/blob/master/lib/db_helper.dart"
    click DBClase "https://github.com/charls362/c-asistencias/blob/master/lib/db_clase.dart"
    click PDFService "https://github.com/charls362/c-asistencias/blob/master/lib/pdf_generator.dart"
    click AndroidEmbedder "https://github.com/charls362/c-asistencias/blob/master/android/app/src/main/kotlin/com/example/miapp/MainActivity.kt"
    click IOSEmbedder "https://github.com/charls362/c-asistencias/blob/master/ios/Runner/AppDelegate.swift"
    click LinuxEmbedder "https://github.com/charls362/c-asistencias/blob/master/linux/main.cc"
    click LinuxEmbedder "https://github.com/charls362/c-asistencias/blob/master/linux/flutter/generated_plugin_registrant.cc"
    click MacOSEmbedder "https://github.com/charls362/c-asistencias/blob/master/macos/Runner/AppDelegate.swift"
    click MacOSEmbedder "https://github.com/charls362/c-asistencias/blob/master/macos/Runner/MainFlutterWindow.swift"
    click WindowsEmbedder "https://github.com/charls362/c-asistencias/blob/master/windows/runner/main.cpp"
    click WindowsEmbedder "https://github.com/charls362/c-asistencias/blob/master/windows/runner/flutter_window.cpp"
    click AssetsShared "https://github.com/charls362/c-asistencias/tree/master/assets/"
    click AndroidAssets "https://github.com/charls362/c-asistencias/tree/master/android/app/src/main/res/"
    click IOSAssets "https://github.com/charls362/c-asistencias/tree/master/ios/Runner/Assets.xcassets/"
    click WebAssets "https://github.com/charls362/c-asistencias/tree/master/web/icons/"
    click WebAssets "https://github.com/charls362/c-asistencias/blob/master/web/manifest.json"

    %% Styles
    classDef frontend fill:#D6EFFF,stroke:#0366d6
    classDef logic fill:#E0F7FA,stroke:#00796B
    classDef data fill:#FFF3E0,stroke:#FB8C00
    classDef service fill:#F3E5F5,stroke:#8E24AA
    classDef platform fill:#E8F5E9,stroke:#2E7D32
    classDef asset fill:#FFFDE7,stroke:#FBC02D
```
