@0xx0lostcause0xx0/ncc-manager
v0.7.0
Published
Web app for managing NCC drafts, publishing, and verification.
Readme
NCC Manager
Web app for drafting, publishing, and verifying NCC, NSR, and endorsement events that ships as a CLI + Express server.
Install & run
Run without installing globally
npx ncc-managerSince the package exposes a bin entry for ncc-manager you can also run npx @0xx0lostcause0xx0/ncc-manager if you prefer the scoped reference. The CLI builds dist/ (if needed), starts the Express server, and opens your browser automatically. Pass --no-open to skip launching the browser or --host/--port to override the defaults (127.0.0.1 and 5179).
Global install
npm install -g @0xx0lostcause0xx0/ncc-manager
ncc-managerThe globally installed CLI also respects --host, --port, and --no-open:
ncc-manager --host 0.0.0.0 --port 4322 --no-openDocumentation
- User Guide - How to use the app to manage conventions.
- Architecture Overview - System design and data flow.
- Nostr Event Kinds - Details on Kind 30050, 30051, 30052, and 30053.
- Internal API - Documentation for the local REST API.
- Chain Validation - Explanation of the NCC validation logic.
Development
npm ci
npm run build
npm startnpm start runs NODE_ENV=production node server.js, so it is safe to point browsers at the published UI (http://localhost:5179 by default).
Use npm run dev:all for the Vite dev server + Express API combo during active development.
Configuration
NCC_RELAYS: comma-separated list of relays used by the server default response.PORT: server HTTP port (default5179). Use the CLI--portflag instead when running viancc-manager.HOST: host to bind. Default127.0.0.1; override via the CLI--host.NCC_SERVER_STORE: set to0to turn off server-side storage.NCC_MANAGER_DB: full path to the SQLite file if you need to place it somewhere else (default is per-user storage).
Supporting documents
You can publish supporting document events (kind: 30053) via the Supporting Docs view in the sidebar. At minimum you must supply:
- Document ID (
d): unique per author (no enforced prefix). - For NCC (
for): which NCC this document supports; it must start withncc-. - Title and Published at: the document metadata.
Additional optional tags are available (for_event, type, language, topics, authors, license) to mirror Appendix E. The editor validates the required relationships before allowing publication.
Caching & offline mode
- NCC documents fetched from relays are cached in
localStorageper relay list for five minutes (TTL). The refresh button forces a new fetch, but when the cache is fresh or you’re offline the cached data is reused so you don’t hit the relays unnecessarily. - The UI listens for
online/offlineevents and informs you via toasts; NCC/endorsement events fetched from relays are cached inlocalStoragefor five minutes per relay set, so you still see data when temporarily offline. - Drafts are persisted via the server’s SQLite store whenever it is reachable, and a fallback in-memory cache keeps the most recent drafts available even while offline. Publishing while offline will queue the request but eventually retries the relay publish attempts once connectivity returns.
Database location
By default the server stores drafts at the OS-specific data path provided by env-paths, ensuring writable locations even for global installs. For example:
- Linux:
~/.config/ncc-manager/ncc_manager.sqlite - macOS:
~/Library/Application Support/ncc-manager/ncc_manager.sqlite - Windows:
%APPDATA%\\ncc-manager\\ncc_manager.sqlite
Set NCC_MANAGER_DB to a custom full path if you need to colocate the database elsewhere (e.g., on a shared drive).
Testing & packaging
npm run pack:test: builds the UI, runsnpm pack, installs the generated tarball globally, and verifiesncc-manager --no-openstarts cleanly. It does not automatically uninstall anything.npm run build: compile the Vite app intodist/.
Publishing
npm run build(ensuresdist/exists for publishing).npm run pack:testto sanity-check the packed package.npm publish --access public(or via your CI) once the package is ready.
The package publishes dist/, server.js, src/, bin/, README.md, and LICENSE thanks to the files entry in package.json. The prepublishOnly hook keeps dist/ up to date before every publish.
