# shiv1810/student-performance-prediction-app architecture

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

- Interactive diagram: https://gitdiagram.com/shiv1810/student-performance-prediction-app
- Repository: https://github.com/shiv1810/student-performance-prediction-app

## Overview

##### Main Components
- iOS App Client: The overall mobile application includes several modules:
- User Authentication and Profile (SignIn_FacultyView.swift, SignIn_StudentView.swift)
- Faculty Dashboard (Faculty Dashboard directory) for CRUD operations and analysis.
- Student Dashboard (Student Dashboard directory) for viewing marks, timetables, and performance.
- Various views for charts and stats (e.g., subdirectories in BookstoreStategist, Charts).
- Supporting screens (AttendanceView.swift, ProfileView.swift, etc.)
- Firebase/Firestore Backend: Represent the cloud backend components handling authentication, real-time database, and storage of user and app data.
- CoreML Prediction Engine: Represent the integrated CoreML model (files such as SPPA.mlmodel and my_model.mlmodel) and its conversion/integration from a Python-trained scikit-learn model.
- Graph/Visualization Library: Mark the component that renders charts (many view files in “Charts” and “BookstoreStategist/basics tutorial” directories).

##### Interactions and Data Flow
- Data flow from the iOS UI (especially in dashboard views) to the CoreML model where predictions are computed.
- Rendering of dynamic visualization with the graph library by showing the flow from processed data (either entered by the user or retrieved from the backend) to the view layer.

##### Architectural Patterns
- The app also demonstrates modularization by separating different dashboards and tutorials into distinct modules (Faculty, Student, Books/Charts).

##### Relevant Technologies and Frameworks
- Xcode/Swift and SwiftUI for the front-end.
- Firebase and Firestore for the backend services.
- CoreML for machine learning inference.
- The Graph library (such as Charts or Core Plot) for visualizations.
- Any additional libraries used across the project (e.g., Swift Package Manager managed dependencies inside SPPA.xcodeproj).

- iOS App Layer:
- User Interface: Screens for sign-in, dashboards (student and faculty), chart displays.
- Business Logic: Models and view models handling core data (book sales, marks, effort metrics).
- Services Interaction: API calls to Firebase, data binding to the visualization components.
- Backend Services:
- Firebase Authentication and Firestore: Handling user data, real-time updates, and CRUD operations.
- Analytics and Prediction:
- CoreML Integration: Block depicting the CoreML model (converted from Python scikit-learn training) processing input parameters to generate performance predictions.
- Visualization:
- Graph Library: Represent the layer that transforms data into charts (bar charts, line charts, pie charts, etc.).

## Diagram (Mermaid)

```mermaid
graph TD
    iOSApp["iOS App Client (SwiftUI)"]:::frontend
    subgraph "UI Modules"
        A["User Authentication & Profile"]:::frontend
        B["Faculty Dashboard"]:::frontend
        C["Student Dashboard"]:::frontend
        D["Charts & Visualization"]:::frontend
    end
    iOSApp --> A

    E["CoreML Prediction Engine"]:::ml
    F["Firebase/Firestore Backend"]:::backend

    subgraph "MVVM Architecture"
        MV["View Layer"]:::mvvm
        VM["ViewModel Layer"]:::mvvm
        M["Model Layer"]:::mvvm
    end

    %% Interactions between iOS UI and Backend/CoreML
    A -->|"AuthData"| F
    B -->|"CRUD"| F
    C -->|"DataRetrieval"| F
    B -->|"Analytics"| E
    C -->|"Predict"| E
    E -->|"Results"| D

    %% MVVM connections
    A --> MV
    B --> MV
    C --> MV
    D --> MV
    MV --> VM
    VM --> M

    %% Click Events
    click iOSApp "https://github.com/shiv1810/student-performance-prediction-app/tree/main/SPPA"
    click A "https://github.com/shiv1810/student-performance-prediction-app/blob/main/SignIn_FacultyView.swift"
    click B "https://github.com/shiv1810/student-performance-prediction-app/tree/main/SPPA/Faculty Dashboard"
    click C "https://github.com/shiv1810/student-performance-prediction-app/tree/main/SPPA/Student Dashboard"
    click D "https://github.com/shiv1810/student-performance-prediction-app/tree/main/SPPA/Charts"
    click E "https://github.com/shiv1810/student-performance-prediction-app/blob/main/SPPA/SPPA.mlmodel"
    click F "https://github.com/shiv1810/student-performance-prediction-app/blob/main/SPPA/GoogleService-Info.plist"

    %% Styles
    classDef frontend fill:#AEDFF7,stroke:#333,stroke-width:2px;
    classDef backend fill:#C6F1C6,stroke:#333,stroke-width:2px;
    classDef ml fill:#F7D1AE,stroke:#333,stroke-width:2px;
    classDef mvvm fill:#E0BBE4,stroke:#333,stroke-width:2px;
```
