# tiazfebias/spk_maut architecture

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

- Interactive diagram: https://gitdiagram.com/tiazfebias/spk_maut
- Repository: https://github.com/tiazfebias/spk_maut

## Overview

This is a PHP web-based decision-support system (SPK MAUT) for evaluating and ranking school staff. The principal workflow is user sign-in, maintenance of alternatives and criteria, entry of assessments, period-based MAUT calculation, then review and reporting of rankings. Separate report endpoints provide ranking details and export formats. The excerpts confirm some database, authentication, and page-shell relationships; several domain pages were read but their runtime calls are not exposed in the index, so those links are omitted or marked unverified rather than treated as observed calls.

Main entry points: [`config/database.php`](https://github.com/tiazfebias/spk_maut/blob/main/config/database.php) (Database connection), [`dashboard.php`](https://github.com/tiazfebias/spk_maut/blob/main/dashboard.php) (Dashboard), [`kriteria`](https://github.com/tiazfebias/spk_maut/tree/main/kriteria) (Criteria management), [`login.php`](https://github.com/tiazfebias/spk_maut/blob/main/login.php) (Sign in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and shell"]
  node_login["Sign in<br/>[login.php]"]
  node_auth["Session and roles<br/>[auth.php]"]
  node_dashboard["Dashboard<br/>[dashboard.php]"]
  node_navigation["Application navigation<br/>[sidebar.php]"]
  node_page_header["User header<br/>[header.php]"]
  node_page_footer["Page footer<br/>[footer.php]"]
  node_db_config["Database connection<br/>[database.php]"]
end

subgraph group_inputs["Evaluation inputs"]
  node_alternatives["Alternative management"]
  node_criteria["Criteria management"]
  node_assessments["Assessment management"]
end

subgraph group_analysis["MAUT analysis"]
  node_calculation["MAUT calculation"]
  node_period_admin["Calculation periods"]
end

subgraph group_outputs["Results and reports"]
  node_results["Ranked results<br/>[index_hasil.php]"]
  node_reports["Reports and exports<br/>[laporan.php]"]
  node_ranking_endpoint["Period ranking lookup<br/>[get_ranking.php]"]
  node_detail_endpoint["Alternative calculation detail"]
end

node_user(("Staff user"))
node_database[("SPK MAUT database")]

node_user -->|"signs in"| node_login
node_login -->|"authenticates with"| node_db_config
node_login -->|"redirects after login"| node_dashboard
node_dashboard -->|"queries through"| node_db_config
node_dashboard -->|"requires session"| node_auth
node_dashboard -->|"renders"| node_navigation
node_dashboard -->|"renders"| node_page_header
node_dashboard -->|"renders"| node_page_footer
node_db_config -->|"connects to"| node_database
node_navigation -->|"links to"| node_criteria
node_alternatives -.->|"uses connection"| node_db_config
node_criteria -->|"checks roles"| node_auth
node_criteria -->|"uses connection"| node_db_config
node_assessments -.->|"stores evaluations"| node_database
node_calculation -.->|"reads and saves calculations"| node_database
node_period_admin -.->|"manages period data"| node_database
node_results -.->|"reads rankings"| node_database
node_reports -.->|"loads rankings"| node_ranking_endpoint
node_ranking_endpoint -->|"queries through"| node_db_config
node_ranking_endpoint -->|"offers detail action"| node_detail_endpoint
node_detail_endpoint -->|"queries through"| node_db_config
node_user -.->|"maintains inputs"| node_alternatives
node_user -.->|"maintains inputs"| node_criteria
node_user -.->|"records evaluations"| node_assessments
node_user -.->|"runs calculation"| node_calculation
node_user -.->|"reviews rankings"| node_results
node_user -.->|"requests reports"| node_reports

click node_login "https://github.com/tiazfebias/spk_maut/blob/main/login.php"
click node_auth "https://github.com/tiazfebias/spk_maut/blob/main/includes/auth.php"
click node_dashboard "https://github.com/tiazfebias/spk_maut/blob/main/dashboard.php"
click node_navigation "https://github.com/tiazfebias/spk_maut/blob/main/includes/sidebar.php"
click node_page_header "https://github.com/tiazfebias/spk_maut/blob/main/includes/header.php"
click node_page_footer "https://github.com/tiazfebias/spk_maut/blob/main/includes/footer.php"
click node_db_config "https://github.com/tiazfebias/spk_maut/blob/main/config/database.php"
click node_alternatives "https://github.com/tiazfebias/spk_maut/tree/main/alternatif"
click node_criteria "https://github.com/tiazfebias/spk_maut/tree/main/kriteria"
click node_assessments "https://github.com/tiazfebias/spk_maut/tree/main/Penilaian"
click node_calculation "https://github.com/tiazfebias/spk_maut/blob/main/perhitungan/index_perhitungan.php"
click node_period_admin "https://github.com/tiazfebias/spk_maut/tree/main/perhitungan"
click node_results "https://github.com/tiazfebias/spk_maut/blob/main/hasil/index_hasil.php"
click node_reports "https://github.com/tiazfebias/spk_maut/blob/main/laporan/laporan.php"
click node_ranking_endpoint "https://github.com/tiazfebias/spk_maut/blob/main/laporan/get_ranking.php"
click node_detail_endpoint "https://github.com/tiazfebias/spk_maut/blob/main/laporan/detail_alternatif.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_auth,node_dashboard,node_navigation,node_page_header,node_page_footer,node_db_config,node_user toneBlue
class node_alternatives,node_criteria,node_assessments,node_database toneAmber
class node_calculation,node_period_admin toneMint
class node_results,node_reports,node_ranking_endpoint,node_detail_endpoint toneRose
```

## Components

### Access and shell

- [Sign in](https://github.com/tiazfebias/spk_maut/blob/main/login.php): `login.php`
- [Session and roles](https://github.com/tiazfebias/spk_maut/blob/main/includes/auth.php): `includes/auth.php`
- [Dashboard](https://github.com/tiazfebias/spk_maut/blob/main/dashboard.php): `dashboard.php`
- [Application navigation](https://github.com/tiazfebias/spk_maut/blob/main/includes/sidebar.php): `includes/sidebar.php`
- [User header](https://github.com/tiazfebias/spk_maut/blob/main/includes/header.php): `includes/header.php`
- [Page footer](https://github.com/tiazfebias/spk_maut/blob/main/includes/footer.php): `includes/footer.php`
- [Database connection](https://github.com/tiazfebias/spk_maut/blob/main/config/database.php): `config/database.php`

### Evaluation inputs

- [Alternative management](https://github.com/tiazfebias/spk_maut/tree/main/alternatif): `alternatif`
- [Criteria management](https://github.com/tiazfebias/spk_maut/tree/main/kriteria): `kriteria`
- [Assessment management](https://github.com/tiazfebias/spk_maut/tree/main/Penilaian): `Penilaian`

### MAUT analysis

- [MAUT calculation](https://github.com/tiazfebias/spk_maut/blob/main/perhitungan/index_perhitungan.php): `perhitungan/index_perhitungan.php`
- [Calculation periods](https://github.com/tiazfebias/spk_maut/tree/main/perhitungan): `perhitungan`

### Results and reports

- [Ranked results](https://github.com/tiazfebias/spk_maut/blob/main/hasil/index_hasil.php): `hasil/index_hasil.php`
- [Reports and exports](https://github.com/tiazfebias/spk_maut/blob/main/laporan/laporan.php): `laporan/laporan.php`
- [Period ranking lookup](https://github.com/tiazfebias/spk_maut/blob/main/laporan/get_ranking.php): `laporan/get_ranking.php`
- [Alternative calculation detail](https://github.com/tiazfebias/spk_maut/blob/main/laporan/detail_alternatif.php): `laporan/detail_alternatif.php`

### Other components

- **Staff user**
- **SPK MAUT database**

## Connections

- Staff user → Sign in: signs in (evidence: `login.php`)
- Sign in → Database connection: authenticates with (evidence: `login.php`)
- Sign in → Dashboard: redirects after login (evidence: `login.php`)
- Dashboard → Database connection: queries through (evidence: `dashboard.php`)
- Dashboard → Session and roles: requires session (evidence: `dashboard.php`)
- Dashboard → Application navigation: renders (evidence: `dashboard.php`)
- Dashboard → User header: renders (evidence: `dashboard.php`)
- Dashboard → Page footer: renders (evidence: `dashboard.php`)
- Database connection → SPK MAUT database: connects to (evidence: `config/database.php`)
- Application navigation → Criteria management: links to (evidence: `includes/sidebar.php`)
- Alternative management → Database connection: uses connection
- Criteria management → Session and roles: checks roles (evidence: `kriteria/hapuskriteria.php`)
- Criteria management → Database connection: uses connection (evidence: `kriteria/hapuskriteria.php`)
- Assessment management → SPK MAUT database: stores evaluations
- MAUT calculation → SPK MAUT database: reads and saves calculations
- Calculation periods → SPK MAUT database: manages period data
- Ranked results → SPK MAUT database: reads rankings
- Reports and exports → Period ranking lookup: loads rankings
- Period ranking lookup → Database connection: queries through (evidence: `laporan/get_ranking.php`)
- Period ranking lookup → Alternative calculation detail: offers detail action (evidence: `laporan/get_ranking.php`)
- Alternative calculation detail → Database connection: queries through (evidence: `laporan/detail_alternatif.php`)
- Staff user → Alternative management: maintains inputs
- Staff user → Criteria management: maintains inputs
- Staff user → Assessment management: records evaluations
- Staff user → MAUT calculation: runs calculation
- Staff user → Ranked results: reviews rankings
- Staff user → Reports and exports: requests reports
