# kimju1416/youcall-board-compat architecture

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

- Interactive diagram: https://gitdiagram.com/kimju1416/youcall-board-compat
- Repository: https://github.com/kimju1416/youcall-board-compat

## Overview

YOUcall Board is an Android classroom display client for a school calling system. A teacher’s call reaches the configured Google Apps Script web app; the Android service polls for calls, avoids duplicate alerts, and brings the display forward, while the web screen renders call details and handles sound. The same screen fetches board information for the standby display and supports setup and operating modes. Native code also keeps polling alive across foreground/background transitions and reboots. The README documents the broader display features; sampled excerpts do not expose every rendering and API detail.

Main entry points: [`android/app/src/main/java/com/kimju/youcallboard/YouCallService.java`](https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/YouCallService.java) (Background call service), [`www/js/app.js`](https://github.com/kimju1416/youcall-board-compat/blob/main/www/js/app.js) (Display and setup UI), [`android/app/src/main/java/com/kimju/youcallboard/MainActivity.java`](https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/MainActivity.java) (Native activity), [`android/app/src/main/java/com/kimju/youcallboard/BootReceiver.java`](https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/BootReceiver.java) (Boot receiver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_display["Classroom display"]
  node_webapp["Display and setup UI<br/>[app.js]"]
  node_callview["Call presentation<br/>[app.js]"]
  node_standby["Standby information<br/>[app.js]"]
  node_sound["Call audio and TTS<br/>[app.js]"]
end

subgraph group_polling["Call monitoring"]
  node_service["Background call service"]
  node_pollgate["Poll coordination<br/>[PollGate.java]"]
end

subgraph group_native["Android runtime"]
  node_activity["Native activity<br/>[MainActivity.java]"]
  node_boot["Boot receiver<br/>[BootReceiver.java]"]
  node_switcher["Input return helper"]
end

subgraph group_state["Settings and diagnostics"]
  node_preferences[("Native preferences<br/>[app.js]")]
end

node_teacher(("Teacher"))
node_gas{{"Apps Script web app"}}
node_android{{"Android system"}}

node_teacher -.->|"creates calls"| node_gas
node_webapp -->|"fetches board and calls"| node_gas
node_service -->|"polls calls"| node_gas
node_service -->|"checks poll state"| node_pollgate
node_service -->|"brings forward"| node_activity
node_service -->|"tries input return"| node_switcher
node_webapp -->|"reads and writes"| node_preferences
node_webapp -.->|"renders call details"| node_callview
node_webapp -.->|"renders board data"| node_standby
node_webapp -.->|"plays alerts"| node_sound
node_activity -->|"starts service"| node_service
node_boot -->|"starts after boot"| node_service
node_android -->|"sends boot event"| node_boot
node_android -.->|"hosts app"| node_activity

click node_webapp "https://github.com/kimju1416/youcall-board-compat/blob/main/www/js/app.js"
click node_callview "https://github.com/kimju1416/youcall-board-compat/blob/main/www/js/app.js"
click node_standby "https://github.com/kimju1416/youcall-board-compat/blob/main/www/js/app.js"
click node_sound "https://github.com/kimju1416/youcall-board-compat/blob/main/www/js/app.js"
click node_service "https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/YouCallService.java"
click node_pollgate "https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/PollGate.java"
click node_activity "https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/MainActivity.java"
click node_boot "https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/BootReceiver.java"
click node_switcher "https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/SourceSwitcher.java"
click node_preferences "https://github.com/kimju1416/youcall-board-compat/blob/main/www/js/app.js"

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_webapp,node_callview,node_standby,node_sound toneBlue
class node_service,node_pollgate toneAmber
class node_activity,node_boot,node_switcher toneMint
class node_preferences toneRose
class node_teacher,node_gas,node_android toneIndigo
```

## Components

### Classroom display

- [Display and setup UI](https://github.com/kimju1416/youcall-board-compat/blob/main/www/js/app.js): `www/js/app.js`
- [Call presentation](https://github.com/kimju1416/youcall-board-compat/blob/main/www/js/app.js): `www/js/app.js`
- [Standby information](https://github.com/kimju1416/youcall-board-compat/blob/main/www/js/app.js): `www/js/app.js`
- [Call audio and TTS](https://github.com/kimju1416/youcall-board-compat/blob/main/www/js/app.js): `www/js/app.js`

### Call monitoring

- [Background call service](https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/YouCallService.java): `android/app/src/main/java/com/kimju/youcallboard/YouCallService.java`
- [Poll coordination](https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/PollGate.java): `android/app/src/main/java/com/kimju/youcallboard/PollGate.java`

### Android runtime

- [Native activity](https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/MainActivity.java): `android/app/src/main/java/com/kimju/youcallboard/MainActivity.java`
- [Boot receiver](https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/BootReceiver.java): `android/app/src/main/java/com/kimju/youcallboard/BootReceiver.java`
- [Input return helper](https://github.com/kimju1416/youcall-board-compat/blob/main/android/app/src/main/java/com/kimju/youcallboard/SourceSwitcher.java): `android/app/src/main/java/com/kimju/youcallboard/SourceSwitcher.java`

### Settings and diagnostics

- [Native preferences](https://github.com/kimju1416/youcall-board-compat/blob/main/www/js/app.js): `www/js/app.js`

### Other components

- **Teacher**
- **Apps Script web app**
- **Android system**

## Connections

- Teacher → Apps Script web app: creates calls (evidence: `README.md`)
- Display and setup UI → Apps Script web app: fetches board and calls (evidence: `www/js/app.js`)
- Background call service → Apps Script web app: polls calls (evidence: `android/app/src/main/java/com/kimju/youcallboard/YouCallService.java`)
- Background call service → Poll coordination: checks poll state (evidence: `android/app/src/main/java/com/kimju/youcallboard/YouCallService.java`)
- Background call service → Native activity: brings forward (evidence: `android/app/src/main/java/com/kimju/youcallboard/YouCallService.java`)
- Background call service → Input return helper: tries input return (evidence: `README.md`)
- Display and setup UI → Native preferences: reads and writes (evidence: `www/js/app.js`)
- Display and setup UI → Call presentation: renders call details (evidence: `README.md`)
- Display and setup UI → Standby information: renders board data (evidence: `README.md`)
- Display and setup UI → Call audio and TTS: plays alerts (evidence: `README.md`)
- Native activity → Background call service: starts service (evidence: `android/app/src/main/java/com/kimju/youcallboard/MainActivity.java`)
- Boot receiver → Background call service: starts after boot (evidence: `android/app/src/main/java/com/kimju/youcallboard/BootReceiver.java`)
- Android system → Boot receiver: sends boot event (evidence: `android/app/src/main/java/com/kimju/youcallboard/BootReceiver.java`)
- Android system → Native activity: hosts app (evidence: `README.md`)
