Commit Graph

14 Commits

Author SHA1 Message Date
Jeff Emmett 163ab3c288 fix: remove hardcoded secret fallbacks from EncryptID (GitGuardian alert)
Require DATABASE_URL and JWT_SECRET via env vars instead of falling back
to hardcoded defaults. Removes insecure fallback passwords from compose
file as well. Production was already using strong .env secrets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:33:02 -07:00
Jeff Emmett c2255f1296 feat: add CRDT token issuance system with mint/ledger shapes
Implements BFT-CRDT token infrastructure as FolkShape components that
live in the existing Automerge document — no new server or database needed.
Admins can create token types (mint) and issue them to participants by
DID or email (ledger), with real-time sync across all connected peers.

- folk-token-mint: token definition (name, symbol, supply, color, icon)
- folk-token-ledger: distribution tracker with issuance form, email escrow
- Canvas toolbar "Token" button creates mint+ledger+arrow pair
- Demo seeds: GOV (equal governance) and CRED (contribution credits)
- community-sync: remote property updates for both token shapes
- EncryptID: add rTube, rStack to allowed origins and landing page
- rSpace landing page: add EncryptID and interoperability sections

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:01:47 -07:00
Jeff Emmett 0a32944243 feat: add JSON WebSocket mode, demo seed data, and useDemoSync hook
Add lightweight JSON WebSocket protocol (?mode=json) that bridges
Automerge to JSON for demo pages, avoiding the ~500KB Automerge bundle.
Includes GET /api/communities/:slug/shapes endpoint, POST demo reset
with rate limiting, Alpine Explorer 2026 seed data (~40 shapes), and
the useDemoSync React hook for real-time demo page connectivity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 09:38:59 -07:00
Jeff Emmett 89fba95e40 feat: add email recovery with Mailcow SMTP and recovery page
- Add email column to users table, recovery_tokens table
- Add recovery endpoints (set/request/verify email)
- Integrate nodemailer with Mailcow SMTP (mx.jeffemmett.com)
- Add branded HTML recovery email template
- Add /recover landing page with passkey registration
- Add SMTP env vars to docker-compose

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 09:35:53 -07:00
Jeff Emmett eedc6b1b4a feat: add rFunds, rNetwork, rCart to r-Ecosystem app icons
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 08:27:40 -07:00
Jeff Emmett 7f37e47934 Add rcart.online to EncryptID CORS allowed origins
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:21:13 -07:00
Jeff Emmett 8e51ba923a feat: add rNotes and rTrips to r-Ecosystem app icons
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:05:25 -07:00
Jeff Emmett 426e05d631 feat: add missing r* tool origins to EncryptID CORS
Add rnotes.online, rfunds.online, rtrips.online, rnetwork.online to
allowedOrigins for cross-r* authentication support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 13:30:33 -07:00
Jeff Emmett e5af01119b feat: upgrade EncryptID server to PostgreSQL
Replace in-memory Maps with persistent PostgreSQL storage:
- Add db.ts with typed query functions for users, credentials, challenges
- Add schema.sql with users/credentials/challenges tables
- Update server.ts to use async DB queries
- Add postgres service to docker-compose
- Health endpoint now reports database connectivity
- Auto-cleanup of expired challenges every 10 minutes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 07:34:13 -07:00
Jeff Emmett 8e10f5cb03 fix: Add abort mechanism for conditional UI to prevent pending request errors
- Add global AbortController for conditional UI requests
- Call abortConditionalUI() at start of registerPasskey and authenticatePasskey
- Export abortConditionalUI from index for manual use if needed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 19:14:56 +00:00
Jeff Emmett 20a51e7dce fix: Explicitly import UI components in demo to ensure registration
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 16:58:45 +00:00
Jeff Emmett c18b84b7c9 fix: Build client-side JS bundle for demo page
- Add bun build step to create browser-compatible JS from TypeScript
- Update demo.html to import from /dist/index.js
- Update server to serve /dist/* for bundled modules

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 16:57:34 +00:00
Jeff Emmett e0b30e52ef fix: Add route for /demo.html page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 16:54:14 +00:00
Jeff Emmett 72192007e6 feat: Add EncryptID unified identity system
Implements the EncryptID identity system for the r-ecosystem:

- WebAuthn/Passkey authentication with PRF extension for key derivation
- Client-side cryptographic key derivation (AES-256, ECDSA P-256, Ed25519)
- Social recovery system with guardians (no seed phrases!)
- Session management with authentication levels
- Cross-app SSO via Related Origin Requests
- Web components: login button and guardian setup panel
- Hono server for authentication endpoints
- Docker deployment configuration

Domain: encryptid.jeffemmett.com
RP ID: jeffemmett.com (for cross-subdomain passkey usage)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 16:48:19 +00:00