# caramelpopcornkhu/child119 architecture

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

- Interactive diagram: https://gitdiagram.com/caramelpopcornkhu/child119
- Repository: https://github.com/caramelpopcornkhu/child119

## Overview

아이119 is a child-emergency discovery app: caregivers use the web or Android client to find pediatric-capable emergency rooms, inspect availability, and navigate there; profiles, first-aid guidance, and AI recommendations support that journey. The Vue client also provides hospital browsing and administrative content, user, and automation screens. The Spring service handles chatbot conversations and nearby-hospital filtering; Firebase stores user and child information, while the documented Python automation refreshes hospital data and status messages. README-described integrations are shown where source excerpts do not expose their wiring.

Main entry points: [`vue_child/src/router/index.js`](https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/router/index.js) (Page routing), [`springboot_child/src/main/java/lx/edu/springboot/repository/EmergencyRepository.java`](https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/repository/EmergencyRepository.java) (Nearby hospital queries), [`springboot_child/src/main/java/lx/edu/springboot/service/ChatService.java`](https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/service/ChatService.java) (Chat recommendations), [`vue_child/src/App.vue`](https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/App.vue) (Vue application shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Caregiver app"]
  node_vue["Vue application shell<br/>[App.vue]"]
  node_routes["Page routing<br/>[index.js]"]
  node_emergency["Emergency map and list<br/>[HomeView.vue]"]
  node_hospitals["Hospital directory"]
  node_profile["Child profiles<br/>[AddKid.vue]"]
  node_firstaid["First-aid guidance"]
  node_chatui["AI chat interface<br/>[aichat.vue]"]
  node_firebaseweb["Web Firebase access<br/>[index.js]"]
end

subgraph group_server["Recommendation backend"]
  node_websocket["Chat WebSocket handler<br/>[ChatHandler.java]"]
  node_chatservice["Chat recommendations<br/>[ChatService.java]"]
  node_search["Symptom hospital search"]
  node_kidapi["Child information API<br/>[KidController.java]"]
  node_firebasebackend["Child data service"]
end

subgraph group_data["Hospital data"]
  node_repository["Nearby hospital queries"]
  node_emergencyentity["Emergency records<br/>[Emergency.java]"]
  node_postgres[("PostGIS hospital store")]
  node_geoserver["GeoServer hospital API"]
end

subgraph group_ops["Content operations"]
  node_automationui["Automation controls"]
  node_automation["Automation service<br/>[main.py]"]
  node_messageupdate["Status message generation<br/>[update_message.py]"]
  node_bedupdate["Bed status refresh<br/>[update_bed.py]"]
  node_admincontent["Emergency content admin<br/>[AdminEmergency.vue]"]
end

subgraph group_mobile["Mobile navigation"]
  node_android["Android WebView client<br/>[MainActivity.kt]"]
  node_navigation["Turn-by-turn navigation<br/>[NaviActivity.kt]"]
  node_geoservice["Hospital detail API client<br/>[ApiService.kt]"]
end

node_caregiver(("Caregiver"))
node_gemini["Gemini AI"]
node_firestore[("Firebase Firestore")]
node_tmap["TMAP routing"]

node_caregiver -->|"uses"| node_vue
node_vue -->|"renders routes"| node_routes
node_routes -->|"routes to"| node_emergency
node_routes -->|"routes to"| node_hospitals
node_routes -->|"routes to"| node_profile
node_routes -->|"routes to"| node_chatui
node_vue -->|"checks auth"| node_firebaseweb
node_emergency -.->|"gets routes"| node_tmap
node_caregiver -->|"sends chat"| node_websocket
node_websocket -->|"dispatches"| node_chatservice
node_chatservice -->|"queries nearby"| node_repository
node_search -->|"queries nearby"| node_repository
node_kidapi -->|"gets child data"| node_firebasebackend
node_kidapi -->|"queries hospitals"| node_repository
node_chatservice -->|"generates reply"| node_gemini
node_chatservice -->|"formats hospital details"| node_emergencyentity
node_repository -->|"returns records"| node_emergencyentity
node_repository -->|"queries"| node_postgres
node_firebasebackend -->|"reads child data"| node_firestore
node_firebaseweb -.->|"stores user data"| node_firestore
node_geoserver -->|"publishes spatial data"| node_postgres
node_emergency -.->|"loads hospital data"| node_geoserver
node_hospitals -.->|"loads facilities"| node_geoserver
node_automationui -->|"requests jobs"| node_automation
node_automation -->|"runs analysis"| node_messageupdate
node_automation -->|"refreshes beds"| node_bedupdate
node_messageupdate -->|"updates messages"| node_postgres
node_bedupdate -->|"updates beds"| node_postgres
node_admincontent -.->|"manages content"| node_firestore
node_caregiver -->|"uses mobile app"| node_android
node_android -->|"opens navigation"| node_navigation
node_navigation -->|"loads hospital details"| node_geoservice
node_navigation -->|"requests guidance"| node_tmap
node_geoservice -->|"fetches feature"| node_geoserver

click node_vue "https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/App.vue"
click node_routes "https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/router/index.js"
click node_emergency "https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/views/HomeView.vue"
click node_hospitals "https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/views/hospitalinformation.vue"
click node_profile "https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/views/AddKid.vue"
click node_firstaid "https://github.com/caramelpopcornkhu/child119/tree/main/vue_child/src/views"
click node_chatui "https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/views/aichat.vue"
click node_firebaseweb "https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/firebase/index.js"
click node_websocket "https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/handler/ChatHandler.java"
click node_chatservice "https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/service/ChatService.java"
click node_search "https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/service/EmergencySearchService.java"
click node_kidapi "https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/controller/KidController.java"
click node_firebasebackend "https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/service/FirebaseService.java"
click node_repository "https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/repository/EmergencyRepository.java"
click node_emergencyentity "https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/entity/Emergency.java"
click node_automationui "https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/views/AdminAutomation.vue"
click node_automation "https://github.com/caramelpopcornkhu/child119/blob/main/emergency_python/automation/automation_service/app/main.py"
click node_messageupdate "https://github.com/caramelpopcornkhu/child119/blob/main/emergency_python/automation/automation_service/app/update_message.py"
click node_bedupdate "https://github.com/caramelpopcornkhu/child119/blob/main/emergency_python/automation/update_bed.py"
click node_admincontent "https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/views/AdminEmergency.vue"
click node_android "https://github.com/caramelpopcornkhu/child119/blob/main/kakao_navi/app/src/main/java/com/lx/child/MainActivity.kt"
click node_navigation "https://github.com/caramelpopcornkhu/child119/blob/main/kakao_navi/app/src/main/java/com/lx/child/NaviActivity.kt"
click node_geoservice "https://github.com/caramelpopcornkhu/child119/blob/main/kakao_navi/app/src/main/java/com/lx/child/ApiService.kt"

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_vue,node_routes,node_emergency,node_hospitals,node_profile,node_firstaid,node_chatui,node_firebaseweb toneBlue
class node_websocket,node_chatservice,node_search,node_kidapi,node_firebasebackend,node_firestore toneAmber
class node_repository,node_emergencyentity,node_postgres,node_geoserver toneMint
class node_automationui,node_automation,node_messageupdate,node_bedupdate,node_admincontent toneRose
class node_android,node_navigation,node_geoservice,node_caregiver,node_gemini,node_tmap toneIndigo
```

## Components

### Caregiver app

- [Vue application shell](https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/App.vue): `vue_child/src/App.vue`
- [Page routing](https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/router/index.js): `vue_child/src/router/index.js`
- [Emergency map and list](https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/views/HomeView.vue): `vue_child/src/views/HomeView.vue`
- [Hospital directory](https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/views/hospitalinformation.vue): `vue_child/src/views/hospitalinformation.vue`
- [Child profiles](https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/views/AddKid.vue): `vue_child/src/views/AddKid.vue`
- [First-aid guidance](https://github.com/caramelpopcornkhu/child119/tree/main/vue_child/src/views): `vue_child/src/views`
- [AI chat interface](https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/views/aichat.vue): `vue_child/src/views/aichat.vue`
- [Web Firebase access](https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/firebase/index.js): `vue_child/src/firebase/index.js`

### Recommendation backend

- [Chat WebSocket handler](https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/handler/ChatHandler.java): `springboot_child/src/main/java/lx/edu/springboot/handler/ChatHandler.java`
- [Chat recommendations](https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/service/ChatService.java): `springboot_child/src/main/java/lx/edu/springboot/service/ChatService.java`
- [Symptom hospital search](https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/service/EmergencySearchService.java): `springboot_child/src/main/java/lx/edu/springboot/service/EmergencySearchService.java`
- [Child information API](https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/controller/KidController.java): `springboot_child/src/main/java/lx/edu/springboot/controller/KidController.java`
- [Child data service](https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/service/FirebaseService.java): `springboot_child/src/main/java/lx/edu/springboot/service/FirebaseService.java`

### Hospital data

- [Nearby hospital queries](https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/repository/EmergencyRepository.java): `springboot_child/src/main/java/lx/edu/springboot/repository/EmergencyRepository.java`
- [Emergency records](https://github.com/caramelpopcornkhu/child119/blob/main/springboot_child/src/main/java/lx/edu/springboot/entity/Emergency.java): `springboot_child/src/main/java/lx/edu/springboot/entity/Emergency.java`
- **PostGIS hospital store**
- **GeoServer hospital API**

### Content operations

- [Automation controls](https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/views/AdminAutomation.vue): `vue_child/src/views/AdminAutomation.vue`
- [Automation service](https://github.com/caramelpopcornkhu/child119/blob/main/emergency_python/automation/automation_service/app/main.py): `emergency_python/automation/automation_service/app/main.py`
- [Status message generation](https://github.com/caramelpopcornkhu/child119/blob/main/emergency_python/automation/automation_service/app/update_message.py): `emergency_python/automation/automation_service/app/update_message.py`
- [Bed status refresh](https://github.com/caramelpopcornkhu/child119/blob/main/emergency_python/automation/update_bed.py): `emergency_python/automation/update_bed.py`
- [Emergency content admin](https://github.com/caramelpopcornkhu/child119/blob/main/vue_child/src/views/AdminEmergency.vue): `vue_child/src/views/AdminEmergency.vue`

### Mobile navigation

- [Android WebView client](https://github.com/caramelpopcornkhu/child119/blob/main/kakao_navi/app/src/main/java/com/lx/child/MainActivity.kt): `kakao_navi/app/src/main/java/com/lx/child/MainActivity.kt`
- [Turn-by-turn navigation](https://github.com/caramelpopcornkhu/child119/blob/main/kakao_navi/app/src/main/java/com/lx/child/NaviActivity.kt): `kakao_navi/app/src/main/java/com/lx/child/NaviActivity.kt`
- [Hospital detail API client](https://github.com/caramelpopcornkhu/child119/blob/main/kakao_navi/app/src/main/java/com/lx/child/ApiService.kt): `kakao_navi/app/src/main/java/com/lx/child/ApiService.kt`

### Other components

- **Caregiver**
- **Gemini AI**
- **Firebase Firestore**
- **TMAP routing**

## Connections

- Caregiver → Vue application shell: uses
- Vue application shell → Page routing: renders routes (evidence: `vue_child/src/App.vue`)
- Page routing → Emergency map and list: routes to (evidence: `vue_child/src/router/index.js`)
- Page routing → Hospital directory: routes to (evidence: `vue_child/src/router/index.js`)
- Page routing → Child profiles: routes to (evidence: `vue_child/src/router/index.js`)
- Page routing → AI chat interface: routes to (evidence: `vue_child/src/router/index.js`)
- Vue application shell → Web Firebase access: checks auth (evidence: `vue_child/src/App.vue`)
- Emergency map and list → TMAP routing: gets routes
- Caregiver → Chat WebSocket handler: sends chat
- Chat WebSocket handler → Chat recommendations: dispatches (evidence: `springboot_child/src/main/java/lx/edu/springboot/handler/ChatHandler.java`)
- Chat recommendations → Nearby hospital queries: queries nearby (evidence: `springboot_child/src/main/java/lx/edu/springboot/service/ChatService.java`)
- Symptom hospital search → Nearby hospital queries: queries nearby (evidence: `springboot_child/src/main/java/lx/edu/springboot/service/EmergencySearchService.java`)
- Child information API → Child data service: gets child data (evidence: `springboot_child/src/main/java/lx/edu/springboot/controller/KidController.java`)
- Child information API → Nearby hospital queries: queries hospitals (evidence: `springboot_child/src/main/java/lx/edu/springboot/controller/KidController.java`)
- Chat recommendations → Gemini AI: generates reply
- Chat recommendations → Emergency records: formats hospital details (evidence: `springboot_child/src/main/java/lx/edu/springboot/service/ChatService.java`)
- Nearby hospital queries → Emergency records: returns records (evidence: `springboot_child/src/main/java/lx/edu/springboot/repository/EmergencyRepository.java`)
- Nearby hospital queries → PostGIS hospital store: queries
- Child data service → Firebase Firestore: reads child data (evidence: `springboot_child/src/main/java/lx/edu/springboot/service/FirebaseService.java`)
- Web Firebase access → Firebase Firestore: stores user data
- GeoServer hospital API → PostGIS hospital store: publishes spatial data
- Emergency map and list → GeoServer hospital API: loads hospital data
- Hospital directory → GeoServer hospital API: loads facilities
- Automation controls → Automation service: requests jobs
- Automation service → Status message generation: runs analysis
- Automation service → Bed status refresh: refreshes beds
- Status message generation → PostGIS hospital store: updates messages
- Bed status refresh → PostGIS hospital store: updates beds
- Emergency content admin → Firebase Firestore: manages content
- Caregiver → Android WebView client: uses mobile app
- Android WebView client → Turn-by-turn navigation: opens navigation (evidence: `kakao_navi/app/src/main/java/com/lx/child/MainActivity.kt`)
- Turn-by-turn navigation → Hospital detail API client: loads hospital details (evidence: `kakao_navi/app/src/main/java/com/lx/child/NaviActivity.kt`)
- Turn-by-turn navigation → TMAP routing: requests guidance
- Hospital detail API client → GeoServer hospital API: fetches feature (evidence: `kakao_navi/app/src/main/java/com/lx/child/ApiService.kt`)
