# App flow — the living horizon (/docs/maintain/app-flow/living-horizon)

- **Status:** Current
- **Last updated:** 2026-11-03
- **Related ADRs:** [ADR-0037](../adr/ADR-0037-the-horizon-is-the-himalaya.mdx),
  [ADR-0030](../adr/ADR-0030-the-horizon-rises-over-the-page-and-its-sky-comes-alive.mdx),
  [ADR-0018](../adr/ADR-0018-docs-pages-get-orbit-stations-a-trajectory-and-the-full-horizon.mdx),
  [ADR-0017](../adr/ADR-0017-the-whole-site-is-one-solar-system.mdx)

> Snapshot of the system as it stands today. Edit in place; never record what changed.

How the end of every page moves under ADR-0030. The Horizon footer rises over the docs page's
sidebar and trajectory as the reader reaches it, and its sky is alive: twinkling stars, shooting
stars, the star rising with the scroll and drifting lit clouds. What stands under that sky, the
range, the flag and the entries' lights, is in [the Himalayan Horizon](./himalayan-horizon.mdx)
(ADR-0037). Sample values are invented (ADR-0008). Phone width first.

The flow and each screen are drawn with Archify; the page shows them and its Markdown carries
their Mermaid (ADR-0022). Their sources are in `diagrams/docs/`: `living-horizon.json` for the
flow, one `living-horizon-screen-<n>.json` per screen.

## Entry points [#entry-points]

- **The end of every page:** docs pages, the home page and the 404. Everyone sees it; there is
  nothing to open or switch.
- **Docs pages on a wide screen**, where the sidebar and the trajectory stand beside the page:
  they set below the horizon as it rises (screen 2). On phones neither stands beside the page.

## Flow [#flow]

```mermaid
flowchart LR
  R["Reading<br/>sidebar and trajectory in place"] -->|scrolls to the end| E["Horizon enters<br/>star rises, sidebar sets"]
  E -->|keeps scrolling| H["Horizon in view<br/>the sky loops"]
  H -->|scrolls up| E
  E -->|scrolls up| R
  H -->|a planet or a footer link| P["Another page"]
```

The loops run only while the footer is on screen; once it leaves, they pause where they are.

## Screens [#screens]

### 1. `The Horizon` — the end of any page, at phone width [#1-the-horizon--the-end-of-any-page-at-phone-width]

```mermaid
block-beta
  columns 4
  closing["You've reached the horizon. The Verse goes on."]:4
  stars["Twinkling stars · ☄ a shooting star now and then"]:4
  clouds["Lit clouds · three bands drifting, warm undersides"]:4
  ridge["⌂ observatory on the shoulder · ☀ the star rising · ⚑ the flag · the range"]:4
  planets["lodestar · Nepal Dev Verse Docs"]:4
  links["Search ⌘K · llms.txt · llms-full.txt · GitHub · Back to top ↑"]:4
  credit["Part of nepal-dev.com. Made with ❤️ by Puncoz Nepal."]:4
```

The closing line stands on the opaque ground above the scene, and the surface rows below it;
nothing moves behind text. In the scene, back to front: stars (some twinkling), two shooting stars on 14- and
23-second cycles, the star rising with the scroll, the far range, three cloud bands looping sideways
over 90, 140 and 200 seconds, the mid range and the near range with the flag waving on its summit and
the observatory standing still on its left shoulder, its slit open toward the star.

**States**

- Empty: with no public planets the planet row is left out; the scene and the links stay.
- Loading: none; the scene is prerendered SVG. Until scripts run, the loops are paused, so the
  scene shows as a still picture with the star risen.
- Not found: the 404 ends with the same Horizon.
- Refused, error: not applicable.
- Degraded:
  - with reduced motion nothing loops or rises;
  - in a browser without scroll-driven animations the star stands risen;
  - in the light theme the clouds take a cool grey body with soft warm undersides;
  - without scripts the scene stays still.
- Success: the reader reaches the end, sees the sky come alive and finds the links below it.

### 2. `The horizon rises` — the end of a docs page, on a wide screen [#2-the-horizon-rises--the-end-of-a-docs-page-on-a-wide-screen]

```mermaid
block-beta
  columns 6
  header["Brand mark · Nepal Dev Verse · Search ⌘K · GitHub · theme"]:6
  side["Sidebar · setting"]:1 last["The page's last lines · previous and next"]:4 toc["On this page · setting"]:1
  dusk["Dusk edge · the sidebar and the trajectory sink into it"]:6
  scene["The Horizon · over the sidebar and the contents"]:6
  surface["Planets · links · credit"]:6
```

The footer stacks above the sidebar and the trajectory, under the header. As it comes into view,
both drop up to 24px in step with the scroll, at full opacity so their text keeps its contrast
(ADR-0031), and its dusk edge, 96px from clear
to the ground colour, takes them; what is below the horizon is hidden. Scrolling up raises them
again. The page column scrolls as usual.

**States**

- Empty: not applicable; every docs page has a sidebar.
- Loading: none; prerendered.
- Not found, refused, error: not applicable.
- Degraded:
  - with reduced motion, or without scroll-driven animations, the sidebar and the trajectory
    do not drop; the horizon simply covers them at its dusk edge;
  - on a page shorter than the window the footer is in view on arrival, and the sidebar stands
    partly below the horizon; its upper part and its own scrolling still work.
- Success: at the end of the page nothing sits on the closing line or the scene, and the
  sidebar comes back as the reader scrolls up.
