# tamafawx/stunting-check-app architecture

> Architecture diagram of the GitHub repository tamafawx/stunting-check-app, 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/tamafawx/stunting-check-app
- Repository: https://github.com/tamafawx/stunting-check-app

## Overview

This appears to be a Flutter app for Posyandu child-growth monitoring, with role-specific home screens and features for child records, examinations, education, schedules, consultations, reports, and administration. The principal health workflow is entering an examination and classifying measurements; a sampled Firestore trigger calculates status and writes it back. Sampled backend code also sends announcements, education, and schedule notifications. The README is only Flutter boilerplate, and Flutter screen implementations were not sampled, so their internal navigation and Firebase wiring are uncertain and omitted.

Main entry points: [`functions/stunting_calc.py`](https://github.com/tamafawx/stunting-check-app/blob/main/functions/stunting_calc.py) (Growth classification), [`functions/notifikasi_edukasi.py`](https://github.com/tamafawx/stunting-check-app/blob/main/functions/notifikasi_edukasi.py) (Education notifier), [`functions/notifikasi_jadwal.py`](https://github.com/tamafawx/stunting-check-app/blob/main/functions/notifikasi_jadwal.py) (Schedule notifier), [`functions/notifikasi_pengumuman.py`](https://github.com/tamafawx/stunting-check-app/blob/main/functions/notifikasi_pengumuman.py) (Announcement notifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Flutter app"]
  node_app_entry["App entry<br/>[main.dart]"]
  node_role_homes["Role home screens<br/>[beranda_admin.dart]"]
  node_role_shells["Role app shells<br/>[main_admin.dart]"]
end

subgraph group_health["Child health"]
  node_child_records["Child records<br/>[balita.dart]"]
  node_examination["Child examination"]
  node_exam_history["Examination history"]
  node_growth_charts["Growth charts"]
  node_who_data["WHO reference data"]
  node_reports["Health reports<br/>[laporan.dart]"]
end

subgraph group_community["Community services"]
  node_education["Education content<br/>[edukasi.dart]"]
  node_schedules["Posyandu schedules<br/>[jadwal.dart]"]
  node_consultation["Consultation chat"]
  node_announcements["Announcements"]
  node_notifications["Notifications<br/>[notifikasi.dart]"]
end

subgraph group_backend["Firebase backend"]
  node_firestore[("Cloud Firestore")]
  node_growth_calc["Growth classification<br/>[stunting_calc.py]"]
  node_who_csv["WHO growth tables"]
  node_education_notify["Education notifier"]
  node_schedule_notify["Schedule notifier"]
  node_announcement_notify["Announcement notifier"]
end

node_user(("App user"))
node_fcm["Firebase messaging"]

node_user -->|"opens app"| node_app_entry
node_firestore -->|"triggers on examination"| node_growth_calc
node_growth_calc -->|"reads tables"| node_who_csv
node_growth_calc -->|"updates examination"| node_firestore
node_firestore -->|"triggers on education"| node_education_notify
node_firestore -->|"triggers on schedule"| node_schedule_notify
node_firestore -->|"triggers on announcement"| node_announcement_notify
node_education_notify -->|"sends notification"| node_fcm
node_schedule_notify -->|"sends notification"| node_fcm
node_announcement_notify -->|"sends notification"| node_fcm

click node_app_entry "https://github.com/tamafawx/stunting-check-app/blob/main/lib/main.dart"
click node_role_homes "https://github.com/tamafawx/stunting-check-app/blob/main/lib/beranda_admin.dart"
click node_role_shells "https://github.com/tamafawx/stunting-check-app/blob/main/lib/main_admin.dart"
click node_child_records "https://github.com/tamafawx/stunting-check-app/blob/main/lib/balita.dart"
click node_examination "https://github.com/tamafawx/stunting-check-app/blob/main/lib/pemeriksaan_balita.dart"
click node_exam_history "https://github.com/tamafawx/stunting-check-app/blob/main/lib/riwayat_pemeriksaan.dart"
click node_growth_charts "https://github.com/tamafawx/stunting-check-app/blob/main/lib/who_growth_chart.dart"
click node_who_data "https://github.com/tamafawx/stunting-check-app/blob/main/lib/who_data_service.dart"
click node_reports "https://github.com/tamafawx/stunting-check-app/blob/main/lib/laporan.dart"
click node_education "https://github.com/tamafawx/stunting-check-app/blob/main/lib/edukasi.dart"
click node_schedules "https://github.com/tamafawx/stunting-check-app/blob/main/lib/jadwal.dart"
click node_consultation "https://github.com/tamafawx/stunting-check-app/blob/main/lib/konsultasi_beranda_percakapan.dart"
click node_announcements "https://github.com/tamafawx/stunting-check-app/blob/main/lib/pengumuman_tambah.dart"
click node_notifications "https://github.com/tamafawx/stunting-check-app/blob/main/lib/notifikasi.dart"
click node_growth_calc "https://github.com/tamafawx/stunting-check-app/blob/main/functions/stunting_calc.py"
click node_who_csv "https://github.com/tamafawx/stunting-check-app/tree/main/functions/csv"
click node_education_notify "https://github.com/tamafawx/stunting-check-app/blob/main/functions/notifikasi_edukasi.py"
click node_schedule_notify "https://github.com/tamafawx/stunting-check-app/blob/main/functions/notifikasi_jadwal.py"
click node_announcement_notify "https://github.com/tamafawx/stunting-check-app/blob/main/functions/notifikasi_pengumuman.py"

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_entry,node_role_homes,node_role_shells,node_user toneBlue
class node_child_records,node_examination,node_exam_history,node_growth_charts,node_who_data,node_reports toneAmber
class node_education,node_schedules,node_consultation,node_announcements,node_notifications toneMint
class node_firestore,node_growth_calc,node_who_csv,node_education_notify,node_schedule_notify,node_announcement_notify toneRose
class node_fcm toneIndigo
```

## Components

### Flutter app

- [App entry](https://github.com/tamafawx/stunting-check-app/blob/main/lib/main.dart): `lib/main.dart`
- [Role home screens](https://github.com/tamafawx/stunting-check-app/blob/main/lib/beranda_admin.dart): `lib/beranda_admin.dart`
- [Role app shells](https://github.com/tamafawx/stunting-check-app/blob/main/lib/main_admin.dart): `lib/main_admin.dart`

### Child health

- [Child records](https://github.com/tamafawx/stunting-check-app/blob/main/lib/balita.dart): `lib/balita.dart`
- [Child examination](https://github.com/tamafawx/stunting-check-app/blob/main/lib/pemeriksaan_balita.dart): `lib/pemeriksaan_balita.dart`
- [Examination history](https://github.com/tamafawx/stunting-check-app/blob/main/lib/riwayat_pemeriksaan.dart): `lib/riwayat_pemeriksaan.dart`
- [Growth charts](https://github.com/tamafawx/stunting-check-app/blob/main/lib/who_growth_chart.dart): `lib/who_growth_chart.dart`
- [WHO reference data](https://github.com/tamafawx/stunting-check-app/blob/main/lib/who_data_service.dart): `lib/who_data_service.dart`
- [Health reports](https://github.com/tamafawx/stunting-check-app/blob/main/lib/laporan.dart): `lib/laporan.dart`

### Community services

- [Education content](https://github.com/tamafawx/stunting-check-app/blob/main/lib/edukasi.dart): `lib/edukasi.dart`
- [Posyandu schedules](https://github.com/tamafawx/stunting-check-app/blob/main/lib/jadwal.dart): `lib/jadwal.dart`
- [Consultation chat](https://github.com/tamafawx/stunting-check-app/blob/main/lib/konsultasi_beranda_percakapan.dart): `lib/konsultasi_beranda_percakapan.dart`
- [Announcements](https://github.com/tamafawx/stunting-check-app/blob/main/lib/pengumuman_tambah.dart): `lib/pengumuman_tambah.dart`
- [Notifications](https://github.com/tamafawx/stunting-check-app/blob/main/lib/notifikasi.dart): `lib/notifikasi.dart`

### Firebase backend

- **Cloud Firestore**
- [Growth classification](https://github.com/tamafawx/stunting-check-app/blob/main/functions/stunting_calc.py): `functions/stunting_calc.py`
- [WHO growth tables](https://github.com/tamafawx/stunting-check-app/tree/main/functions/csv): `functions/csv`
- [Education notifier](https://github.com/tamafawx/stunting-check-app/blob/main/functions/notifikasi_edukasi.py): `functions/notifikasi_edukasi.py`
- [Schedule notifier](https://github.com/tamafawx/stunting-check-app/blob/main/functions/notifikasi_jadwal.py): `functions/notifikasi_jadwal.py`
- [Announcement notifier](https://github.com/tamafawx/stunting-check-app/blob/main/functions/notifikasi_pengumuman.py): `functions/notifikasi_pengumuman.py`

### Other components

- **App user**
- **Firebase messaging**

## Connections

- App user → App entry: opens app
- Cloud Firestore → Growth classification: triggers on examination
- Growth classification → WHO growth tables: reads tables
- Growth classification → Cloud Firestore: updates examination
- Cloud Firestore → Education notifier: triggers on education
- Cloud Firestore → Schedule notifier: triggers on schedule
- Cloud Firestore → Announcement notifier: triggers on announcement
- Education notifier → Firebase messaging: sends notification
- Schedule notifier → Firebase messaging: sends notification
- Announcement notifier → Firebase messaging: sends notification
