# abiyyupribs/project_kesehatan architecture

> Architecture diagram of the GitHub repository abiyyupribs/project_kesehatan, 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/abiyyupribs/project_kesehatan
- Repository: https://github.com/abiyyupribs/project_kesehatan

## Overview

This is a Streamlit early-screening app for students to assess stress, anxiety, depression, and sleep quality. The main workflow collects DASS-42 and PSQI answers, validates them, scores and categorizes them, then presents journal comparisons and tailored advice while saving a test record. Separate views explain the instruments, show journal data, and display prior results. The sampled code supports these links; the journal CSV contents and stored history are not shown, so their internal structure is not inferred.

Main entry points: [`main.py`](https://github.com/abiyyupribs/project_kesehatan/blob/main/main.py) (Streamlit app), [`riwayat_tes.csv`](https://github.com/abiyyupribs/project_kesehatan/blob/main/riwayat_tes.csv) (Test history CSV), [`materi.py`](https://github.com/abiyyupribs/project_kesehatan/blob/main/materi.py) (Instrument guide), [`soal.py`](https://github.com/abiyyupribs/project_kesehatan/blob/main/soal.py) (DASS-42 and PSQI items)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Student experience"]
  node_app["Streamlit app<br/>[main.py]"]
  node_learning["Instrument guide<br/>[materi.py]"]
  node_questionnaire["Questionnaire form<br/>[main.py]"]
  node_results["Results and history view<br/>[main.py]"]
end

subgraph group_assessment["Assessment and guidance"]
  node_question_bank["DASS-42 and PSQI items<br/>[soal.py]"]
  node_scoring["Score categorization<br/>[soal.py]"]
  node_journal_comparison["Journal comparison<br/>[analisis.py]"]
  node_recommendations["Personalized advice<br/>[analisis.py]"]
end

subgraph group_data["Research and records"]
  node_journal_data[("Journal reference data")]
  node_history_store[("Test history CSV<br/>[riwayat_tes.csv]")]
end

node_student(("Student"))

node_student -->|"uses"| node_app
node_app -->|"displays"| node_learning
node_app -->|"renders"| node_questionnaire
node_questionnaire -->|"uses items"| node_question_bank
node_app -->|"categorizes scores"| node_scoring
node_app -->|"requests comparison"| node_journal_comparison
node_app -->|"requests advice"| node_recommendations
node_app -->|"appends record"| node_history_store
node_app -->|"reads and charts"| node_journal_data
node_app -->|"reads records"| node_history_store
node_app -->|"renders"| node_results

click node_app "https://github.com/abiyyupribs/project_kesehatan/blob/main/main.py"
click node_learning "https://github.com/abiyyupribs/project_kesehatan/blob/main/materi.py"
click node_questionnaire "https://github.com/abiyyupribs/project_kesehatan/blob/main/main.py"
click node_results "https://github.com/abiyyupribs/project_kesehatan/blob/main/main.py"
click node_question_bank "https://github.com/abiyyupribs/project_kesehatan/blob/main/soal.py"
click node_scoring "https://github.com/abiyyupribs/project_kesehatan/blob/main/soal.py"
click node_journal_comparison "https://github.com/abiyyupribs/project_kesehatan/blob/main/analisis.py"
click node_recommendations "https://github.com/abiyyupribs/project_kesehatan/blob/main/analisis.py"
click node_journal_data "https://github.com/abiyyupribs/project_kesehatan/blob/main/referensi_jurnal.csv"
click node_history_store "https://github.com/abiyyupribs/project_kesehatan/blob/main/riwayat_tes.csv"

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_app,node_learning,node_questionnaire,node_results toneBlue
class node_question_bank,node_scoring,node_journal_comparison,node_recommendations toneAmber
class node_journal_data,node_history_store toneMint
class node_student toneIndigo
```

## Components

### Student experience

- [Streamlit app](https://github.com/abiyyupribs/project_kesehatan/blob/main/main.py): `main.py`
- [Instrument guide](https://github.com/abiyyupribs/project_kesehatan/blob/main/materi.py): `materi.py`
- [Questionnaire form](https://github.com/abiyyupribs/project_kesehatan/blob/main/main.py): `main.py`
- [Results and history view](https://github.com/abiyyupribs/project_kesehatan/blob/main/main.py): `main.py`

### Assessment and guidance

- [DASS-42 and PSQI items](https://github.com/abiyyupribs/project_kesehatan/blob/main/soal.py): `soal.py`
- [Score categorization](https://github.com/abiyyupribs/project_kesehatan/blob/main/soal.py): `soal.py`
- [Journal comparison](https://github.com/abiyyupribs/project_kesehatan/blob/main/analisis.py): `analisis.py`
- [Personalized advice](https://github.com/abiyyupribs/project_kesehatan/blob/main/analisis.py): `analisis.py`

### Research and records

- [Journal reference data](https://github.com/abiyyupribs/project_kesehatan/blob/main/referensi_jurnal.csv): `referensi_jurnal.csv`
- [Test history CSV](https://github.com/abiyyupribs/project_kesehatan/blob/main/riwayat_tes.csv): `riwayat_tes.csv`

### Other components

- **Student**

## Connections

- Student → Streamlit app: uses (evidence: `main.py`)
- Streamlit app → Instrument guide: displays (evidence: `main.py`)
- Streamlit app → Questionnaire form: renders (evidence: `main.py`)
- Questionnaire form → DASS-42 and PSQI items: uses items (evidence: `main.py`)
- Streamlit app → Score categorization: categorizes scores (evidence: `main.py`)
- Streamlit app → Journal comparison: requests comparison (evidence: `main.py`)
- Streamlit app → Personalized advice: requests advice (evidence: `main.py`)
- Streamlit app → Test history CSV: appends record
- Streamlit app → Journal reference data: reads and charts (evidence: `main.py`)
- Streamlit app → Test history CSV: reads records (evidence: `main.py`)
- Streamlit app → Results and history view: renders (evidence: `main.py`)
