# diptarimba/neoducation architecture

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

- Interactive diagram: https://gitdiagram.com/diptarimba/neoducation
- Repository: https://github.com/diptarimba/neoducation

## Overview

##### Project type and purpose
- This is a full-stack Laravel web application named “Neoducation” – an information system for a tutoring or e-learning center.
- It supports user roles (admin, siswa, tentor), handles authentication, financial management, attendance (presensi), quizzes, reporting, and configuration.

##### File structure
- Top-level directories:
- app/             ← MVC core: Controllers, Models, Middleware, Console commands, Exception handlers
- routes/          ← HTTP, API, console routing
- resources/       ← Blade view templates, Sass, JavaScript entry points, language files
- public/          ← Web root & compiled static assets (CSS, JS, images, vendor libraries)
- config/          ← Laravel configuration (database, cache, mail, services, session…)
- database/        ← Migrations, seeders, factories
- storage/         ← Logs, cache, sessions, compiled views
- bootstrap/       ← Framework bootstrap and cached files
- tests/           ← Feature & unit tests
- Build/deployment:
- webpack.mix.js  ← front-end asset pipeline
- composer.json   ← PHP dependencies
- package.json    ← JS dependencies
- .env.example    ← environment variables template

##### README
- Confirms a Laravel-based application.
- Minimal domain description: “Sistem Informasi Bimbingan Belajar Neoducationz.”

##### Main components & interactions
a. Presentation Layer (Frontend)
- Browser/client
- Static asset server (Apache/Nginx serving public/)
- Assets: compiled CSS/JS (app.css, app.js), vendor libs (Chart.js, Apexcharts, CKEditor…), images
b. Application Layer (Backend)
- public/index.php → Laravel HTTP kernel
- Middleware chain (auth, CSRF, role guards)
- Routing (routes/web.php, api.php)
- Controllers (app/Http/Controllers)
- Blade views (resources/views)
c. Domain/Data Layer
- Eloquent Models (app/Models)
- Database (MySQL/PostgreSQL) – tables defined by migrations
- Seeders & factories for test/dev data
d. Infrastructure & Services
- Cache, Sessions (filesystem by default)
- Queue & Jobs (config/queue.php)
- Mail (SMTP, services.php)
- Broadcasting (Pusher/Redis)
- File storage (local/public via config/filesystems.php)
- Logging (Monolog)
e. External Integrations
- 3rd-party JS libraries loaded from public/assets/vendors
- Potential APIs (if any) via HTTP clients or Laravel services

##### Relationships & data flow
1. Client → HTTP Request → Web server → index.php
2. Request passes through global & route middleware
3. Router dispatches to a Controller method
4. Controller uses Models/Services to query/update the Database
5. Optional: dispatch Queued Jobs, send Mail or broadcast events
6. Controller returns a Blade view or JSON
7. Response → Middleware (e.g., EncryptCookies) → Web server → Client

##### Architectural patterns & design principles
- MVC (Model-View-Controller)
- Service Container & Service Providers (app/Providers)
- Eloquent ORM for database abstraction
- Middleware for cross-cutting concerns (authentication, CSRF, role checks)
- Facades for common services (Cache, DB, Mail, Queue)
- Asset compilation with Laravel Mix

