# fcs666fcs/local-time architecture

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

- Interactive diagram: https://gitdiagram.com/fcs666fcs/local-time
- Repository: https://github.com/fcs666fcs/local-time

## Overview

Local Time is an offline-first Android geography learning app. The user selects a location (GPS or manual coordinates), then explores current local-time and solar conditions, runs worked geography calculations, and simulates the sky or day/night state. The graph shows the documented feature branches and sampled calculation calls; detailed internals of unsampled feature modules and visual components are not inferred.

Main entry points: [`app/src/main/java/com/localtime/ui/navigation/App.kt`](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/ui/navigation/App.kt) (Navigation and location), [`app/src/main/java/com/localtime/ui/components/Common.kt`](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/ui/components/Common.kt) (Shared UI components), [`app/src/main/java/com/localtime/feature/home/Home.kt`](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/feature/home/Home.kt) (Home dashboard), [`app/src/main/java/com/localtime/feature/sky/Sky.kt`](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/feature/sky/Sky.kt) (Sky simulator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_activity["Android entry<br/>[MainActivity.kt]"]
  node_navigation["Navigation and location<br/>[App.kt]"]
end

subgraph group_features["Learning features"]
  node_home["Home dashboard<br/>[Home.kt]"]
  node_calculator["Worked calculations<br/>[Calculator.kt]"]
  node_sky["Sky simulator<br/>[Sky.kt]"]
  node_geography["Geography visualizer<br/>[Geography.kt]"]
  node_settings["Settings<br/>[Settings.kt]"]
end

subgraph group_math["Offline calculations"]
  node_coordinates["Coordinate parsing"]
  node_models["Domain models<br/>[Models.kt]"]
  node_local_time["Local-time math"]
  node_solar["Solar calculations<br/>[SolarCalculator.kt]"]
end

subgraph group_presentation["Presentation"]
  node_components["Shared UI components<br/>[Common.kt]"]
  node_theme["Theme system<br/>[Theme.kt]"]
end

node_learner(("Learner"))
node_android_location["Android location"]

node_learner -->|"opens app"| node_activity
node_activity -->|"starts"| node_navigation
node_navigation -->|"routes to"| node_home
node_navigation -->|"routes to"| node_calculator
node_navigation -->|"routes to"| node_sky
node_navigation -->|"routes to"| node_geography
node_navigation -->|"routes to"| node_settings
node_navigation -->|"requests location"| node_android_location
node_navigation -.->|"validates input"| node_coordinates
node_home -->|"computes snapshot"| node_solar
node_home -->|"calculates local times"| node_local_time
node_calculator -->|"calculates time"| node_local_time
node_sky -->|"calculates sky"| node_solar
node_sky -->|"formats time"| node_local_time
node_geography -->|"calculates daylight"| node_solar
node_solar -->|"uses time math"| node_local_time
node_home -->|"renders with"| node_components
node_calculator -->|"renders with"| node_components
node_sky -->|"renders with"| node_components
node_geography -->|"renders with"| node_components
node_settings -->|"renders with"| node_components
node_navigation -->|"applies theme"| node_theme
node_settings -->|"selects mode"| node_theme

click node_activity "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/MainActivity.kt"
click node_navigation "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/ui/navigation/App.kt"
click node_home "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/feature/home/Home.kt"
click node_calculator "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/feature/calculator/Calculator.kt"
click node_sky "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/feature/sky/Sky.kt"
click node_geography "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/feature/geography/Geography.kt"
click node_settings "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/feature/settings/Settings.kt"
click node_coordinates "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/core/geo/CoordinateParser.kt"
click node_models "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/core/model/Models.kt"
click node_local_time "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/core/time/LocalTimeCalculator.kt"
click node_solar "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/core/astronomy/SolarCalculator.kt"
click node_components "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/ui/components/Common.kt"
click node_theme "https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/ui/theme/Theme.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_activity,node_navigation toneBlue
class node_home,node_calculator,node_sky,node_geography,node_settings toneAmber
class node_coordinates,node_models,node_local_time,node_solar toneMint
class node_components,node_theme toneRose
class node_learner,node_android_location toneIndigo
```

## Components

### App shell

- [Android entry](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/MainActivity.kt): `app/src/main/java/com/localtime/MainActivity.kt`
- [Navigation and location](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/ui/navigation/App.kt): `app/src/main/java/com/localtime/ui/navigation/App.kt`

### Learning features

- [Home dashboard](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/feature/home/Home.kt): `app/src/main/java/com/localtime/feature/home/Home.kt`
- [Worked calculations](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/feature/calculator/Calculator.kt): `app/src/main/java/com/localtime/feature/calculator/Calculator.kt`
- [Sky simulator](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/feature/sky/Sky.kt): `app/src/main/java/com/localtime/feature/sky/Sky.kt`
- [Geography visualizer](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/feature/geography/Geography.kt): `app/src/main/java/com/localtime/feature/geography/Geography.kt`
- [Settings](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/feature/settings/Settings.kt): `app/src/main/java/com/localtime/feature/settings/Settings.kt`

### Offline calculations

- [Coordinate parsing](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/core/geo/CoordinateParser.kt): `app/src/main/java/com/localtime/core/geo/CoordinateParser.kt`
- [Domain models](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/core/model/Models.kt): `app/src/main/java/com/localtime/core/model/Models.kt`
- [Local-time math](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/core/time/LocalTimeCalculator.kt): `app/src/main/java/com/localtime/core/time/LocalTimeCalculator.kt`
- [Solar calculations](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/core/astronomy/SolarCalculator.kt): `app/src/main/java/com/localtime/core/astronomy/SolarCalculator.kt`

### Presentation

- [Shared UI components](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/ui/components/Common.kt): `app/src/main/java/com/localtime/ui/components/Common.kt`
- [Theme system](https://github.com/fcs666fcs/local-time/blob/main/app/src/main/java/com/localtime/ui/theme/Theme.kt): `app/src/main/java/com/localtime/ui/theme/Theme.kt`

### Other components

- **Learner**
- **Android location**

## Connections

- Learner → Android entry: opens app (evidence: `app/src/main/java/com/localtime/MainActivity.kt`)
- Android entry → Navigation and location: starts (evidence: `app/src/main/java/com/localtime/MainActivity.kt`)
- Navigation and location → Home dashboard: routes to (evidence: `app/src/main/java/com/localtime/ui/navigation/App.kt`)
- Navigation and location → Worked calculations: routes to (evidence: `app/src/main/java/com/localtime/ui/navigation/App.kt`)
- Navigation and location → Sky simulator: routes to (evidence: `app/src/main/java/com/localtime/ui/navigation/App.kt`)
- Navigation and location → Geography visualizer: routes to (evidence: `app/src/main/java/com/localtime/ui/navigation/App.kt`)
- Navigation and location → Settings: routes to (evidence: `app/src/main/java/com/localtime/ui/navigation/App.kt`)
- Navigation and location → Android location: requests location (evidence: `app/src/main/java/com/localtime/ui/navigation/App.kt`)
- Navigation and location → Coordinate parsing: validates input
- Home dashboard → Solar calculations: computes snapshot (evidence: `app/src/main/java/com/localtime/feature/home/Home.kt`)
- Home dashboard → Local-time math: calculates local times (evidence: `app/src/main/java/com/localtime/feature/home/Home.kt`)
- Worked calculations → Local-time math: calculates time (evidence: `app/src/main/java/com/localtime/feature/calculator/Calculator.kt`)
- Sky simulator → Solar calculations: calculates sky (evidence: `app/src/main/java/com/localtime/feature/sky/Sky.kt`)
- Sky simulator → Local-time math: formats time (evidence: `app/src/main/java/com/localtime/feature/sky/Sky.kt`)
- Geography visualizer → Solar calculations: calculates daylight (evidence: `app/src/main/java/com/localtime/feature/geography/Geography.kt`)
- Solar calculations → Local-time math: uses time math (evidence: `app/src/main/java/com/localtime/core/astronomy/SolarCalculator.kt`)
- Home dashboard → Shared UI components: renders with (evidence: `app/src/main/java/com/localtime/feature/home/Home.kt`)
- Worked calculations → Shared UI components: renders with (evidence: `app/src/main/java/com/localtime/feature/calculator/Calculator.kt`)
- Sky simulator → Shared UI components: renders with (evidence: `app/src/main/java/com/localtime/feature/sky/Sky.kt`)
- Geography visualizer → Shared UI components: renders with (evidence: `app/src/main/java/com/localtime/feature/geography/Geography.kt`)
- Settings → Shared UI components: renders with (evidence: `app/src/main/java/com/localtime/feature/settings/Settings.kt`)
- Navigation and location → Theme system: applies theme (evidence: `app/src/main/java/com/localtime/ui/navigation/App.kt`)
- Settings → Theme system: selects mode (evidence: `app/src/main/java/com/localtime/feature/settings/Settings.kt`)
