# kimygit/pentol-demo-project architecture

> Architecture diagram of the GitHub repository kimygit/pentol-demo-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kimygit/pentol-demo-project
- Repository: https://github.com/kimygit/pentol-demo-project

## Overview

This is a PHP library-management application for administrators and students. The main student workflow is browsing available books and submitting a loan request; administrators have separate views for managing the catalogue, members, loans, returns, and transactions. Both roles enter through role-checked dashboards, with login handled separately. The excerpts show database-backed catalogue and dashboard queries. Other domain modules are preserved from the source index, but their internal behavior and some action-handler links were not sampled.

Main entry points: [`admin/index.php`](https://github.com/kimygit/pentol-demo-project/blob/main/admin/index.php) (Admin portal), [`inc/koneksi.php`](https://github.com/kimygit/pentol-demo-project/blob/main/inc/koneksi.php) (Library database), [`siswa/index.php`](https://github.com/kimygit/pentol-demo-project/blob/main/siswa/index.php) (Student portal), [`inc/proslog.php`](https://github.com/kimygit/pentol-demo-project/blob/main/inc/proslog.php) (Login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and dashboards"]
  node_login["Login<br/>[proslog.php]"]
  node_admin_app["Admin portal<br/>[index.php]"]
  node_student_app["Student portal<br/>[index.php]"]
  node_admin_dashboard["Admin overview<br/>[dashboard.php]"]
  node_student_dashboard["Student overview<br/>[dashboard.php]"]
  node_login_form["Login page<br/>[index.php]"]
  node_signup["Student signup"]
end

subgraph group_library["Library management"]
  node_members["Member records<br/>[anggota.php]"]
  node_catalog["Book catalogue<br/>[buku.php]"]
  node_book_edit["Book editing<br/>[editbuku.php]"]
  node_student_catalog["Browse books<br/>[peminjaman.php]"]
end

subgraph group_circulation["Loan circulation"]
  node_loan_request["Loan request<br/>[tambahpinjam.php]"]
  node_admin_loans["Loan oversight<br/>[peminjaman.php]"]
  node_admin_returns["Return oversight<br/>[pengembalian.php]"]
  node_student_returns["Student returns<br/>[pengembalian.php]"]
  node_transactions["Transactions<br/>[transaksi.php]"]
  node_reporting["Reports and print<br/>[cetak_laporan.php]"]
end

subgraph group_shared["Shared services"]
  node_database[("Library database<br/>[koneksi.php]")]
end

node_visitor(("User"))

node_visitor -.->|"opens"| node_login_form
node_login_form -.->|"submits credentials"| node_login
node_login -.->|"routes admin"| node_admin_app
node_login -.->|"routes student"| node_student_app
node_admin_app -->|"routes default"| node_admin_dashboard
node_admin_app -->|"routes members"| node_members
node_admin_app -->|"routes catalogue"| node_catalog
node_admin_app -->|"routes editing"| node_book_edit
node_admin_app -->|"routes loans"| node_admin_loans
node_admin_app -->|"routes returns"| node_admin_returns
node_admin_app -->|"routes transactions"| node_transactions
node_student_app -->|"routes default"| node_student_dashboard
node_student_app -->|"routes catalogue"| node_student_catalog
node_student_app -->|"routes returns"| node_student_returns
node_student_catalog -->|"submits request"| node_loan_request
node_catalog -->|"reads and writes"| node_database
node_admin_dashboard -->|"queries summaries"| node_database
node_student_catalog -->|"reads available books"| node_database
node_student_dashboard -->|"queries activity"| node_database
node_loan_request -->|"records request"| node_database
node_visitor -.->|"creates account"| node_signup
node_transactions -->|"offers report link"| node_reporting

click node_login "https://github.com/kimygit/pentol-demo-project/blob/main/inc/proslog.php"
click node_admin_app "https://github.com/kimygit/pentol-demo-project/blob/main/admin/index.php"
click node_student_app "https://github.com/kimygit/pentol-demo-project/blob/main/siswa/index.php"
click node_admin_dashboard "https://github.com/kimygit/pentol-demo-project/blob/main/admin/dashboard.php"
click node_student_dashboard "https://github.com/kimygit/pentol-demo-project/blob/main/siswa/dashboard.php"
click node_members "https://github.com/kimygit/pentol-demo-project/blob/main/admin/anggota.php"
click node_catalog "https://github.com/kimygit/pentol-demo-project/blob/main/admin/buku.php"
click node_book_edit "https://github.com/kimygit/pentol-demo-project/blob/main/admin/editbuku.php"
click node_student_catalog "https://github.com/kimygit/pentol-demo-project/blob/main/siswa/peminjaman.php"
click node_loan_request "https://github.com/kimygit/pentol-demo-project/blob/main/siswa/tambahpinjam.php"
click node_admin_loans "https://github.com/kimygit/pentol-demo-project/blob/main/admin/peminjaman.php"
click node_admin_returns "https://github.com/kimygit/pentol-demo-project/blob/main/admin/pengembalian.php"
click node_student_returns "https://github.com/kimygit/pentol-demo-project/blob/main/siswa/pengembalian.php"
click node_transactions "https://github.com/kimygit/pentol-demo-project/blob/main/admin/transaksi.php"
click node_reporting "https://github.com/kimygit/pentol-demo-project/blob/main/admin/cetak_laporan.php"
click node_database "https://github.com/kimygit/pentol-demo-project/blob/main/inc/koneksi.php"
click node_login_form "https://github.com/kimygit/pentol-demo-project/blob/main/index.php"
click node_signup "https://github.com/kimygit/pentol-demo-project/blob/main/tambah_akunsiswa.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_login,node_admin_app,node_student_app,node_admin_dashboard,node_student_dashboard,node_login_form,node_signup,node_visitor toneBlue
class node_members,node_catalog,node_book_edit,node_student_catalog toneAmber
class node_loan_request,node_admin_loans,node_admin_returns,node_student_returns,node_transactions,node_reporting toneMint
class node_database toneRose
```

## Components

### Access and dashboards

- [Login](https://github.com/kimygit/pentol-demo-project/blob/main/inc/proslog.php): `inc/proslog.php`
- [Admin portal](https://github.com/kimygit/pentol-demo-project/blob/main/admin/index.php): `admin/index.php`
- [Student portal](https://github.com/kimygit/pentol-demo-project/blob/main/siswa/index.php): `siswa/index.php`
- [Admin overview](https://github.com/kimygit/pentol-demo-project/blob/main/admin/dashboard.php): `admin/dashboard.php`
- [Student overview](https://github.com/kimygit/pentol-demo-project/blob/main/siswa/dashboard.php): `siswa/dashboard.php`
- [Login page](https://github.com/kimygit/pentol-demo-project/blob/main/index.php): `index.php`
- [Student signup](https://github.com/kimygit/pentol-demo-project/blob/main/tambah_akunsiswa.php): `tambah_akunsiswa.php`

### Library management

- [Member records](https://github.com/kimygit/pentol-demo-project/blob/main/admin/anggota.php): `admin/anggota.php`
- [Book catalogue](https://github.com/kimygit/pentol-demo-project/blob/main/admin/buku.php): `admin/buku.php`
- [Book editing](https://github.com/kimygit/pentol-demo-project/blob/main/admin/editbuku.php): `admin/editbuku.php`
- [Browse books](https://github.com/kimygit/pentol-demo-project/blob/main/siswa/peminjaman.php): `siswa/peminjaman.php`

### Loan circulation

- [Loan request](https://github.com/kimygit/pentol-demo-project/blob/main/siswa/tambahpinjam.php): `siswa/tambahpinjam.php`
- [Loan oversight](https://github.com/kimygit/pentol-demo-project/blob/main/admin/peminjaman.php): `admin/peminjaman.php`
- [Return oversight](https://github.com/kimygit/pentol-demo-project/blob/main/admin/pengembalian.php): `admin/pengembalian.php`
- [Student returns](https://github.com/kimygit/pentol-demo-project/blob/main/siswa/pengembalian.php): `siswa/pengembalian.php`
- [Transactions](https://github.com/kimygit/pentol-demo-project/blob/main/admin/transaksi.php): `admin/transaksi.php`
- [Reports and print](https://github.com/kimygit/pentol-demo-project/blob/main/admin/cetak_laporan.php): `admin/cetak_laporan.php`

### Shared services

- [Library database](https://github.com/kimygit/pentol-demo-project/blob/main/inc/koneksi.php): `inc/koneksi.php`

### Other components

- **User**

## Connections

- User → Login page: opens
- Login page → Login: submits credentials
- Login → Admin portal: routes admin
- Login → Student portal: routes student
- Admin portal → Admin overview: routes default (evidence: `admin/index.php`)
- Admin portal → Member records: routes members (evidence: `admin/index.php`)
- Admin portal → Book catalogue: routes catalogue (evidence: `admin/index.php`)
- Admin portal → Book editing: routes editing (evidence: `admin/index.php`)
- Admin portal → Loan oversight: routes loans (evidence: `admin/index.php`)
- Admin portal → Return oversight: routes returns (evidence: `admin/index.php`)
- Admin portal → Transactions: routes transactions (evidence: `admin/index.php`)
- Student portal → Student overview: routes default (evidence: `siswa/index.php`)
- Student portal → Browse books: routes catalogue (evidence: `siswa/index.php`)
- Student portal → Student returns: routes returns (evidence: `siswa/index.php`)
- Browse books → Loan request: submits request (evidence: `siswa/peminjaman.php`)
- Book catalogue → Library database: reads and writes (evidence: `admin/buku.php`)
- Admin overview → Library database: queries summaries (evidence: `admin/dashboard.php`)
- Browse books → Library database: reads available books (evidence: `siswa/peminjaman.php`)
- Student overview → Library database: queries activity (evidence: `siswa/dashboard.php`)
- Loan request → Library database: records request (evidence: `siswa/tambahpinjam.php`)
- User → Student signup: creates account
- Transactions → Reports and print: offers report link (evidence: `admin/transaksi.php`)