##### Final checklist
- Clear component labels

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Presentation Layer
    subgraph "Presentation Layer"
        Browser["Browser/Client"]:::client
        WebServer["Nginx/Apache\n(public/)"]:::server
        StaticAssets["Static Assets\npublic/assets/"]:::assets
        JS["resources/js/app.js"]:::assets
        SCSS["resources/sass/app.scss"]:::assets
        Blade["Blade Views\nresources/views"]:::view
    end

    %% Application Layer
    subgraph "Application Layer"
        Kernel["HTTP Kernel\napp/Http/Kernel.php"]:::app
        Middleware["Middleware\nAuthenticate, CSRF, Role Guards"]:::app
        Router["Routing\nroutes/web.php\nroutes/api.php"]:::app
        Controllers["Controllers\napp/Http/Controllers"]:::app
        Providers["Service Providers\napp/Providers"]:::app
    end

    %% Domain/Data Layer
    subgraph "Domain/Data Layer"
        Models["Eloquent Models\napp/Models"]:::model
        Migrations["Migrations\ndatabase/migrations"]:::model
        Seeders["Seeders & Factories\ndatabase/seeds & factories"]:::model
        DB["Database\nMySQL/PostgreSQL"]:::db
    end

    %% Infrastructure & Services
    subgraph "Infrastructure & Services"
        Cache["Cache\nconfig/cache.php"]:::infra
        Queue["Queue & Jobs\nconfig/queue.php"]:::infra
        Mail["Mail Service\nconfig/mail.php"]:::infra
        Broadcast["Broadcast\nconfig/broadcasting.php"]:::infra
        FileStorage["File Storage\nconfig/filesystems.php"]:::infra
        Logging["Logging\nconfig/logging.php"]:::infra
    end

    %% Connections
    Browser -->|HTTP Request| WebServer
    WebServer -->|Serves static assets| StaticAssets
    WebServer -->|index.php| Kernel
    Kernel --> Middleware
    Middleware --> Router
    Router --> Controllers
    Controllers --> Models
    Models --> DB
    Controllers -->|dispatch jobs| Queue
    Controllers -->|send mails| Mail
    Controllers -->|broadcast events| Broadcast
    Controllers -->|use storage| FileStorage
    Controllers -->|log| Logging
    Controllers -->|render| Blade
    Blade -->|Response| WebServer
    WebServer -->|HTTP Response| Browser

    %% Click Events
    click StaticAssets "https://github.com/diptarimba/neoducation/tree/main/public/assets/"
    click JS "https://github.com/diptarimba/neoducation/blob/main/resources/js/app.js"
    click SCSS "https://github.com/diptarimba/neoducation/blob/main/resources/sass/app.scss"
    click Blade "https://github.com/diptarimba/neoducation/blob/main/resources/views/layout/master.blade.php"
    click Kernel "https://github.com/diptarimba/neoducation/blob/main/app/Http/Kernel.php"
    click Middleware "https://github.com/diptarimba/neoducation/blob/main/app/Http/Middleware/Authenticate.php"
    click Router "https://github.com/diptarimba/neoducation/blob/main/routes/web.php"
    click Controllers "https://github.com/diptarimba/neoducation/blob/main/app/Http/Controllers/LoginController.php"
    click Models "https://github.com/diptarimba/neoducation/blob/main/app/Models/Admins.php"
    click Migrations "https://github.com/diptarimba/neoducation/blob/main/database/migrations/*.php"
    click Seeders "https://github.com/diptarimba/neoducation/blob/main/database/seeds/DatabaseSeeder.php"
    click Cache "https://github.com/diptarimba/neoducation/blob/main/config/cache.php"
    click Queue "https://github.com/diptarimba/neoducation/blob/main/config/queue.php"
    click Mail "https://github.com/diptarimba/neoducation/blob/main/config/mail.php"
    click Broadcast "https://github.com/diptarimba/neoducation/blob/main/config/broadcasting.php"
    click FileStorage "https://github.com/diptarimba/neoducation/blob/main/config/filesystems.php"
    click Logging "https://github.com/diptarimba/neoducation/blob/main/config/logging.php"

    %% Styles
    classDef client fill:#CFF,stroke:#036,stroke-width:1px
    classDef server fill:#FCF,stroke:#630,stroke-width:1px
    classDef assets fill:#CFC,stroke:#262,stroke-width:1px
    classDef view fill:#FFC,stroke:#663,stroke-width:1px
    classDef app fill:#CCF,stroke:#336,stroke-width:1px
    classDef model fill:#FCC,stroke:#633,stroke-width:1px
    classDef db fill:#F99,stroke:#900,stroke-width:1px
    classDef infra fill:#9CF,stroke:#069,stroke-width:1px
```
