# prasetyahs/sistemkeluhan architecture

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

- Interactive diagram: https://gitdiagram.com/prasetyahs/sistemkeluhan
- Repository: https://github.com/prasetyahs/sistemkeluhan

## Overview

This repository is CodeIgniter 3, a PHP web-application framework, with an included customer-complaint/questionnaire application. The main runtime path is an HTTP request routed to a controller, which uses framework loading and persistence facilities and returns a view. The README describes the framework’s broader reusable-library role; the tree also identifies app areas for login, registration, questionnaire simulation, administration, and reports. Sampled excerpts support routing, controller setup, query building, and database-backed sessions; unsampled application-controller wiring is not asserted.

Main entry points: [`application/controllers`](https://github.com/prasetyahs/sistemkeluhan/tree/master/application/controllers) (App controllers), [`system/database/DB_query_builder.php`](https://github.com/prasetyahs/sistemkeluhan/blob/master/system/database/DB_query_builder.php) (Query builder), [`index.php`](https://github.com/prasetyahs/sistemkeluhan/blob/master/index.php) (Front controller), [`system/core/CodeIgniter.php`](https://github.com/prasetyahs/sistemkeluhan/blob/master/system/core/CodeIgniter.php) (Framework bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Request Runtime"]
  node_entry["Front controller<br/>[index.php]"]
  node_engine["Framework bootstrap<br/>[CodeIgniter.php]"]
  node_router["URI router<br/>[Router.php]"]
  node_controllerbase["Controller base<br/>[Controller.php]"]
  node_loader["Resource loader<br/>[Loader.php]"]
end

subgraph group_app["Complaint Application"]
  node_appcontrollers["App controllers"]
  node_appmodels["App models"]
  node_appviews["App views"]
  node_adminfeatures["Admin operations"]
  node_publicfeatures["Account and simulation"]
  node_reports["Report output<br/>[MReport.php]"]
  node_pdf["PDF generation<br/>[pdf.php]"]
end

subgraph group_data["Persistence"]
  node_databaseconfig["Database configuration<br/>[database.php]"]
  node_dbfactory["Database factory<br/>[DB.php]"]
  node_querybuilder["Query builder"]
  node_drivers["Database drivers<br/>[mysqli_driver.php]"]
  node_database[("Application database")]
end

subgraph group_services["Framework Services"]
  node_session["Session services<br/>[Session.php]"]
  node_sessiondb["Database session driver"]
  node_cache["Cache library<br/>[Cache.php]"]
  node_frameworklibs["Framework libraries"]
end

node_visitor(("Web user"))

node_visitor -->|"sends request"| node_entry
node_entry -->|"starts framework"| node_engine
node_engine -->|"routes request"| node_router
node_router -->|"selects controller"| node_appcontrollers
node_appcontrollers -->|"extends"| node_controllerbase
node_appcontrollers -->|"loads resources"| node_loader
node_appcontrollers -->|"uses data models"| node_appmodels
node_appcontrollers -->|"renders views"| node_appviews
node_appcontrollers -->|"serves admin"| node_adminfeatures
node_appcontrollers -->|"serves public"| node_publicfeatures
node_appcontrollers -->|"generates reports"| node_reports
node_appcontrollers -->|"uses PDF library"| node_pdf
node_loader -->|"loads libraries"| node_frameworklibs
node_databaseconfig -->|"configures connection"| node_dbfactory
node_dbfactory -->|"creates builder"| node_querybuilder
node_querybuilder -->|"executes queries"| node_drivers
node_drivers -->|"reads and writes"| node_database
node_session -->|"selects handler"| node_sessiondb
node_sessiondb -->|"queries sessions"| node_querybuilder
node_cache -.->|"optional cache store"| node_database

click node_entry "https://github.com/prasetyahs/sistemkeluhan/blob/master/index.php"
click node_engine "https://github.com/prasetyahs/sistemkeluhan/blob/master/system/core/CodeIgniter.php"
click node_router "https://github.com/prasetyahs/sistemkeluhan/blob/master/system/core/Router.php"
click node_controllerbase "https://github.com/prasetyahs/sistemkeluhan/blob/master/system/core/Controller.php"
click node_appcontrollers "https://github.com/prasetyahs/sistemkeluhan/tree/master/application/controllers"
click node_appmodels "https://github.com/prasetyahs/sistemkeluhan/tree/master/application/models"
click node_appviews "https://github.com/prasetyahs/sistemkeluhan/tree/master/application/views"
click node_adminfeatures "https://github.com/prasetyahs/sistemkeluhan/tree/master/application/views/admin"
click node_publicfeatures "https://github.com/prasetyahs/sistemkeluhan/tree/master/application/controllers"
click node_reports "https://github.com/prasetyahs/sistemkeluhan/blob/master/application/models/MReport.php"
click node_loader "https://github.com/prasetyahs/sistemkeluhan/blob/master/system/core/Loader.php"
click node_databaseconfig "https://github.com/prasetyahs/sistemkeluhan/blob/master/application/config/database.php"
click node_dbfactory "https://github.com/prasetyahs/sistemkeluhan/blob/master/system/database/DB.php"
click node_querybuilder "https://github.com/prasetyahs/sistemkeluhan/blob/master/system/database/DB_query_builder.php"
click node_drivers "https://github.com/prasetyahs/sistemkeluhan/blob/master/system/database/drivers/mysqli/mysqli_driver.php"
click node_session "https://github.com/prasetyahs/sistemkeluhan/blob/master/system/libraries/Session/Session.php"
click node_sessiondb "https://github.com/prasetyahs/sistemkeluhan/blob/master/system/libraries/Session/drivers/Session_database_driver.php"
click node_cache "https://github.com/prasetyahs/sistemkeluhan/blob/master/system/libraries/Cache/Cache.php"
click node_frameworklibs "https://github.com/prasetyahs/sistemkeluhan/tree/master/system/libraries"
click node_pdf "https://github.com/prasetyahs/sistemkeluhan/blob/master/application/libraries/pdf.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_entry,node_engine,node_router,node_controllerbase,node_loader,node_visitor toneBlue
class node_appcontrollers,node_appmodels,node_appviews,node_adminfeatures,node_publicfeatures,node_reports,node_pdf toneAmber
class node_databaseconfig,node_dbfactory,node_querybuilder,node_drivers,node_database toneMint
class node_session,node_sessiondb,node_cache,node_frameworklibs toneRose
```

## Components

### Request Runtime

- [Front controller](https://github.com/prasetyahs/sistemkeluhan/blob/master/index.php): `index.php`
- [Framework bootstrap](https://github.com/prasetyahs/sistemkeluhan/blob/master/system/core/CodeIgniter.php): `system/core/CodeIgniter.php`
- [URI router](https://github.com/prasetyahs/sistemkeluhan/blob/master/system/core/Router.php): `system/core/Router.php`
- [Controller base](https://github.com/prasetyahs/sistemkeluhan/blob/master/system/core/Controller.php): `system/core/Controller.php`
- [Resource loader](https://github.com/prasetyahs/sistemkeluhan/blob/master/system/core/Loader.php): `system/core/Loader.php`

### Complaint Application

- [App controllers](https://github.com/prasetyahs/sistemkeluhan/tree/master/application/controllers): `application/controllers`
- [App models](https://github.com/prasetyahs/sistemkeluhan/tree/master/application/models): `application/models`
- [App views](https://github.com/prasetyahs/sistemkeluhan/tree/master/application/views): `application/views`
- [Admin operations](https://github.com/prasetyahs/sistemkeluhan/tree/master/application/views/admin): `application/views/admin`
- [Account and simulation](https://github.com/prasetyahs/sistemkeluhan/tree/master/application/controllers): `application/controllers`
- [Report output](https://github.com/prasetyahs/sistemkeluhan/blob/master/application/models/MReport.php): `application/models/MReport.php`
- [PDF generation](https://github.com/prasetyahs/sistemkeluhan/blob/master/application/libraries/pdf.php): `application/libraries/pdf.php`

### Persistence

- [Database configuration](https://github.com/prasetyahs/sistemkeluhan/blob/master/application/config/database.php): `application/config/database.php`
- [Database factory](https://github.com/prasetyahs/sistemkeluhan/blob/master/system/database/DB.php): `system/database/DB.php`
- [Query builder](https://github.com/prasetyahs/sistemkeluhan/blob/master/system/database/DB_query_builder.php): `system/database/DB_query_builder.php`
- [Database drivers](https://github.com/prasetyahs/sistemkeluhan/blob/master/system/database/drivers/mysqli/mysqli_driver.php): `system/database/drivers/mysqli/mysqli_driver.php`
- **Application database**

### Framework Services

- [Session services](https://github.com/prasetyahs/sistemkeluhan/blob/master/system/libraries/Session/Session.php): `system/libraries/Session/Session.php`
- [Database session driver](https://github.com/prasetyahs/sistemkeluhan/blob/master/system/libraries/Session/drivers/Session_database_driver.php): `system/libraries/Session/drivers/Session_database_driver.php`
- [Cache library](https://github.com/prasetyahs/sistemkeluhan/blob/master/system/libraries/Cache/Cache.php): `system/libraries/Cache/Cache.php`
- [Framework libraries](https://github.com/prasetyahs/sistemkeluhan/tree/master/system/libraries): `system/libraries`

### Other components

- **Web user**

## Connections

- Web user → Front controller: sends request
- Front controller → Framework bootstrap: starts framework
- Framework bootstrap → URI router: routes request
- URI router → App controllers: selects controller
- App controllers → Controller base: extends
- App controllers → Resource loader: loads resources
- App controllers → App models: uses data models
- App controllers → App views: renders views
- App controllers → Admin operations: serves admin
- App controllers → Account and simulation: serves public
- App controllers → Report output: generates reports
- App controllers → PDF generation: uses PDF library
- Resource loader → Framework libraries: loads libraries
- Database configuration → Database factory: configures connection
- Database factory → Query builder: creates builder
- Query builder → Database drivers: executes queries
- Database drivers → Application database: reads and writes
- Session services → Database session driver: selects handler
- Database session driver → Query builder: queries sessions
- Cache library → Application database: optional cache store
