No description
  • Go 75.5%
  • HTML 13.5%
  • CSS 10.4%
  • Python 0.5%
  • JavaScript 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-11 18:54:46 -07:00
cmd/server local dashboard work: custom pages + DNS monitor modules 2026-08-11 18:54:46 -07:00
internal local dashboard work: custom pages + DNS monitor modules 2026-08-11 18:54:46 -07:00
scripts infra: promptarchitect wayfinder map — save/resume plan support + tests 2026-08-11 18:54:46 -07:00
.air.toml dashboard: snapshot all 9 spec modules + Calendar, Actual client, 1920x1080 viewport 2026-08-11 18:54:45 -07:00
.directory infra: promptarchitect wayfinder map — save/resume plan support + tests 2026-08-11 18:54:46 -07:00
.gitignore moon-os: front-page readability pass (bigger type, more air) + gitignore sync-conflict copies 2026-08-11 18:54:46 -07:00
CLAUDE.md infra: promptarchitect wayfinder map — save/resume plan support + tests 2026-08-11 18:54:46 -07:00
go.mod moon-os: command-center restructure — nuke v0 dashboard, stone-codex shell, module pages 2026-08-11 18:54:45 -07:00
go.sum moon-os: command-center restructure — nuke v0 dashboard, stone-codex shell, module pages 2026-08-11 18:54:45 -07:00
README.md infra: promptarchitect wayfinder map — save/resume plan support + tests 2026-08-11 18:54:46 -07:00

MOON·OS

Self-hosted, local-first operations + personal command center. Single Go binary, SQLite, server-rendered HTML (html/template). See the architecture spec ("personal dashboard.md") for full design principles.

Formerly two projects (the amber-CRT personal dashboard + the standalone moon-os operations site); now merged into one binary with a unified stone-codex design language — brutalist carved-stone, monochrome, big type, drifting dust + torch flicker.

The v0 "widget grid" dashboard page was removed — no cards, no widget metaphor. The UI is a command center: a single Operations front page plus one page per module.

Routes

  • /Operations overview: the front door. Splash, Today strip (weather / next event / open tasks), quick actions, profile + goal progress, project status, agents, websites, emails, skills. Static content in internal/overview; live data layered on in web.handleOverview.
  • Module pages (each GET serves its full page; GET partial for HTMX polling; POST for mutation): /tasks, /calendar, /habits, /notes, /budget, /weather, /photos (gallery), /grocery, /meals, /vault, /worldstate, /goals, /hermesstatus.
  • /profile/{id} — a profile sub-dashboard.
  • /profilecost — read-only Costs: live Hermes profile-cost balance from ~/.hermes (weighted categories).
  • /login, /logout — auth. Everything else is gated by RequireAuth (unauth → 303 /login). /login CSRF is intentionally exempted for phone Safari — do NOT revert.

Layout

dashboard/                     # repo: ~/sites/dashboard
  cmd/server/                  # entrypoint (wires config, logging, db, auth, web)
  internal/
    config/                    # configuration loading (env + flags)
    logging/                   # structured logger (log/slog)
    db/                        # SQLite connection + embedded migration runner
    auth/                      # authentication, sessions, CSRF
    overview/                  # Operations front-page static model
    profiles/                  # profile sub-dashboards
    hermescost/                # Hermes profile-cost balance (Costs page)
    hermesstatus/              # gateway health + agent activity
    goals/  tasks/  calendar/  # per-module stores
    habits/ notes/  budget/
    weather/ photos/ grocery/
    meals/  vault/  worldstate/
    actual/                    # Actual Budget client (disabled: needs creds)
    web/                       # chi router, templates, static assets
      templates/*.html         # base.html shell + per-module page templates
      static/css/style.css
      static/js/moonos.js
  data/dashboard.db

Build & verify

Go 1.23+ required (no CGO; uses modernc.org/sqlite, a pure-Go driver). Local Go lives at ~/.gotool/go/bin.

export PATH=/home/moonwxyz/.gotool/go/bin:$PATH
cd /home/moonwxyz/sites/dashboard
go build ./...        # must compile
go vet ./...          # static checks
go test ./...         # unit + in-process route tests

Run / deploy

Runs as the systemd user service dashboard.service, serving :8080 on LAN 192.168.1.108. First run bootstraps the owner (moon) with DASH_SETUP_PASSWORD. Deploy = rebuild + systemctl --user restart dashboard.service.

DASH_ADDR=:9000 DASH_DB=data/dashboard.db DASH_LOG=debug go run ./cmd/server
# -secure-cookies  (Secure flag on auth cookies, for behind-TLS deploys)
# DASH_NO_AUTH=true (skip login on trusted LAN only)
# DASH_VAULT_DIR / DASH_VAULT_FILES (vault-backed modules)

Security notes

  • Passwords hashed with bcrypt; session tokens are 32 random bytes with only a sha256 hash stored.
  • Auth cookies HttpOnly + SameSite=Lax; Secure flag via -secure-cookies.
  • CSRF double-submit cookie pattern on all state-changing requests.

Status

Every store has unit tests; the web layer has in-process route/render tests. All modules are account-scoped (user_id). See the spec's Roadmap for what exists vs. the (explicitly uncommitted) backlog.