# raihannawawi/pbl110_ruang_aman architecture

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

- Interactive diagram: https://gitdiagram.com/raihannawawi/pbl110_ruang_aman
- Repository: https://github.com/raihannawawi/pbl110_ruang_aman

## Overview

RuangAman is a PHP prototype for campus violence and harassment reporting, case follow-up, education, and emergency support. The intended reporter journey covers identity, incident and evidence details, confirmation, submission, then ticket-based tracking; Satgas and administrator screens represent separate case-handling and account-management capabilities. In the inspected code, these are static/demo interfaces routed by `index.php`, not a live reporting system: authentication, persistence, and server-side processing are explicitly unimplemented. Edges are limited to routes and references visible in the excerpts or README; unsampled page links are not inferred.

Main entry points: [`index.php`](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/index.php) (Page router), [`frontend/pages/login.php`](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/login.php) (Login screen), [`frontend/pages/dashboard-admin.php`](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/dashboard-admin.php) (Admin dashboard), [`backend/config/app.php`](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/backend/config/app.php) (App configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Routing and Setup"]
  node_router["Page router<br/>[index.php]"]
  node_appconfig["App configuration<br/>[app.php]"]
  node_layout["Reusable layout<br/>[layout.js]"]
  node_login["Login screen<br/>[login.php]"]
  node_login_reporter["Reporter login<br/>[login-pelapor.php]"]
  node_login_satgas["Satgas login<br/>[login-satgas.php]"]
  node_login_admin["Admin login<br/>[login-admin.php]"]
  node_magic_link["Magic link<br/>[magic-link.php]"]
end

subgraph group_reporter["Reporter Journey"]
  node_reporter_identity["Reporter identity<br/>[data-diri.php]"]
  node_incident_details["Incident details"]
  node_perpetrator_evidence["Perpetrator and evidence<br/>[pelaku-bukti.php]"]
  node_report_confirmation["Report confirmation<br/>[konfirmasi.php]"]
  node_report_success["Submission result<br/>[berhasil.php]"]
  node_identity_success["Identified result"]
  node_tracking["Report tracking<br/>[lacak-laporan.php]"]
  node_reporter_case["Reporter case view<br/>[detail-laporan.php]"]
  node_reporter_dashboard["Reporter dashboard"]
end

subgraph group_casework["Casework and Administration"]
  node_satgas_dashboard["Satgas dashboard"]
  node_case_verification["Case verification"]
  node_verification_result["Verification result"]
  node_satgas_case["Satgas case detail"]
  node_conversation["Case conversation<br/>[chat-detail.php]"]
  node_conversation_list["Conversation list<br/>[chat-list.php]"]
  node_admin_dashboard["Admin dashboard"]
  node_admin_case["Admin case detail"]
  node_user_management["User management<br/>[pengguna-admin.php]"]
  node_user_detail["User detail"]
  node_user_form["User account form"]
end

subgraph group_support["Information and Support"]
  node_education["Education articles<br/>[edukasi.php]"]
  node_education_detail["Article detail<br/>[detail-edukasi.php]"]
  node_emergency_contacts["Emergency contacts<br/>[kontak-darurat.php]"]
  node_contact_detail["Support detail<br/>[detail-kontak.php]"]
  node_home["Home page<br/>[beranda.php]"]
end

node_visitor(("Campus community"))

node_visitor -->|"opens pages"| node_router
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_login_reporter
node_router -->|"routes to"| node_login_satgas
node_router -->|"routes to"| node_login_admin
node_router -->|"routes to"| node_magic_link
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_education
node_router -->|"routes to"| node_education_detail
node_router -->|"routes to"| node_emergency_contacts
node_router -->|"routes to"| node_contact_detail
node_router -->|"routes to"| node_tracking
node_router -->|"routes to"| node_perpetrator_evidence
node_router -->|"routes to"| node_report_confirmation
node_router -->|"routes to"| node_report_success
node_router -->|"routes to"| node_identity_success
node_router -->|"routes to"| node_reporter_dashboard
node_router -->|"routes to"| node_satgas_case
node_router -->|"routes to"| node_case_verification
node_router -->|"routes to"| node_verification_result
node_router -->|"routes to"| node_conversation_list
node_router -->|"routes to"| node_conversation
node_router -->|"routes to"| node_user_management
node_router -->|"routes to"| node_user_detail
node_router -->|"routes to"| node_user_form
node_login -->|"reads config"| node_appconfig
node_admin_dashboard -->|"loads layout"| node_layout

click node_router "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/index.php"
click node_appconfig "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/backend/config/app.php"
click node_layout "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/js/layout.js"
click node_reporter_identity "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/data-diri.php"
click node_incident_details "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-kejadian.php"
click node_perpetrator_evidence "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/pelaku-bukti.php"
click node_report_confirmation "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/konfirmasi.php"
click node_report_success "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/berhasil.php"
click node_identity_success "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/berhasil-identitas.php"
click node_tracking "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/lacak-laporan.php"
click node_reporter_case "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-laporan.php"
click node_reporter_dashboard "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/dashboard-pelapor.php"
click node_satgas_dashboard "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/dashboard-satgas.php"
click node_case_verification "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/verifikasi-laporan-satgas.php"
click node_verification_result "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/hasil-verifikasi-laporan-satgas.php"
click node_satgas_case "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-laporan-satgas.php"
click node_conversation "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/chat-detail.php"
click node_conversation_list "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/chat-list.php"
click node_admin_dashboard "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/dashboard-admin.php"
click node_admin_case "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-laporan-admin.php"
click node_user_management "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/pengguna-admin.php"
click node_user_detail "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-pengguna-admin.php"
click node_user_form "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/form-pengguna-admin.php"
click node_education "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/edukasi.php"
click node_education_detail "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-edukasi.php"
click node_emergency_contacts "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/kontak-darurat.php"
click node_contact_detail "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-kontak.php"
click node_home "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/beranda.php"
click node_login "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/login.php"
click node_login_reporter "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/login-pelapor.php"
click node_login_satgas "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/login-satgas.php"
click node_login_admin "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/login-admin.php"
click node_magic_link "https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/magic-link.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_router,node_appconfig,node_layout,node_login,node_login_reporter,node_login_satgas,node_login_admin,node_magic_link toneBlue
class node_reporter_identity,node_incident_details,node_perpetrator_evidence,node_report_confirmation,node_report_success,node_identity_success,node_tracking,node_reporter_case,node_reporter_dashboard toneAmber
class node_satgas_dashboard,node_case_verification,node_verification_result,node_satgas_case,node_conversation,node_conversation_list,node_admin_dashboard,node_admin_case,node_user_management,node_user_detail,node_user_form toneMint
class node_education,node_education_detail,node_emergency_contacts,node_contact_detail,node_home toneRose
class node_visitor toneIndigo
```

## Components

### Routing and Setup

- [Page router](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/index.php): `index.php`
- [App configuration](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/backend/config/app.php): `backend/config/app.php`
- [Reusable layout](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/js/layout.js): `frontend/js/layout.js`
- [Login screen](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/login.php): `frontend/pages/login.php`
- [Reporter login](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/login-pelapor.php): `frontend/pages/login-pelapor.php`
- [Satgas login](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/login-satgas.php): `frontend/pages/login-satgas.php`
- [Admin login](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/login-admin.php): `frontend/pages/login-admin.php`
- [Magic link](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/magic-link.php): `frontend/pages/magic-link.php`

### Reporter Journey

- [Reporter identity](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/data-diri.php): `frontend/pages/data-diri.php`
- [Incident details](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-kejadian.php): `frontend/pages/detail-kejadian.php`
- [Perpetrator and evidence](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/pelaku-bukti.php): `frontend/pages/pelaku-bukti.php`
- [Report confirmation](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/konfirmasi.php): `frontend/pages/konfirmasi.php`
- [Submission result](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/berhasil.php): `frontend/pages/berhasil.php`
- [Identified result](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/berhasil-identitas.php): `frontend/pages/berhasil-identitas.php`
- [Report tracking](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/lacak-laporan.php): `frontend/pages/lacak-laporan.php`
- [Reporter case view](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-laporan.php): `frontend/pages/detail-laporan.php`
- [Reporter dashboard](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/dashboard-pelapor.php): `frontend/pages/dashboard-pelapor.php`

### Casework and Administration

- [Satgas dashboard](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/dashboard-satgas.php): `frontend/pages/dashboard-satgas.php`
- [Case verification](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/verifikasi-laporan-satgas.php): `frontend/pages/verifikasi-laporan-satgas.php`
- [Verification result](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/hasil-verifikasi-laporan-satgas.php): `frontend/pages/hasil-verifikasi-laporan-satgas.php`
- [Satgas case detail](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-laporan-satgas.php): `frontend/pages/detail-laporan-satgas.php`
- [Case conversation](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/chat-detail.php): `frontend/pages/chat-detail.php`
- [Conversation list](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/chat-list.php): `frontend/pages/chat-list.php`
- [Admin dashboard](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/dashboard-admin.php): `frontend/pages/dashboard-admin.php`
- [Admin case detail](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-laporan-admin.php): `frontend/pages/detail-laporan-admin.php`
- [User management](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/pengguna-admin.php): `frontend/pages/pengguna-admin.php`
- [User detail](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-pengguna-admin.php): `frontend/pages/detail-pengguna-admin.php`
- [User account form](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/form-pengguna-admin.php): `frontend/pages/form-pengguna-admin.php`

### Information and Support

- [Education articles](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/edukasi.php): `frontend/pages/edukasi.php`
- [Article detail](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-edukasi.php): `frontend/pages/detail-edukasi.php`
- [Emergency contacts](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/kontak-darurat.php): `frontend/pages/kontak-darurat.php`
- [Support detail](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/detail-kontak.php): `frontend/pages/detail-kontak.php`
- [Home page](https://github.com/raihannawawi/pbl110_ruang_aman/blob/main/frontend/pages/beranda.php): `frontend/pages/beranda.php`

### Other components

- **Campus community**

## Connections

- Campus community → Page router: opens pages (evidence: `README.md`)
- Page router → Login screen: routes to (evidence: `index.php`)
- Page router → Reporter login: routes to (evidence: `index.php`)
- Page router → Satgas login: routes to (evidence: `index.php`)
- Page router → Admin login: routes to (evidence: `index.php`)
- Page router → Magic link: routes to (evidence: `index.php`)
- Page router → Home page: routes to (evidence: `index.php`)
- Page router → Education articles: routes to (evidence: `index.php`)
- Page router → Article detail: routes to (evidence: `index.php`)
- Page router → Emergency contacts: routes to (evidence: `index.php`)
- Page router → Support detail: routes to (evidence: `index.php`)
- Page router → Report tracking: routes to (evidence: `index.php`)
- Page router → Perpetrator and evidence: routes to (evidence: `index.php`)
- Page router → Report confirmation: routes to (evidence: `index.php`)
- Page router → Submission result: routes to (evidence: `index.php`)
- Page router → Identified result: routes to (evidence: `index.php`)
- Page router → Reporter dashboard: routes to (evidence: `index.php`)
- Page router → Satgas case detail: routes to (evidence: `index.php`)
- Page router → Case verification: routes to (evidence: `index.php`)
- Page router → Verification result: routes to (evidence: `index.php`)
- Page router → Conversation list: routes to (evidence: `index.php`)
- Page router → Case conversation: routes to (evidence: `index.php`)
- Page router → User management: routes to (evidence: `index.php`)
- Page router → User detail: routes to (evidence: `index.php`)
- Page router → User account form: routes to (evidence: `index.php`)
- Login screen → App configuration: reads config (evidence: `frontend/pages/login.php`)
- Admin dashboard → Reusable layout: loads layout (evidence: `frontend/pages/dashboard-admin.php`)
