# rikarani/sistem-informasi-perpustakaan architecture

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

- Interactive diagram: https://gitdiagram.com/rikarani/sistem-informasi-perpustakaan
- Repository: https://github.com/rikarani/sistem-informasi-perpustakaan

## Overview

##### Project type and purpose
- This is a monolithic, full-stack web application (“Manajemen Perpustakaan”) built on Laravel (PHP) with Blade templates and Livewire for reactive UI components. It provides CRUD operations for books, categories, members and loan management, plus authentication and a dashboard.

##### File structure
- Top-level:
- `app/` contains MVC backend (Controllers, Models, Livewire components).
- `routes/web.php` defines HTTP routes.
- `resources/views/` holds Blade views (UI layer).
- `resources/js/` & `resources/css/` and `vite.config.js` for frontend asset bundling (Vite + Tailwind).
- `database/` folder holds migrations, factories and seeders for the MySQL/SQL database.
- `public/` is the document root (index.php, static assets).
- Config files (`config/`), bootstrap, storage, and infrastructure (GitHub Actions CI/CD).

##### Key architecture insights from README
- Standard Laravel setup (Composer, Artisan, NPM/Vite dev server).
- No microservices—uses Laravel’s built-in queue, cache, session and filesystem.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        direction TB
        Browser["Browser"]:::frontend
        Assets["Static Assets"]:::frontend
        Vite["Vite Dev Server / CDN"]:::frontend
    end

    Browser -->|load assets| Assets
    Browser -->|HTTP requests| WebServer
    Browser -->|hot reload / assets| Vite
    Assets -->|bundled by| Vite

    %% Backend Layer
    subgraph "Backend Layer"
        direction TB
        WebServer["Web Server + PHP-FPM"]:::backend
        Laravel["Laravel Application"]:::backend
    end

    WebServer -->|forwards HTTP| Laravel

    %% Laravel Application Breakdown
    subgraph "Laravel Application"
        direction TB
        Kernel["HTTP Kernel / Middleware"]
        Routes["Routes"]:::backend
        Controllers["Controllers"]:::backend
        Models["Eloquent Models"]:::data
        Views["Blade Views"]:::frontend
        Livewire["Livewire Components"]:::frontend
        Config["Config (.env → config/*)"]:::backend
    end

    Laravel --> Kernel
    Kernel --> Routes
    Routes --> Controllers
    Routes --> Livewire
    Controllers --> Models
    Controllers --> Views
    Livewire --> Controllers
    Config --> Laravel

    %% Data & Storage Layer
    subgraph "Data & Storage Layer"
        direction TB
        Database["Database (MySQL/PostgreSQL)"]:::data
        CacheQueue["Cache / Queue (Redis or DB)"]:::data
        Storage["Filesystem Storage / S3"]:::data
    end

    Models -->|SQL CRUD| Database
    Controllers -->|cache/session/jobs| CacheQueue
    Controllers -->|file upload/download| Storage

    %% External Services
    External["External Services (Mail, OAuth, 3rd-party APIs)"]:::external
    Controllers -->|API calls| External

    %% CI/CD
    subgraph "CI/CD Integration"
        direction TB
        CI["GitHub Actions CI/CD"]:::external
    end

    CI -->|deploy| WebServer

    %% Click Events
    click Assets "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/resources/js/app.js"
    click Assets "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/resources/js/toast.js"
    click Assets "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/resources/css/app.css"
    click Assets "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/public/index.php"
    click Vite "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/vite.config.js"
    click Vite "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/package.json"
    click Vite "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/postcss.config.js"
    click Vite "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/tailwind.config.js"
    click WebServer "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/public/index.php"
    click WebServer "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/public/.htaccess"
    click Routes "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/routes/web.php"
    click Routes "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/routes/console.php"
    click Controllers "https://github.com/rikarani/sistem-informasi-perpustakaan/tree/main/app/Http/Controllers"
    click Models "https://github.com/rikarani/sistem-informasi-perpustakaan/tree/main/app/Models"
    click Views "https://github.com/rikarani/sistem-informasi-perpustakaan/tree/main/resources/views"
    click Livewire "https://github.com/rikarani/sistem-informasi-perpustakaan/tree/main/app/Livewire"
    click CI "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/.github/workflows/lint.yaml"
    click CI "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/.github/workflows/preview.yaml"
    click CI "https://github.com/rikarani/sistem-informasi-perpustakaan/blob/main/.github/workflows/deploy.yaml"

    %% Styles
    classDef frontend fill:#D6E9FE,stroke:#5DADE2,color:#1B4F72;
    classDef backend fill:#D5F5E3,stroke:#28B463,color:#186A3B;
    classDef data fill:#FCF3CF,stroke:#F4D03F,color:#7D6608;
    classDef external fill:#EBEDEF,stroke:#A6ACAF,color:#616A6B;
```
