# aaac15/cronos architecture

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

- Interactive diagram: https://gitdiagram.com/aaac15/cronos
- Repository: https://github.com/aaac15/cronos

## Overview

CRONOS is a small terminal clock. The user launches it with flags; its command parser selects the display mode and optional font, then the main loop obtains local time, renders either a large font-based clock or plain text, and updates the terminal once per second. The README also documents user-made `.cf` fonts; the sampled source shows how the font loader reads them. The two font files are included as supported examples. The map focuses on runtime behavior, not build and installation machinery.

Main entry points: [`cronos.c`](https://github.com/aaac15/cronos/blob/main/cronos.c) (Clock loop), [`layout/classic.cf`](https://github.com/aaac15/cronos/blob/main/layout/classic.cf) (Classic font), [`layout/numerical.cf`](https://github.com/aaac15/cronos/blob/main/layout/numerical.cf) (Numerical font)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clock["Clock runtime"]
  node_clock_app["Clock loop<br/>[cronos.c]"]
  node_arg_parser["Flag parser<br/>[cronos.c]"]
  node_font_loader["Font loader<br/>[cronos.c]"]
end

subgraph group_fonts["Font assets"]
  node_classic_font["Classic font<br/>[classic.cf]"]
  node_numerical_font["Numerical font<br/>[numerical.cf]"]
end

node_user(("User"))
node_time_api["C time library"]
node_terminal(("Terminal"))

node_user -->|"launches"| node_clock_app
node_clock_app -->|"parses flags"| node_arg_parser
node_clock_app -.->|"loads selected font"| node_font_loader
node_font_loader -->|"reads"| node_classic_font
node_font_loader -->|"reads"| node_numerical_font
node_clock_app -->|"gets local time"| node_time_api
node_clock_app -->|"writes clock"| node_terminal

click node_clock_app "https://github.com/aaac15/cronos/blob/main/cronos.c"
click node_arg_parser "https://github.com/aaac15/cronos/blob/main/cronos.c"
click node_font_loader "https://github.com/aaac15/cronos/blob/main/cronos.c"
click node_classic_font "https://github.com/aaac15/cronos/blob/main/layout/classic.cf"
click node_numerical_font "https://github.com/aaac15/cronos/blob/main/layout/numerical.cf"

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_clock_app,node_arg_parser,node_font_loader,node_user toneBlue
class node_classic_font,node_numerical_font toneAmber
class node_time_api,node_terminal toneIndigo
```

## Components

### Clock runtime

- [Clock loop](https://github.com/aaac15/cronos/blob/main/cronos.c): `cronos.c`
- [Flag parser](https://github.com/aaac15/cronos/blob/main/cronos.c): `cronos.c`
- [Font loader](https://github.com/aaac15/cronos/blob/main/cronos.c): `cronos.c`

### Font assets

- [Classic font](https://github.com/aaac15/cronos/blob/main/layout/classic.cf): `layout/classic.cf`
- [Numerical font](https://github.com/aaac15/cronos/blob/main/layout/numerical.cf): `layout/numerical.cf`

### Other components

- **User**
- **C time library**
- **Terminal**

## Connections

- User → Clock loop: launches
- Clock loop → Flag parser: parses flags
- Clock loop → Font loader: loads selected font
- Font loader → Classic font: reads
- Font loader → Numerical font: reads
- Clock loop → C time library: gets local time
- Clock loop → Terminal: writes clock
