|
| 1 | +# nsyte |
| 2 | + |
| 3 | +## What This Is |
| 4 | + |
| 5 | +A CLI tool for publishing static sites to nostr relays and blossom servers. Users can deploy, manage, and serve websites using the nostr protocol, with support for multiple named sites, snapshots, NIP-89 app handlers, and bunker-based signing. The marketing site at `nsyte.run` introduces the project with a compact above-the-fold landing that links to the full documentation site. |
| 6 | + |
| 7 | +## Core Value |
| 8 | + |
| 9 | +Reliable site deployment to the nostr + blossom ecosystem with a simple CLI workflow. |
| 10 | + |
| 11 | +## Current State |
| 12 | + |
| 13 | +**Shipped:** v1.6 OS Package Manager/Distributors on 2026-05-07. |
| 14 | + |
| 15 | +**Current package-management state:** Package templates live under `packages/`, release-triggered package jobs are wired in `.github/workflows/publish-packages.yml`, and maintainer runbooks live in `docs/RELEASING.md`. Live package-manager publication UAT remains deferred until external repos, secrets, package-manager runtimes, and release runs are available. |
| 16 | + |
| 17 | +## Requirements |
| 18 | + |
| 19 | +### Validated |
| 20 | + |
| 21 | +<!-- Shipped and confirmed valuable. --> |
| 22 | + |
| 23 | +- Site deployment to blossom servers and nostr relays (deploy, undeploy) — v1.0 |
| 24 | +- Named site management (sites command) — v1.0 |
| 25 | +- File operations (put, get, delete, list, download) — v1.0 |
| 26 | +- Manifest snapshots for versioning — v1.0 |
| 27 | +- Configuration management with bunker-based signing — v1.0 |
| 28 | +- NIP-89 app handler announcements — v1.0 |
| 29 | +- CI/CD integration mode — v1.0 |
| 30 | +- Debug and validation tooling — v1.0 |
| 31 | +- Manifest title/description event metadata fix — v1.1 |
| 32 | +- Dry-run mode for deploy — v1.1 |
| 33 | +- Config schema hosting — v1.1 |
| 34 | +- Secrets scanning pre-deploy check — v1.1 |
| 35 | +- Custom `--created-at` global CLI option for overriding event timestamps — v1.2 |
| 36 | +- Above-the-fold homepage layout (heading, links, compact install box) — v1.3 |
| 37 | +- Darker dark-theme palette (`#06070d` base) preserving the green accent — v1.3 |
| 38 | +- Tighter typography, spacing, and component density on the homepage — v1.3 |
| 39 | +- Persistent links from homepage to the existing docs site — v1.3 |
| 40 | +- Documentation aligned 1:1 with the actual CLI surface (commands, flags, behavior) — v1.4 |
| 41 | +- Drift gate (`scripts/check-doc-drift.ts` + GitHub Actions workflow) catches future drift in CI — v1.4 |
| 42 | +- VitePress docs/site migration with homepage-matched theme and local search — v1.5 |
| 43 | +- Package source-of-truth under `packages/` with AUR, Homebrew, Scoop, Winget, and Nix templates — v1.6 |
| 44 | +- Release-triggered package publication workflow with independent manager jobs and shared asset/checksum setup — v1.6 |
| 45 | +- Package-manager maintainer runbooks for tokens, repo bootstrap, local verification, and troubleshooting — v1.6 |
| 46 | + |
| 47 | +### Active |
| 48 | + |
| 49 | +<!-- Current scope. Building toward these. --> |
| 50 | + |
| 51 | +Next milestone not selected yet. Start with `$gsd-new-milestone`. |
| 52 | + |
| 53 | +Backlog still standing from v1.4 phantom log: env-var override support, `nsyte config show`/`set` subcommands, `validate` redundant `-f` flag fix, `deploy` duplicate `-c` short-flag fix. |
| 54 | + |
| 55 | +### Out of Scope |
| 56 | + |
| 57 | +<!-- Explicit boundaries. Includes reasoning to prevent re-adding. --> |
| 58 | + |
| 59 | +- Light theme — dark-only by design (cypherpunk aesthetic) |
| 60 | +- Mobile-first homepage redesign — desktop above-the-fold fit is the priority; mobile gets graceful degradation only |
| 61 | +- Asciinema/demo content on the homepage — demo lives in docs |
| 62 | +- Marketing content on homepage (features, CI/CD, "what's nsite") — migrated to docs to enforce no-scroll constraint |
| 63 | +- CLI source changes during the v1.4 docs pass — if a doc audit reveals a real source bug or missing feature, it's flagged for a future milestone, not fixed in this one |
| 64 | +- CLI source changes during v1.5 — same rule: docs migration only; phantom-log backlog stays deferred |
| 65 | +- Live Chocolatey, Debian, Flatpak, and Snap publication — templates are preserved under `packages/`, but v1.6 intentionally did not add live jobs for those managers |
| 66 | + |
| 67 | +## Context |
| 68 | + |
| 69 | +- **Runtime:** Deno (TypeScript) |
| 70 | +- **Nostr libraries:** applesauce-core, applesauce-signers, applesauce-relay |
| 71 | +- **CLI framework:** Cliffy (Command, Prompt, Ansi) |
| 72 | +- **Event signing:** ISigner interface from applesauce-signers (supports bunker, nsec) |
| 73 | +- **Event timestamps:** `--created-at` global option overrides timestamp on most event kinds; delete (kind 5) and blossom auth (kind 24242) events always use current time |
| 74 | +- **Commands:** init, deploy, list, status, snapshot, sites, browse, download, get, ci, put, run, serve, delete, undeploy, validate, debug, announce, config, bunker, scan |
| 75 | +- **Marketing site:** Single-page HTML at `website/src/index.html` (~653 lines after v1.3 redesign, down from ~1890). Cypherpunk theme, `--cyber-bg #06070d`, `--cyber-accent #34d399`. Single `<section class="hero">` with flex-centered content (wordmark + tagline + compact install component + top-link nav). UI-audit score 24/24 at v1.3 close. |
| 76 | +- **Docs site:** VitePress build under `docs/`, with palette/typography matched to the homepage. Homepage links to preserve: `/docs/installation/`, `/docs/`. |
| 77 | +- **Package managers:** `packages/` is the package source-of-truth. AUR, Homebrew, Scoop, Winget, and Nix have v1.6 publication/update automation; Chocolatey, Debian, Flatpak, and Snap templates are preserved without live jobs. |
| 78 | + |
| 79 | +## Constraints |
| 80 | + |
| 81 | +- **Deno:** Must compile to single binary for Linux, macOS, Windows |
| 82 | +- **Nostr protocol:** Events must conform to NIP specifications |
| 83 | +- **Blossom protocol:** Auth events (kind 24242) have expiration requirements |
| 84 | +- **Brand color:** Existing green accent (`--cyber-accent #34d399`) is fixed — only darks deepen |
| 85 | +- **Marketing site:** Single-file inline CSS+HTML+JS (`website/src/index.html`); no build step |
| 86 | + |
| 87 | +## Key Decisions |
| 88 | + |
| 89 | +| Decision | Rationale | Outcome | |
| 90 | +|----------|-----------|---------| |
| 91 | +| Use applesauce libraries | Modern nostr library ecosystem with good Deno support | -- Pending | |
| 92 | +| Cliffy for CLI | Mature Deno CLI framework | -- Pending | |
| 93 | +| `--created-at` excluded from delete & blossom auth events | Deletion timestamp must reflect actual time; blossom expiration math depends on current time | ✓ Good (v1.2) | |
| 94 | +| Homepage flex-centered + `min-height: 100vh` (v1.3 cycle-2) | First attempt dropped 100vh and left content top-anchored — user feedback restored centering as the more pleasant layout | ✓ Good (v1.3) | |
| 95 | +| Nav placed AT END of `.hero-content` (v1.3 cycle-2) | User checkpoint feedback: links sit better below the wordmark/tagline/install | ✓ Good (v1.3) | |
| 96 | +| Underlined text tabs over button-pill style (v1.3) | Denser, fits the "tighter" mandate; cleaner with the compact install card | ✓ Good (v1.3) | |
| 97 | +| Phase 10 audit findings folded into Phase 11 rebuild | The flagged surfaces (install/code/copy components) were already being rebuilt; one-pass fix preferred over separate cleanup phase | ✓ Good (v1.3) — clean 24/24 audit | |
| 98 | +| `history.pushState` on in-page anchor click (v1.3) | Plan must_haves required `window.location.hash === '#install'`; default `e.preventDefault()` + `scrollIntoView` doesn't update the URL | ✓ Good (v1.3) | |
| 99 | + |
| 100 | +## Evolution |
| 101 | + |
| 102 | +This document evolves at phase transitions and milestone boundaries. |
| 103 | + |
| 104 | +**After each phase transition** (via `/gsd:transition`): |
| 105 | +1. Requirements invalidated? -> Move to Out of Scope with reason |
| 106 | +2. Requirements validated? -> Move to Validated with phase reference |
| 107 | +3. New requirements emerged? -> Add to Active |
| 108 | +4. Decisions to log? -> Add to Key Decisions |
| 109 | +5. "What This Is" still accurate? -> Update if drifted |
| 110 | + |
| 111 | +**After each milestone** (via `/gsd:complete-milestone`): |
| 112 | +1. Full review of all sections |
| 113 | +2. Core Value check -- still the right priority? |
| 114 | +3. Audit Out of Scope -- reasons still valid? |
| 115 | +4. Update Context with current state |
| 116 | + |
| 117 | +## Key Decisions |
| 118 | + |
| 119 | +(continuing from above table) |
| 120 | + |
| 121 | +| Decision | Rationale | Outcome | |
| 122 | +|----------|-----------|---------| |
| 123 | +| Phantom log as living artifact | Records every removed doc claim with verbatim quotes — future feature backlog source | ✓ Good (v1.4) — 34 entries surface concrete source-side work | |
| 124 | +| `upload.md` kept as alias stub (not deleted) | UX: a user searching "upload" should find a doc that points them to deploy | ✓ Good (v1.4) | |
| 125 | +| `ls.md` filename retained, content re-anchored on `list` | Avoid breaking external links to `/docs/usage/commands/ls/` | ✓ Good (v1.4) | |
| 126 | +| `_global-options.md` canonical reference | Don't duplicate `--config`/`--created-at` across 22 pages | ✓ Good (v1.4) | |
| 127 | +| Drift gate: 3 checks (coverage, flag, env-var) | Maps directly to the top-3 phantom patterns from the audit | ✓ Good (v1.4) | |
| 128 | +| Phase 14 audit folded color findings from Phase 11 audit (UI carry-over) — n/a in v1.4 (docs-only) | — | — | |
| 129 | +| `packages/` as package source-of-truth | Keeps manager templates versioned with the release workflow and avoids hidden `.packaging` drift | ✓ Good (v1.6) | |
| 130 | +| Independent package manager jobs instead of a matrix | One package-manager failure should not cancel unrelated publication targets | ✓ Good (v1.6) | |
| 131 | +| External package UAT deferred at close | Live pushes require repos, secrets, package-manager runtimes, and package index workflows outside local static verification | ⚠ Revisit before public package announcement | |
| 132 | + |
| 133 | +--- |
| 134 | +*Last updated: 2026-05-07 — after v1.6 milestone close* |
0 commit comments