# herehs/sickday architecture

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

- Interactive diagram: https://gitdiagram.com/herehs/sickday
- Repository: https://github.com/herehs/sickday

## Overview

SickDay is an Android wellbeing app that combines local health notes with weather and geomagnetic context. Its documented user workflow is to view current local conditions, explore weather by calendar date, and record wellbeing and symptom ratings. The README identifies the external weather and Kp data sources and the main product features, but the supplied source excerpts contain no application code; internal call ownership and data-flow details therefore cannot be verified.

Main entry points: [`app/src/main/java/com/example/up/data/repository/WeatherRepositoryImpl.kt`](https://github.com/herehs/sickday/blob/main/app/src/main/java/com/example/up/data/repository/WeatherRepositoryImpl.kt) (Weather repository), [`app/src/main/java/com/example/up/presentation/screens/main_screen`](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/presentation/screens/main_screen) (Home screen), [`app/src/main/java/com/example/up/data/repository/KpRepositoryImpl.kt`](https://github.com/herehs/sickday/blob/main/app/src/main/java/com/example/up/data/repository/KpRepositoryImpl.kt) (Kp repository), [`app/src/main/java/com/example/up/domain/use_case`](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/domain/use_case) (Weather queries)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User experience"]
  node_home["Home screen"]
  node_calendar["Weather calendar"]
  node_notes["Notes screen"]
  node_note_editor["Note editor"]
  node_navigation["App navigation"]
end

subgraph group_domain["Domain workflows"]
  node_weather_usecases["Weather queries"]
  node_kp_usecase["Kp queries"]
  node_note_usecases["Note actions"]
end

subgraph group_data["Data access"]
  node_weather_repo["Weather repository"]
  node_kp_repo["Kp repository"]
  node_note_repo["Note repository"]
  node_weather_api["Open-Meteo client"]
  node_swpc_api["NOAA SWPC client"]
  node_weather_mapping["Weather mapping"]
  node_kp_mapping["Kp mapping<br/>[KpDataMapper.kt]"]
end

subgraph group_local["Local state"]
  node_notes_db[("Notes database")]
  node_location["Location provider"]
  node_position_cache[("Position cache")]
end

node_person(("App user"))
node_open_meteo{{"Open-Meteo"}}
node_noaa{{"NOAA SWPC"}}

node_person -->|"views"| node_home
node_person -->|"browses"| node_calendar
node_person -->|"tracks wellbeing"| node_notes
node_person -->|"records symptoms"| node_note_editor
node_open_meteo -->|"supplies weather"| node_weather_api
node_noaa -->|"supplies Kp index"| node_swpc_api
node_home -.->|"shows conditions"| node_weather_usecases
node_home -.->|"shows Kp index"| node_kp_usecase
node_calendar -.->|"queries selected date"| node_weather_usecases
node_notes -.->|"manages notes"| node_note_usecases
node_note_editor -.->|"saves note"| node_note_usecases
node_weather_usecases -.->|"queries weather"| node_weather_repo
node_kp_usecase -.->|"queries Kp"| node_kp_repo
node_note_usecases -.->|"manages notes"| node_note_repo
node_weather_repo -.->|"fetches weather"| node_weather_api
node_kp_repo -.->|"fetches Kp"| node_swpc_api
node_weather_repo -.->|"maps responses"| node_weather_mapping
node_kp_repo -.->|"maps responses"| node_kp_mapping
node_note_repo -.->|"stores notes"| node_notes_db
node_weather_repo -.->|"uses location"| node_location
node_location -.->|"caches position"| node_position_cache

click node_home "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/presentation/screens/main_screen"
click node_calendar "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/presentation/screens/calendar_screen"
click node_notes "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/presentation/screens/notes_screen"
click node_note_editor "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/presentation/screens/note_screen"
click node_navigation "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/presentation/navigation"
click node_weather_usecases "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/domain/use_case"
click node_kp_usecase "https://github.com/herehs/sickday/blob/main/app/src/main/java/com/example/up/domain/use_case/GetKpByDateUseCase.kt"
click node_note_usecases "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/domain/use_case"
click node_weather_repo "https://github.com/herehs/sickday/blob/main/app/src/main/java/com/example/up/data/repository/WeatherRepositoryImpl.kt"
click node_kp_repo "https://github.com/herehs/sickday/blob/main/app/src/main/java/com/example/up/data/repository/KpRepositoryImpl.kt"
click node_note_repo "https://github.com/herehs/sickday/blob/main/app/src/main/java/com/example/up/data/repository/NoteRepositoryImpl.kt"
click node_weather_api "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/data/remote/OpenMeteoApi"
click node_swpc_api "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/data/remote/SWPCApi"
click node_weather_mapping "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/data/remote/mappers"
click node_kp_mapping "https://github.com/herehs/sickday/blob/main/app/src/main/java/com/example/up/data/remote/mappers/KpDataMapper.kt"
click node_notes_db "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/data/local/database"
click node_location "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/data/local/location"
click node_position_cache "https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/data/local/cache"

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_home,node_calendar,node_notes,node_note_editor,node_navigation,node_person toneBlue
class node_weather_usecases,node_kp_usecase,node_note_usecases toneAmber
class node_weather_repo,node_kp_repo,node_note_repo,node_weather_api,node_swpc_api,node_weather_mapping,node_kp_mapping toneMint
class node_notes_db,node_location,node_position_cache toneRose
class node_open_meteo,node_noaa toneIndigo
```

## Components

### User experience

- [Home screen](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/presentation/screens/main_screen): `app/src/main/java/com/example/up/presentation/screens/main_screen`
- [Weather calendar](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/presentation/screens/calendar_screen): `app/src/main/java/com/example/up/presentation/screens/calendar_screen`
- [Notes screen](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/presentation/screens/notes_screen): `app/src/main/java/com/example/up/presentation/screens/notes_screen`
- [Note editor](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/presentation/screens/note_screen): `app/src/main/java/com/example/up/presentation/screens/note_screen`
- [App navigation](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/presentation/navigation): `app/src/main/java/com/example/up/presentation/navigation`

### Domain workflows

- [Weather queries](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/domain/use_case): `app/src/main/java/com/example/up/domain/use_case`
- [Kp queries](https://github.com/herehs/sickday/blob/main/app/src/main/java/com/example/up/domain/use_case/GetKpByDateUseCase.kt): `app/src/main/java/com/example/up/domain/use_case/GetKpByDateUseCase.kt`
- [Note actions](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/domain/use_case): `app/src/main/java/com/example/up/domain/use_case`

### Data access

- [Weather repository](https://github.com/herehs/sickday/blob/main/app/src/main/java/com/example/up/data/repository/WeatherRepositoryImpl.kt): `app/src/main/java/com/example/up/data/repository/WeatherRepositoryImpl.kt`
- [Kp repository](https://github.com/herehs/sickday/blob/main/app/src/main/java/com/example/up/data/repository/KpRepositoryImpl.kt): `app/src/main/java/com/example/up/data/repository/KpRepositoryImpl.kt`
- [Note repository](https://github.com/herehs/sickday/blob/main/app/src/main/java/com/example/up/data/repository/NoteRepositoryImpl.kt): `app/src/main/java/com/example/up/data/repository/NoteRepositoryImpl.kt`
- [Open-Meteo client](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/data/remote/OpenMeteoApi): `app/src/main/java/com/example/up/data/remote/OpenMeteoApi`
- [NOAA SWPC client](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/data/remote/SWPCApi): `app/src/main/java/com/example/up/data/remote/SWPCApi`
- [Weather mapping](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/data/remote/mappers): `app/src/main/java/com/example/up/data/remote/mappers`
- [Kp mapping](https://github.com/herehs/sickday/blob/main/app/src/main/java/com/example/up/data/remote/mappers/KpDataMapper.kt): `app/src/main/java/com/example/up/data/remote/mappers/KpDataMapper.kt`

### Local state

- [Notes database](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/data/local/database): `app/src/main/java/com/example/up/data/local/database`
- [Location provider](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/data/local/location): `app/src/main/java/com/example/up/data/local/location`
- [Position cache](https://github.com/herehs/sickday/tree/main/app/src/main/java/com/example/up/data/local/cache): `app/src/main/java/com/example/up/data/local/cache`

### Other components

- **App user**
- **Open-Meteo**
- **NOAA SWPC**

## Connections

- App user → Home screen: views (evidence: `README.md`)
- App user → Weather calendar: browses (evidence: `README.md`)
- App user → Notes screen: tracks wellbeing (evidence: `README.md`)
- App user → Note editor: records symptoms (evidence: `README.md`)
- Open-Meteo → Open-Meteo client: supplies weather (evidence: `README.md`)
- NOAA SWPC → NOAA SWPC client: supplies Kp index (evidence: `README.md`)
- Home screen → Weather queries: shows conditions
- Home screen → Kp queries: shows Kp index
- Weather calendar → Weather queries: queries selected date
- Notes screen → Note actions: manages notes
- Note editor → Note actions: saves note
- Weather queries → Weather repository: queries weather
- Kp queries → Kp repository: queries Kp
- Note actions → Note repository: manages notes
- Weather repository → Open-Meteo client: fetches weather
- Kp repository → NOAA SWPC client: fetches Kp
- Weather repository → Weather mapping: maps responses
- Kp repository → Kp mapping: maps responses
- Note repository → Notes database: stores notes
- Weather repository → Location provider: uses location
- Location provider → Position cache: caches position
