johnlombardo-dev/same-sky

★ 0Forks 0TypeScriptGitHub ↗Compare

README

Same Sky

To install dependencies:

bun install

To start a development server:

bun dev

To run for production:

bun start

To run tests:

bun test

To run visual regression tests (Playwright):

bun run test:visual

To update visual snapshots:

bun run test:visual:update

To run the interactive location persistence TUI:

bun run tui

To include metric logs (for example [metric] ...) while running the TUI:

bun run tui -- --verbose

Menu shortcuts:

  • Top-level menu: Exit option, Esc also exits.
  • Child feature menus: Back option, Esc also goes back one level (for location, Back returns to feature selection).

To bypass the app-feature menu and jump directly into location persistence:

bun run tui location

Persisted location API

  • GET /api/locations/persisted
  • POST /api/locations/persisted with JSON body { "name": string, "lat": number, "long": number, "nickname"?: string, "timezone"?: string, "granularity"?: string }
  • GET /api/locations/persisted/debug-json (read-only debug dump)
  • DELETE /api/locations/persisted/:id

Persisted locations are stored in SQLite at data/persisted-locations.db (legacy data/persisted-locations.json is imported automatically when the database is empty).

Sky API

  • GET /api/location/sky-24h?lat={number}&long={number}&at={unixMsOptional}
    • Returns { result } with stops[], rotationDeg, rotationRad, and always-on diagnostics including all six second-order factors and fallback metadata.

Same Sky is a Bun-powered app for visualizing local time and sky state across locations.

Contributors

johnlombardo-dev

Issues