feat: isolated dev environment, encrypted voting, slug-decoupled hackathon URLs#38
feat: isolated dev environment, encrypted voting, slug-decoupled hackathon URLs#38agustinkassis wants to merge 1 commit into
Conversation
…athon URLs Isolated dev environment (off by default; gated by NEXT_PUBLIC_DEV_MODE): - DEV MODE bar with identity switcher + soldier/dummy impersonation via deterministic stand-in keys (lib/devImpersonation); reads key off the real pubkey while signing stays on the stand-in. - Local nostr-rs-relay (dev/relay, docker) + NEXT_PUBLIC_NOSTR_RELAYS override so publish/read traffic can be fully isolated. - Dummy-data generator (lib/devSeed) + dev-only API routes (app/api/dev). - "Mis hackatones" dashboard page; impersonation-aware dashboard reads. - pnpm scripts gen:dev-keys / relay:up|down|logs; docs in AGENTS.md + .env.example. Encrypted community voting: - NIP-44 ballots encrypted to La Crypta's key, signed by the voter; allocations are unreadable on the relay and tallied server-side only (lib/voting, votingClient, nostrSigner, nip46Client, zap). - Results hidden while voting is open; only who-voted + declared count shown. - Two-step admin close (preview -> confirm): the backend decrypts, re-validates per-voter budgets, signs the frozen result with countedBallotIds, and assigns winners. Prize payout stays manual. Hackathon URL slug decoupling: - Keep the internal id "zaps" (already-published events reference it) but serve the public URL at /hackathons/gaming via an optional slug; getHackathon resolves both id and slug. - All public links, canonicals, sitemap, OG/Twitter images and JSON-LD use the slug; route handlers and data lookups continue keying off the canonical id. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Three related workstreams, built and tested together against an isolated local environment so nothing touches production relays during development.
1. Isolated dev environment (off by default)
Gated entirely by
NEXT_PUBLIC_DEV_MODE— production leaves it unset and none of this renders.lib/devImpersonation): reads key off the real pubkey while signing stays on the stand-in. The real secret keys are never held.dev/relay,nostr-rs-relayvia Docker) + aNEXT_PUBLIC_NOSTR_RELAYSoverride so all publish/read traffic can be routed locally.lib/devSeed) + dev-only API routes (app/api/dev/*, 404 unless dev mode).gen:dev-keys,relay:up|down|logs; documented inAGENTS.md+.env.example.2. Encrypted community voting
lib/voting,votingClient,nostrSigner,nip46Client,zap).countedBallotIds, and assigns winners. Prize payout stays manual.3. Hackathon URL slug decoupling
zaps(already-published community events reference it) but serves the public URL at/hackathons/gamingvia an optionalslug;getHackathonresolves both id and slug./hackathons/zapsstill resolves (200) and canonicalizes to/hackathons/gaming.Verification
pnpm buildpasses; prerender emits/hackathons/gaming(nozapsroute)./hackathons/gamingand legacy/hackathons/zapsboth 200, both canonical →gaming; no stray/hackathons/zapslinks.Notes
pnpm build+ manual.dev/relay/data/) is gitignored; onlyconfig.toml+docker-compose.ymlare committed. No secrets included.🤖 Generated with Claude Code