# eduprime/app architecture

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

- Interactive diagram: https://gitdiagram.com/eduprime/app
- Repository: https://github.com/eduprime/app

## Overview

##### High-Level Architecture Components

a) Frontend Layer:
- Ionic/Vue.js Application Container
- Core Module System
- Shared Components
- Authentication/Authorization Layer

b) Module Layer (highlight the modular architecture):
- Student Management Module
- School Management Module
- Teacher Management Module
- Institution Management Module
- Pre-enrollment Module
- GED (Document Management) Module

c) Services Layer:
- Base Service Layer
- Module-specific Services
- Supabase Integration

**┌─────────────────────────────────────────────────────┐**
- Frontend Layer                      │
- (Ionic/Vue.js, Shared Components, Router, Store)   │
- ┤
- Module Layer                       │
- (Independent Feature Modules with MVC Structure)    │
- ┤
- Services Layer                      │
- (Base Services, Supabase, Module Services)       │
- ┘

##### Component Details

For each module, show:
- Views (*.vue files)
- Services (*.service.ts files)
- Components
- Routes
- Module-specific assets

Example for a single module:
**┌─────────────── School Management Module ───────────────┐**

- ┌─────────┐    ┌──────────┐    ┌────────────┐       │
- Views  │    │Components│    │  Services  │       │
- ┬────┘    └────┬─────┘    └─────┬──────┘       │

- DashboardClass   ClassForm     ClassroomService      │
- EditClass        CourseForm    CourseService         │
- RegisterClass    SchoolList    SchoolService         │
- ┘

##### Data Flow Indicators

- Module communication through services
- Authentication flow
- API calls to Supabase
- Inter-module dependencies

##### Technical Details

Specific technical implementations:
- Vue 3 Composition API usage
- Ionic Framework integration
- TypeScript interfaces and types
- Supabase real-time capabilities
- Module lazy loading

##### Scale and Organization

- Provide zoom-in sections for each module
- Clear boundaries between modules
- Shared resources and services

Remember to include the specific file structure from the provided tree, especially highlighting the separation of concerns within each module (views, services, components) and how they interact with the core application infrastructure.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Frontend
        App["Frontend Container"]
        Router["Router System"]
        Auth["Authentication System"]
        Store["Store Management"]
        SharedComp["Shared Components"]
        
        subgraph CoreSystem
            Layout["Core Layout System"]
            Views["Core Views"]
            Types["Type Definitions"]
            Utils["Utility Services"]
        end
        
        subgraph Modules
            direction TB
            Student["Student Management"]
            School["School Management"]
            Teacher["Teacher Management"]
            PreEnroll["Pre-enrollment"]
            Institution["Institution Management"]
            GED["GED Document Management"]
        end
    end
    
    subgraph Backend
        AuthService["Authentication Service"]
        BaseService["Base Service Layer"]
        Database[(Database Layer)]
    end
    
    %% Relationships
    App --> Router
    App --> Auth
    App --> Store
    App --> SharedComp
    App --> CoreSystem
    App --> Modules
    
    Auth --> AuthService
    Modules --> BaseService
    BaseService --> Database
    AuthService --> Database
    
    %% Click events
    click App "https://github.com/EduPrime/app/blob/main/src/App.vue"
    click Router "https://github.com/EduPrime/app/blob/main/src/router/index.ts"
    click Auth "https://github.com/EduPrime/app/blob/main/src/services/AuthService.ts"
    click SharedComp "https://github.com/EduPrime/app/tree/main/src/components"
    click Layout "https://github.com/EduPrime/app/tree/main/src/layouts"
    click Views "https://github.com/EduPrime/app/tree/main/src/views"
    click Types "https://github.com/EduPrime/app/blob/main/src/types/database.types.ts"
    click Utils "https://github.com/EduPrime/app/tree/main/src/utils"
    click Student "https://github.com/EduPrime/app/tree/main/src/modules/student-management"
    click School "https://github.com/EduPrime/app/tree/main/src/modules/school-management"
    click Teacher "https://github.com/EduPrime/app/tree/main/src/modules/school-teacher-management"
    click PreEnroll "https://github.com/EduPrime/app/tree/main/src/modules/pre-enrollment"
    click Institution "https://github.com/EduPrime/app/tree/main/src/modules/institution"
    click GED "https://github.com/EduPrime/app/tree/main/src/modules/ged"
    click AuthService "https://github.com/EduPrime/app/blob/main/src/services/AuthService.ts"
    click BaseService "https://github.com/EduPrime/app/blob/main/src/services/BaseService.ts"
    click Database "https://github.com/EduPrime/app/blob/main/prisma/schema.prisma"
    
    %% Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef module fill:#2ecc71,stroke:#27ae60,color:white
    classDef service fill:#e67e22,stroke:#d35400,color:white
    classDef database fill:#9b59b6,stroke:#8e44ad,color:white
    classDef core fill:#95a5a6,stroke:#7f8c8d,color:white
    
    class App,Router,Auth,Store,SharedComp frontend
    class Student,School,Teacher,PreEnroll,Institution,GED module
    class AuthService,BaseService service
    class Database database
    class Layout,Views,Types,Utils core
```
