# rndevel/home-server architecture

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

- Interactive diagram: https://gitdiagram.com/rndevel/home-server
- Repository: https://github.com/rndevel/home-server

## Overview

This tree is a multi-product repository rather than one application: it contains infrastructure utilities, web services, and mobile apps. The sampled evidence shows several distinct user-to-result workflows, including bus navigation, face-affect analysis, and welfare/news notifications. The graph focuses on those workflows and other central modules named by the SOURCE INDEX. Some subsystems are represented only by indexed imports or filenames, so uncertain links are omitted; no README was provided.

Main entry points: [`services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneJourneyService.java`](https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneJourneyService.java) (Journey service), [`infra/telegram/lib/client.py`](https://github.com/rndevel/home-server/blob/main/infra/telegram/lib/client.py) (Telegram client), [`services/welfare-notifier/main.py`](https://github.com/rndevel/home-server/blob/main/services/welfare-notifier/main.py) (Welfare notifier), [`infra/key-manager/server.py`](https://github.com/rndevel/home-server/blob/main/infra/key-manager/server.py) (Key manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bus["Bus tracker"]
  node_phone_journey["Journey service"]
  node_nav_session["Navigation session"]
  node_transit_plan["Transit plan<br/>[TransitPlan.java]"]
  node_arrival_alerts["Arrival alerts<br/>[ArrivalAlerts.java]"]
  node_phone_link["Phone-watch link<br/>[PhoneLink.java]"]
  node_watch_repo["Watch repository<br/>[AppRepository.java]"]
  node_arrival_tile["Arrival tile"]
end

subgraph group_notify["Notification services"]
  node_welfare_main["Welfare notifier<br/>[main.py]"]
  node_collectors["Benefit collectors<br/>[__init__.py]"]
  node_collector_base["Collector base<br/>[base.py]"]
  node_welfare_notify["Telegram delivery<br/>[notify.py]"]
  node_news_main["News notifier<br/>[main.py]"]
end

subgraph group_affect["Face analysis"]
  node_affect_pipeline["Affect pipeline<br/>[pipeline.py]"]
  node_face_detector["Face detector<br/>[detector.py]"]
end

subgraph group_infra["Infrastructure tools"]
  node_telegram_client["Telegram client<br/>[client.py]"]
  node_key_server["Key manager<br/>[server.py]"]
  node_key_inventory["Key inventory<br/>[inventory.py]"]
  node_gate_config["Gate configuration<br/>[config.py]"]
  node_project_map["Project map model<br/>[map_model.py]"]
end

subgraph group_dua["Dua platform"]
  node_dua_store[("Account and payment store<br/>[store.py]")]
end

node_rider(("Rider"))
node_telegram_service{{"Telegram API"}}

node_rider -->|"starts guidance"| node_phone_journey
node_phone_journey -->|"uses navigation"| node_nav_session
node_phone_journey -->|"uses route plan"| node_transit_plan
node_phone_journey -->|"checks arrivals"| node_arrival_alerts
node_phone_journey -->|"publishes guidance"| node_phone_link
node_arrival_tile -->|"reads tile state"| node_watch_repo
node_welfare_main -->|"loads sources"| node_collectors
node_collectors -->|"registers collectors"| node_collector_base
node_welfare_main -->|"sends notices"| node_welfare_notify
node_welfare_notify -->|"uses bot client"| node_telegram_client
node_news_main -->|"sends updates"| node_telegram_client
node_telegram_client -->|"calls Bot API"| node_telegram_service
node_affect_pipeline -->|"detects faces"| node_face_detector
node_key_server -->|"reads and updates keys"| node_key_inventory
node_key_server -->|"uses gate settings"| node_gate_config
node_project_map --> node_gate_config
node_dua_store --> node_dua_store

click node_phone_journey "https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneJourneyService.java"
click node_nav_session "https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/core/src/main/java/kr/home/buswatch/NavigationSession.java"
click node_transit_plan "https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/core/src/main/java/kr/home/buswatch/TransitPlan.java"
click node_arrival_alerts "https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/core/src/main/java/kr/home/buswatch/ArrivalAlerts.java"
click node_phone_link "https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneLink.java"
click node_watch_repo "https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/app/src/main/java/kr/home/buswatch/app/AppRepository.java"
click node_arrival_tile "https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/app/src/main/java/kr/home/buswatch/app/BusArrivalTileService.java"
click node_welfare_main "https://github.com/rndevel/home-server/blob/main/services/welfare-notifier/main.py"
click node_collectors "https://github.com/rndevel/home-server/blob/main/services/welfare-notifier/collectors/__init__.py"
click node_collector_base "https://github.com/rndevel/home-server/blob/main/services/welfare-notifier/collectors/base.py"
click node_welfare_notify "https://github.com/rndevel/home-server/blob/main/services/welfare-notifier/notify.py"
click node_news_main "https://github.com/rndevel/home-server/blob/main/services/claude-news-notifier/main.py"
click node_telegram_client "https://github.com/rndevel/home-server/blob/main/infra/telegram/lib/client.py"
click node_affect_pipeline "https://github.com/rndevel/home-server/blob/main/services/face-affect/engine/pipeline.py"
click node_face_detector "https://github.com/rndevel/home-server/blob/main/services/face-affect/engine/detector.py"
click node_key_server "https://github.com/rndevel/home-server/blob/main/infra/key-manager/server.py"
click node_key_inventory "https://github.com/rndevel/home-server/blob/main/infra/key-manager/inventory.py"
click node_gate_config "https://github.com/rndevel/home-server/blob/main/infra/noz-gate/config.py"
click node_project_map "https://github.com/rndevel/home-server/blob/main/infra/project-map/map_model.py"
click node_dua_store "https://github.com/rndevel/home-server/blob/main/services/dua/server/store.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_phone_journey,node_nav_session,node_transit_plan,node_arrival_alerts,node_phone_link,node_watch_repo,node_arrival_tile toneBlue
class node_welfare_main,node_collectors,node_collector_base,node_welfare_notify,node_news_main toneAmber
class node_affect_pipeline,node_face_detector,node_telegram_service toneMint
class node_telegram_client,node_key_server,node_key_inventory,node_gate_config,node_project_map toneRose
class node_dua_store,node_rider toneIndigo
```

## Components

### Bus tracker

- [Journey service](https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneJourneyService.java): `services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneJourneyService.java`
- [Navigation session](https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/core/src/main/java/kr/home/buswatch/NavigationSession.java): `services/bus_3301_tracker/watch/core/src/main/java/kr/home/buswatch/NavigationSession.java`
- [Transit plan](https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/core/src/main/java/kr/home/buswatch/TransitPlan.java): `services/bus_3301_tracker/watch/core/src/main/java/kr/home/buswatch/TransitPlan.java`
- [Arrival alerts](https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/core/src/main/java/kr/home/buswatch/ArrivalAlerts.java): `services/bus_3301_tracker/watch/core/src/main/java/kr/home/buswatch/ArrivalAlerts.java`
- [Phone-watch link](https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneLink.java): `services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneLink.java`
- [Watch repository](https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/app/src/main/java/kr/home/buswatch/app/AppRepository.java): `services/bus_3301_tracker/watch/app/src/main/java/kr/home/buswatch/app/AppRepository.java`
- [Arrival tile](https://github.com/rndevel/home-server/blob/main/services/bus_3301_tracker/watch/app/src/main/java/kr/home/buswatch/app/BusArrivalTileService.java): `services/bus_3301_tracker/watch/app/src/main/java/kr/home/buswatch/app/BusArrivalTileService.java`

### Notification services

- [Welfare notifier](https://github.com/rndevel/home-server/blob/main/services/welfare-notifier/main.py): `services/welfare-notifier/main.py`
- [Benefit collectors](https://github.com/rndevel/home-server/blob/main/services/welfare-notifier/collectors/__init__.py): `services/welfare-notifier/collectors/__init__.py`
- [Collector base](https://github.com/rndevel/home-server/blob/main/services/welfare-notifier/collectors/base.py): `services/welfare-notifier/collectors/base.py`
- [Telegram delivery](https://github.com/rndevel/home-server/blob/main/services/welfare-notifier/notify.py): `services/welfare-notifier/notify.py`
- [News notifier](https://github.com/rndevel/home-server/blob/main/services/claude-news-notifier/main.py): `services/claude-news-notifier/main.py`

### Face analysis

- [Affect pipeline](https://github.com/rndevel/home-server/blob/main/services/face-affect/engine/pipeline.py): `services/face-affect/engine/pipeline.py`
- [Face detector](https://github.com/rndevel/home-server/blob/main/services/face-affect/engine/detector.py): `services/face-affect/engine/detector.py`

### Infrastructure tools

- [Telegram client](https://github.com/rndevel/home-server/blob/main/infra/telegram/lib/client.py): `infra/telegram/lib/client.py`
- [Key manager](https://github.com/rndevel/home-server/blob/main/infra/key-manager/server.py): `infra/key-manager/server.py`
- [Key inventory](https://github.com/rndevel/home-server/blob/main/infra/key-manager/inventory.py): `infra/key-manager/inventory.py`
- [Gate configuration](https://github.com/rndevel/home-server/blob/main/infra/noz-gate/config.py): `infra/noz-gate/config.py`
- [Project map model](https://github.com/rndevel/home-server/blob/main/infra/project-map/map_model.py): `infra/project-map/map_model.py`

### Dua platform

- [Account and payment store](https://github.com/rndevel/home-server/blob/main/services/dua/server/store.py): `services/dua/server/store.py`

### Other components

- **Rider**
- **Telegram API**

## Connections

- Rider → Journey service: starts guidance (evidence: `services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneJourneyService.java`)
- Journey service → Navigation session: uses navigation (evidence: `services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneJourneyService.java`)
- Journey service → Transit plan: uses route plan (evidence: `services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneJourneyService.java`)
- Journey service → Arrival alerts: checks arrivals (evidence: `services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneJourneyService.java`)
- Journey service → Phone-watch link: publishes guidance (evidence: `services/bus_3301_tracker/watch/phone/src/main/java/kr/home/buswatch/phone/PhoneJourneyService.java`)
- Arrival tile → Watch repository: reads tile state (evidence: `services/bus_3301_tracker/watch/app/src/main/java/kr/home/buswatch/app/BusArrivalTileService.java`)
- Welfare notifier → Benefit collectors: loads sources (evidence: `services/welfare-notifier/main.py`)
- Benefit collectors → Collector base: registers collectors (evidence: `services/welfare-notifier/collectors/__init__.py`)
- Welfare notifier → Telegram delivery: sends notices (evidence: `services/welfare-notifier/main.py`)
- Telegram delivery → Telegram client: uses bot client (evidence: `services/welfare-notifier/notify.py`)
- News notifier → Telegram client: sends updates (evidence: `services/claude-news-notifier/main.py`)
- Telegram client → Telegram API: calls Bot API (evidence: `infra/telegram/lib/client.py`)
- Affect pipeline → Face detector: detects faces (evidence: `services/face-affect/engine/pipeline.py`)
- Key manager → Key inventory: reads and updates keys (evidence: `infra/key-manager/server.py`)
- Key manager → Gate configuration: uses gate settings (evidence: `infra/key-manager/server.py`)
- Project map model → Gate configuration
- Account and payment store → Account and payment store (evidence: `services/dua/server/store.py`)
