# r-yn06/germs-ers architecture

> Architecture diagram of the GitHub repository r-yn06/germs-ers, 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/r-yn06/germs-ers
- Repository: https://github.com/r-yn06/germs-ers

## Overview

GERMS is a desktop emergency-response management application. Its principal workflow is to submit incident reports, verify and publish them, assign response teams, track response status and timeline, and close incidents. Users enter through authentication or guest reporting; role-specific panels support administration and field response. AppContext wires shared services to Supabase-backed repositories. The README is empty, so capabilities are inferred from the source tree; some panel behavior is unsampled, and the graph avoids asserting unverified calls.

Main entry points: [`GERMS/src/main/java/com/gudo/germs/config/AppContext.java`](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/config/AppContext.java) (Service wiring), [`GERMS/src/main/java/com/gudo/germs/services/AuthService.java`](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/services/AuthService.java) (Authentication service), [`GERMS/src/main/java/com/gudo/germs/services/IncidentService.java`](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/services/IncidentService.java) (Incident workflow service), [`GERMS/src/main/java/com/gudo/germs/ui/Shell.java`](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/ui/Shell.java) (Role-based shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application and access"]
  node_main["Desktop startup<br/>[Main.java]"]
  node_shell["Role-based shell<br/>[Shell.java]"]
end

subgraph group_operations["Incident operations"]
  node_admin["Administration panels"]
  node_guest["Guest reporting panels"]
  node_field["Responder panels"]
  node_map["Operations map"]
  node_incidentservice["Incident workflow service"]
  node_incident["Incident record<br/>[Incident.java]"]
  node_incidentrepo["Incident repository"]
end

subgraph group_identity["Identity and access"]
  node_login["Sign-in and registration<br/>[LoginPanel.java]"]
  node_authsvc["Authentication service<br/>[AuthService.java]"]
  node_authclient["Supabase Auth client<br/>[AuthClient.java]"]
  node_profiles["Profile repository"]
  node_profile["User profile and role<br/>[Profile.java]"]
  node_session["Session manager"]
end

subgraph group_platform["Shared platform"]
  node_context["Service wiring<br/>[AppContext.java]"]
  node_rest["Supabase REST client<br/>[RestClient.java]"]
  node_http["HTTP transport<br/>[SupabaseHttp.java]"]
  node_background["Background task runner"]
  node_theme["Theme manager<br/>[ThemeManager.java]"]
end

node_user(("User"))
node_supabase[("Supabase services")]

node_user -.->|"signs in"| node_login
node_user -.->|"submits report"| node_guest
node_main -->|"creates"| node_context
node_main -->|"opens"| node_shell
node_main -->|"installs"| node_theme
node_context -->|"wires"| node_authsvc
node_context -->|"wires"| node_incidentservice
node_context -->|"creates"| node_rest
node_context -->|"creates"| node_session
node_login -.->|"uses"| node_authsvc
node_authsvc -->|"authenticates"| node_authclient
node_authsvc -->|"loads profile"| node_profiles
node_authsvc -->|"sets session"| node_session
node_authclient -->|"sends auth requests"| node_http
node_profiles -->|"queries"| node_rest
node_profiles -->|"maps records"| node_profile
node_session -->|"refreshes token"| node_authclient
node_shell -->|"routes to"| node_admin
node_shell -.->|"routes to"| node_guest
node_shell -.->|"routes to"| node_field
node_incidentservice -->|"reads and writes"| node_incidentrepo
node_incidentservice -->|"builds and updates"| node_incident
node_incidentrepo -->|"persists incidents"| node_rest
node_rest -->|"sends REST requests"| node_http
node_http -.->|"calls API"| node_supabase
node_admin -.->|"displays operations map"| node_map
node_field -.->|"uses workflow"| node_incidentservice
node_guest -.->|"submits reports"| node_incidentservice

click node_main "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/Main.java"
click node_context "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/config/AppContext.java"
click node_shell "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/ui/Shell.java"
click node_login "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/ui/auth/LoginPanel.java"
click node_authsvc "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/services/AuthService.java"
click node_authclient "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/supabase/AuthClient.java"
click node_profiles "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/repositories/ProfileRepository.java"
click node_profile "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/models/Profile.java"
click node_session "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/supabase/SessionManager.java"
click node_admin "https://github.com/r-yn06/germs-ers/tree/main/GERMS/src/main/java/com/gudo/germs/ui/admin"
click node_guest "https://github.com/r-yn06/germs-ers/tree/main/GERMS/src/main/java/com/gudo/germs/ui/guest"
click node_field "https://github.com/r-yn06/germs-ers/tree/main/GERMS/src/main/java/com/gudo/germs/ui/incident"
click node_map "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/ui/components/OpenStreetMapPanel.java"
click node_incidentservice "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/services/IncidentService.java"
click node_incident "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/models/Incident.java"
click node_incidentrepo "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/services/SupabaseIncidentRepository.java"
click node_rest "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/supabase/RestClient.java"
click node_http "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/supabase/SupabaseHttp.java"
click node_background "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/utils/BackgroundTask.java"
click node_theme "https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/ui/theme/ThemeManager.java"

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_main,node_shell,node_user toneBlue
class node_admin,node_guest,node_field,node_map,node_incidentservice,node_incident,node_incidentrepo,node_supabase toneAmber
class node_login,node_authsvc,node_authclient,node_profiles,node_profile,node_session toneMint
class node_context,node_rest,node_http,node_background,node_theme toneRose
```

## Components

### Application and access

- [Desktop startup](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/Main.java): `GERMS/src/main/java/com/gudo/germs/Main.java`
- [Role-based shell](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/ui/Shell.java): `GERMS/src/main/java/com/gudo/germs/ui/Shell.java`

### Incident operations

- [Administration panels](https://github.com/r-yn06/germs-ers/tree/main/GERMS/src/main/java/com/gudo/germs/ui/admin): `GERMS/src/main/java/com/gudo/germs/ui/admin`
- [Guest reporting panels](https://github.com/r-yn06/germs-ers/tree/main/GERMS/src/main/java/com/gudo/germs/ui/guest): `GERMS/src/main/java/com/gudo/germs/ui/guest`
- [Responder panels](https://github.com/r-yn06/germs-ers/tree/main/GERMS/src/main/java/com/gudo/germs/ui/incident): `GERMS/src/main/java/com/gudo/germs/ui/incident`
- [Operations map](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/ui/components/OpenStreetMapPanel.java): `GERMS/src/main/java/com/gudo/germs/ui/components/OpenStreetMapPanel.java`
- [Incident workflow service](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/services/IncidentService.java): `GERMS/src/main/java/com/gudo/germs/services/IncidentService.java`
- [Incident record](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/models/Incident.java): `GERMS/src/main/java/com/gudo/germs/models/Incident.java`
- [Incident repository](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/services/SupabaseIncidentRepository.java): `GERMS/src/main/java/com/gudo/germs/services/SupabaseIncidentRepository.java`

### Identity and access

- [Sign-in and registration](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/ui/auth/LoginPanel.java): `GERMS/src/main/java/com/gudo/germs/ui/auth/LoginPanel.java`
- [Authentication service](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/services/AuthService.java): `GERMS/src/main/java/com/gudo/germs/services/AuthService.java`
- [Supabase Auth client](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/supabase/AuthClient.java): `GERMS/src/main/java/com/gudo/germs/supabase/AuthClient.java`
- [Profile repository](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/repositories/ProfileRepository.java): `GERMS/src/main/java/com/gudo/germs/repositories/ProfileRepository.java`
- [User profile and role](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/models/Profile.java): `GERMS/src/main/java/com/gudo/germs/models/Profile.java`
- [Session manager](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/supabase/SessionManager.java): `GERMS/src/main/java/com/gudo/germs/supabase/SessionManager.java`

### Shared platform

- [Service wiring](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/config/AppContext.java): `GERMS/src/main/java/com/gudo/germs/config/AppContext.java`
- [Supabase REST client](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/supabase/RestClient.java): `GERMS/src/main/java/com/gudo/germs/supabase/RestClient.java`
- [HTTP transport](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/supabase/SupabaseHttp.java): `GERMS/src/main/java/com/gudo/germs/supabase/SupabaseHttp.java`
- [Background task runner](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/utils/BackgroundTask.java): `GERMS/src/main/java/com/gudo/germs/utils/BackgroundTask.java`
- [Theme manager](https://github.com/r-yn06/germs-ers/blob/main/GERMS/src/main/java/com/gudo/germs/ui/theme/ThemeManager.java): `GERMS/src/main/java/com/gudo/germs/ui/theme/ThemeManager.java`

### Other components

- **User**
- **Supabase services**

## Connections

- User → Sign-in and registration: signs in
- User → Guest reporting panels: submits report
- Desktop startup → Service wiring: creates (evidence: `GERMS/src/main/java/com/gudo/germs/Main.java`)
- Desktop startup → Role-based shell: opens (evidence: `GERMS/src/main/java/com/gudo/germs/Main.java`)
- Desktop startup → Theme manager: installs (evidence: `GERMS/src/main/java/com/gudo/germs/Main.java`)
- Service wiring → Authentication service: wires (evidence: `GERMS/src/main/java/com/gudo/germs/config/AppContext.java`)
- Service wiring → Incident workflow service: wires (evidence: `GERMS/src/main/java/com/gudo/germs/config/AppContext.java`)
- Service wiring → Supabase REST client: creates (evidence: `GERMS/src/main/java/com/gudo/germs/config/AppContext.java`)
- Service wiring → Session manager: creates (evidence: `GERMS/src/main/java/com/gudo/germs/config/AppContext.java`)
- Sign-in and registration → Authentication service: uses
- Authentication service → Supabase Auth client: authenticates (evidence: `GERMS/src/main/java/com/gudo/germs/services/AuthService.java`)
- Authentication service → Profile repository: loads profile (evidence: `GERMS/src/main/java/com/gudo/germs/services/AuthService.java`)
- Authentication service → Session manager: sets session (evidence: `GERMS/src/main/java/com/gudo/germs/services/AuthService.java`)
- Supabase Auth client → HTTP transport: sends auth requests (evidence: `GERMS/src/main/java/com/gudo/germs/supabase/AuthClient.java`)
- Profile repository → Supabase REST client: queries (evidence: `GERMS/src/main/java/com/gudo/germs/repositories/ProfileRepository.java`)
- Profile repository → User profile and role: maps records (evidence: `GERMS/src/main/java/com/gudo/germs/repositories/ProfileRepository.java`)
- Session manager → Supabase Auth client: refreshes token (evidence: `GERMS/src/main/java/com/gudo/germs/supabase/SessionManager.java`)
- Role-based shell → Administration panels: routes to (evidence: `GERMS/src/main/java/com/gudo/germs/ui/Shell.java`)
- Role-based shell → Guest reporting panels: routes to (evidence: `GERMS/src/main/java/com/gudo/germs/ui/Shell.java`)
- Role-based shell → Responder panels: routes to (evidence: `GERMS/src/main/java/com/gudo/germs/ui/Shell.java`)
- Incident workflow service → Incident repository: reads and writes (evidence: `GERMS/src/main/java/com/gudo/germs/services/IncidentService.java`)
- Incident workflow service → Incident record: builds and updates (evidence: `GERMS/src/main/java/com/gudo/germs/services/IncidentService.java`)
- Incident repository → Supabase REST client: persists incidents (evidence: `GERMS/src/main/java/com/gudo/germs/services/SupabaseIncidentRepository.java`)
- Supabase REST client → HTTP transport: sends REST requests (evidence: `GERMS/src/main/java/com/gudo/germs/supabase/RestClient.java`)
- HTTP transport → Supabase services: calls API
- Administration panels → Operations map: displays operations map (evidence: `GERMS/src/main/java/com/gudo/germs/ui/admin/DashboardPanel.java`)
- Responder panels → Incident workflow service: uses workflow
- Guest reporting panels → Incident workflow service: submits reports (evidence: `GERMS/src/main/java/com/gudo/germs/ui/guest/GuestReportPanel.java`)
