# mohammadindraa/web_sekolah architecture

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

- Interactive diagram: https://gitdiagram.com/mohammadindraa/web_sekolah
- Repository: https://github.com/mohammadindraa/web_sekolah

## Overview

##### Project type and purpose
- This is a full-stack Laravel web application.
- Purpose: it powers both an admin dashboard (managing banners, berita/news, events, user roles & permissions, settings, calon siswa/registrations) and a public-facing site (resources/views/frontend and public/eduhome static HTML templates).

##### File structure
- Top-level directories:
- app/ (MVC: Controllers, Requests, Models, Mail, Helpers, Providers)
- config/ (framework, database, queue, permission, caching, mail, session)
- database/ (migrations, factories, seeders)
- resources/ (Blade views, CSS/JS assets, components)
- public/ (entry point index.php, static assets, two UI kits: design-sistem and eduhome)
- routes/ (web.php, console.php)
- storage/ (file uploads, logs, cache, sessions)
- tests/ (Feature, Unit)
- vite.config.js & package.json (front-end build via Vite/NPM)

##### README
- It’s the stock Laravel README; no project-specific architecture described.
- Confirms Laravel’s core features (routing, DI, ORM, migrations, queues, broadcasting).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Browser Layer
    subgraph "Browser"
        direction TB
        BrowserAdmin["Admin UI"]:::frontend
        BrowserPublicStatic["Public UI (Static)"]:::frontend
        BrowserPublicDynamic["Public UI (Blade)"]:::frontend
    end

    %% Web Server
    WebServer["Web Server\n(Nginx/Apache + PHP-FPM)"]:::infra

    %% Laravel App
    subgraph "Laravel Application" 
        direction TB
        WebEntry["public/index.php"]:::core
        Router["HTTP Kernel & Router\n(routes/web.php)"]:::core
        subgraph "Application Layer"
            direction TB
            ControllersDirectory["Controllers"]:::core
            DashboardController["DashboardController"]:::core
            BeritaController["BeritaController"]:::core
            PermissionController["PermissionController"]:::core
            RequestsDirectory["Form Requests"]:::core
            BeritaRequest["BeritaRequest"]:::core
        end
        subgraph "Domain Layer"
            direction TB
            ModelsDirectory["Models"]:::core
            BeritaModel["Berita Model"]:::core
        end
        subgraph "Infrastructure"
            direction TB
            Database["Database\n(MySQL/PostgreSQL)"]:::infra
            FileStoragePublic["File Storage (public/uploads)"]:::infra
            FileStorageProtected["File Storage (storage/app/public)"]:::infra
            CacheConfig["Cache & Sessions"]:::infra
            QueueConfig["Queue Config"]:::infra
        end
        subgraph "Presentation Layer"
            direction TB
            ViewsAdminBerita["Berita Index View\n(resources/views/berita)"]:::core
            ViewsLayout["Main Layout\n(resources/views/layouts)"]:::core
            ViewsFrontendBerita["Frontend News View\n(resources/views/frontend/berita)"]:::core
            ViewsFrontendLayout["Frontend Layout\n(resources/views/frontend/layouts)"]:::core
        end
        WebEntry --> Router
        Router --> ControllersDirectory
        ControllersDirectory --> DashboardController
        ControllersDirectory --> BeritaController
        ControllersDirectory --> PermissionController
        ControllersDirectory --> RequestsDirectory
        RequestsDirectory --> BeritaRequest
        ControllersDirectory --> ModelsDirectory
        ModelsDirectory --> BeritaModel
        ControllersDirectory --> ViewsAdminBerita
        ControllersDirectory --> ViewsFrontendBerita
        ViewsAdminBerita --> ViewsLayout
        ViewsFrontendBerita --> ViewsFrontendLayout
        BeritaModel --> Database
        ControllersDirectory -->|dispatch jobs| QueueTable["Queue Table"]:::async
        QueueTable --> QueueWorker["Queue Worker"]:::async
        QueueWorker --> Mailable["KonfirmmasiPendaftaranSiswa"]:::core
        Mailable --> MailService["Mail Service\n(SMTP/Mailgun)"]:::infra
        FileStoragePublic --> WebServer
        FileStorageProtected --> WebServer
        CacheConfig --> ControllersDirectory
        CacheConfig --> QueueWorker
        QueueConfig --> QueueWorker
    end

    %% Asset Pipeline
    subgraph "Vite Asset Pipeline"
        direction TB
        AssetsSrcJS["resources/js/app.js"]:::frontend
        AssetsSrcCSS["resources/css/app.css"]:::frontend
        AssetsCompiledJS["public/js/custom.js"]:::frontend
        AssetsSrcJS -->|build| AssetsCompiledJS
        AssetsSrcCSS -->|build| AssetsCompiledJS
        AssetsCompiledJS --> BrowserAdmin
        AssetsCompiledJS --> BrowserPublicDynamic
    end

    %% Browser to Server Flow
    BrowserAdmin -->|"HTTP Request"| WebServer
    BrowserPublicStatic -->|"HTTP Request"| WebServer
    BrowserPublicDynamic -->|"HTTP Request"| WebServer
    WebServer --> WebEntry

    %% File Upload Flow
    BrowserAdmin -->|Upload| FileStoragePublic
    BrowserPublicDynamic -->|Upload| FileStorageProtected

    %% Click Events
    click BrowserAdmin "https://github.com/mohammadindraa/web_sekolah/blob/main/public/design-sistem/index.html"
    click BrowserPublicStatic "https://github.com/mohammadindraa/web_sekolah/blob/main/public/eduhome/index.html"
    click BrowserPublicDynamic "https://github.com/mohammadindraa/web_sekolah/blob/main/resources/views/frontend/index.blade.php"
    click WebEntry "https://github.com/mohammadindraa/web_sekolah/blob/main/public/index.php"
    click Router "https://github.com/mohammadindraa/web_sekolah/blob/main/routes/web.php"
    click ControllersDirectory "https://github.com/mohammadindraa/web_sekolah/tree/main/app/Http/Controllers"
    click DashboardController "https://github.com/mohammadindraa/web_sekolah/blob/main/app/Http/Controllers/DashboardController.php"
    click BeritaController "https://github.com/mohammadindraa/web_sekolah/blob/main/app/Http/Controllers/BeritaController.php"
    click PermissionController "https://github.com/mohammadindraa/web_sekolah/blob/main/app/Http/Controllers/PermissionController.php"
    click RequestsDirectory "https://github.com/mohammadindraa/web_sekolah/tree/main/app/Http/Requests"
    click BeritaRequest "https://github.com/mohammadindraa/web_sekolah/blob/main/app/Http/Requests/BeritaRequest.php"
    click ModelsDirectory "https://github.com/mohammadindraa/web_sekolah/tree/main/app/Models"
    click BeritaModel "https://github.com/mohammadindraa/web_sekolah/blob/main/app/Models/Berita.php"
    click ViewsAdminBerita "https://github.com/mohammadindraa/web_sekolah/blob/main/resources/views/berita/index.blade.php"
    click ViewsLayout "https://github.com/mohammadindraa/web_sekolah/blob/main/resources/views/layouts/main.blade.php"
    click ViewsFrontendBerita "https://github.com/mohammadindraa/web_sekolah/blob/main/resources/views/frontend/berita.blade.php"
    click ViewsFrontendLayout "https://github.com/mohammadindraa/web_sekolah/blob/main/resources/views/frontend/layouts/main.blade.php"
    click AssetsSrcJS "https://github.com/mohammadindraa/web_sekolah/blob/main/resources/js/app.js"
    click AssetsSrcCSS "https://github.com/mohammadindraa/web_sekolah/blob/main/resources/css/app.css"
    click AssetsCompiledJS "https://github.com/mohammadindraa/web_sekolah/blob/main/public/js/custom.js"
    click Database "https://github.com/mohammadindraa/web_sekolah/tree/main/database/migrations"
    click QueueTable "https://github.com/mohammadindraa/web_sekolah/blob/main/database/migrations/0001_01_01_000002_create_jobs_table.php"
    click CreateBeritasMigration "https://github.com/mohammadindraa/web_sekolah/blob/main/database/migrations/2025_03_10_155229_create_beritas_table.php"
    click SeederDir "https://github.com/mohammadindraa/web_sekolah/tree/main/database/seeders"
    click RoleSeeder "https://github.com/mohammadindraa/web_sekolah/blob/main/database/seeders/RoleSeeder.php"
    click FileStoragePublic "https://github.com/mohammadindraa/web_sekolah/tree/main/public/uploads"
    click UploadsBerita "https://github.com/mohammadindraa/web_sekolah/tree/main/public/uploads/berita"
    click FileStorageProtected "https://github.com/mohammadindraa/web_sekolah/tree/main/storage/app/public"
    click QueueConfig "https://github.com/mohammadindraa/web_sekolah/blob/main/config/queue.php"
    click Mailable "https://github.com/mohammadindraa/web_sekolah/blob/main/app/Mail/KonfirmmasiPendaftaranSiswa.php"
    click MailView "https://github.com/mohammadindraa/web_sekolah/blob/main/resources/views/emails/konfirmasi_pendaftaran_siswa.blade.php"
    click CacheConfig "https://github.com/mohammadindraa/web_sekolah/blob/main/config/cache.php"
    click SessionConfig "https://github.com/mohammadindraa/web_sekolah/blob/main/config/session.php"
    click PermissionConfig "https://github.com/mohammadindraa/web_sekolah/blob/main/config/permission.php"
    click AppProvider "https://github.com/mohammadindraa/web_sekolah/blob/main/app/Providers/AppServiceProvider.php"
    click TestsFeature "https://github.com/mohammadindraa/web_sekolah/tree/main/tests/Feature"
    click TestsUnit "https://github.com/mohammadindraa/web_sekolah/tree/main/tests/Unit"

    %% Styles
    classDef core fill:#cce5ff,stroke:#3399ff,color:#000
    classDef infra fill:#d4edda,stroke:#28a745,color:#000
    classDef frontend fill:#fff3cd,stroke:#ffc107,color:#000
    classDef async stroke-dasharray: 5 5,stroke:#6c757d,color:#000
```
