# gernsback1/pangankoe architecture

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

- Interactive diagram: https://gitdiagram.com/gernsback1/pangankoe
- Repository: https://github.com/gernsback1/pangankoe

## Overview

PanganKoe is a web meal-planning platform for Indonesian households, combining budget- and nutrition-aware planning with a connection to nearby culinary UMKM. The principal visible flow is user registration or login, preference/profile setup, then a synchronized dashboard. README and PRD describe meal-planning, shopping-efficiency, and UMKM-connector capabilities; their detailed runtime wiring is not present in the sampled source, so those branches are shown without speculative links. The sampled source supports the authentication and profile/database relationships.

Main entry points: [`PanganKoe web/PanganKoe web/script.js`](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/script.js) (Interface and state logic), [`PanganKoe web/PanganKoe web/register.php`](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/register.php) (Registration endpoint), [`PanganKoe web/PanganKoe web/connection.php`](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/connection.php) (MySQL connection and setup), [`PanganKoe web/PanganKoe web/db_schema.sql`](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/db_schema.sql) (Users and profiles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_web["Web interface<br/>[index.html]"]
  node_dashboard["Dashboard view<br/>[dashboard.html]"]
  node_ui_logic["Interface and state logic<br/>[script.js]"]
end

subgraph group_planning["Meal planning"]
  node_meal_planner["Smart meal planner"]
  node_budget_nutrition["Budget and nutrition<br/>[script.js]"]
  node_shopping["Efficient shopping calculator"]
  node_umkm["Nearby UMKM connector"]
end

subgraph group_identity["Accounts and profiles"]
  node_login["Login endpoint<br/>[login.php]"]
  node_register["Registration endpoint<br/>[register.php]"]
  node_profile_api["User data endpoint<br/>[userdata.php]"]
end

subgraph group_persistence["Data persistence"]
  node_connection["MySQL connection and setup<br/>[connection.php]"]
  node_user_store[("Users and profiles<br/>[db_schema.sql]")]
end

node_household(("Household user"))
node_mysql[("MySQL server")]

node_household -->|"uses"| node_web
node_web -->|"runs"| node_ui_logic
node_ui_logic -->|"updates"| node_dashboard
node_ui_logic -->|"calculates"| node_budget_nutrition
node_ui_logic -->|"submits credentials"| node_login
node_ui_logic -->|"submits registration"| node_register
node_login -->|"loads"| node_connection
node_register -->|"loads"| node_connection
node_profile_api -->|"loads"| node_connection
node_login -->|"reads account"| node_user_store
node_register -->|"checks and writes"| node_user_store
node_register -->|"creates profile"| node_user_store
node_profile_api -->|"reads profile"| node_user_store
node_connection -->|"connects and initializes"| node_mysql

click node_web "https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/index.html"
click node_dashboard "https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/dashboard.html"
click node_ui_logic "https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/script.js"
click node_meal_planner "https://github.com/gernsback1/pangankoe/tree/main/PanganKoe%20web/PanganKoe%20web"
click node_budget_nutrition "https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/script.js"
click node_shopping "https://github.com/gernsback1/pangankoe/tree/main/PanganKoe%20web/PanganKoe%20web"
click node_umkm "https://github.com/gernsback1/pangankoe/tree/main/PanganKoe%20web/PanganKoe%20web"
click node_login "https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/login.php"
click node_register "https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/register.php"
click node_profile_api "https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/userdata.php"
click node_connection "https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/connection.php"
click node_user_store "https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/db_schema.sql"

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_web,node_dashboard,node_ui_logic,node_household toneBlue
class node_meal_planner,node_budget_nutrition,node_shopping,node_umkm,node_mysql toneAmber
class node_login,node_register,node_profile_api toneMint
class node_connection,node_user_store toneRose
```

## Components

### Web experience

- [Web interface](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/index.html): `PanganKoe web/PanganKoe web/index.html`
- [Dashboard view](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/dashboard.html): `PanganKoe web/PanganKoe web/dashboard.html`
- [Interface and state logic](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/script.js): `PanganKoe web/PanganKoe web/script.js`

### Meal planning

- [Smart meal planner](https://github.com/gernsback1/pangankoe/tree/main/PanganKoe%20web/PanganKoe%20web): `PanganKoe web/PanganKoe web`
- [Budget and nutrition](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/script.js): `PanganKoe web/PanganKoe web/script.js`
- [Efficient shopping calculator](https://github.com/gernsback1/pangankoe/tree/main/PanganKoe%20web/PanganKoe%20web): `PanganKoe web/PanganKoe web`
- [Nearby UMKM connector](https://github.com/gernsback1/pangankoe/tree/main/PanganKoe%20web/PanganKoe%20web): `PanganKoe web/PanganKoe web`

### Accounts and profiles

- [Login endpoint](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/login.php): `PanganKoe web/PanganKoe web/login.php`
- [Registration endpoint](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/register.php): `PanganKoe web/PanganKoe web/register.php`
- [User data endpoint](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/userdata.php): `PanganKoe web/PanganKoe web/userdata.php`

### Data persistence

- [MySQL connection and setup](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/connection.php): `PanganKoe web/PanganKoe web/connection.php`
- [Users and profiles](https://github.com/gernsback1/pangankoe/blob/main/PanganKoe%20web/PanganKoe%20web/db_schema.sql): `PanganKoe web/PanganKoe web/db_schema.sql`

### Other components

- **Household user**
- **MySQL server**

## Connections

- Household user → Web interface: uses
- Web interface → Interface and state logic: runs
- Interface and state logic → Dashboard view: updates
- Interface and state logic → Budget and nutrition: calculates
- Interface and state logic → Login endpoint: submits credentials
- Interface and state logic → Registration endpoint: submits registration
- Login endpoint → MySQL connection and setup: loads
- Registration endpoint → MySQL connection and setup: loads
- User data endpoint → MySQL connection and setup: loads
- Login endpoint → Users and profiles: reads account
- Registration endpoint → Users and profiles: checks and writes
- Registration endpoint → Users and profiles: creates profile
- User data endpoint → Users and profiles: reads profile
- MySQL connection and setup → MySQL server: connects and initializes
