Commit Graph

66 Commits

Author SHA1 Message Date
Jeff Emmett 0489319e15 Add rForum to ecosystem apps
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 11:12:50 +00:00
Jeff Emmett e65cfffefd feat: move EncryptID to auth.rspace.online, rebrand as rStack Identity
Traefik routes auth.rspace.online (priority 150) with encryptid.jeffemmett.com
fallback. Landing page rebranded as rStack Identity with rStack.online ecosystem
tagline. Registration form now includes optional email for account recovery.
JWT issuer and recovery URL updated. 14 r* apps listed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 10:49:35 +00:00
Jeff Emmett fa80968b7f Replace EncryptID landing page with real auth UI
Replace marketing-only landing page with a functional auth page that
lets users register and sign in with passkeys. Shows profile view
after login with DID, passkey list, session info, and recovery email
setup. Still includes feature descriptions and r-suite app links.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 07:47:47 +00:00
Jeff Emmett d0a6c3ada5 feat: add rauctions.online to EncryptID allowed origins
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 06:45:29 +00:00
Jeff Emmett cff0c21c0c fix: WebAuthn .well-known routing and cross-origin passkey support
Add Traefik priority=200 and service assignment to encryptid-wellknown
router so it wins over canvas-website/personal-site for the
/.well-known/webauthn path on jeffemmett.com. Add missing origins
(rpubs.online, shop.mycofi.earth, canvas/press/cart.jeffemmett.com)
to the allowed origins list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 04:53:08 +00:00
Jeff Emmett 2b2f054c65 chore: backlog TASK-20 membership endpoints + shape sync (Done)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 15:35:26 -07:00
Jeff Emmett 5d517dbdf1 chore: update TASK-13 with cross-space auth progress
SSO token relay, membership endpoints, SpaceRole bridges, and
bidirectional sync all implemented. AC #6 and #7 checked.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 15:33:16 -07:00
Jeff Emmett 08985d774e feat: add membership endpoints and bidirectional shape sync
Adds space_members table and CRUD endpoints to EncryptID server for
centralized membership management. Extends Automerge CommunityDoc with
members map and PATCH endpoint for module→canvas shape updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:31:48 -07:00
Jeff Emmett e4bcc3f04a docs: add MODULE_SPEC.md with permission model and capabilities
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:30:14 -07:00
Jeff Emmett fa4898ca9f chore: update backlog tasks 9 and 19
Mark task-19 acceptance criteria complete, add notes on header
re-render fix, Docker build fix, and auto-deploy setup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 19:16:40 -07:00
Jeff Emmett 6bafcf35bd fix: skip tsc in Docker build to avoid bun-types conflict
Type checking runs locally/CI. The Docker build just needs vite build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 18:52:38 -07:00
Jeff Emmett 3ba98da1a8 chore: update bun lockfile
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 18:51:56 -07:00
Jeff Emmett fd25996a0c fix: make Docker build self-contained with local context
The parent-directory build context was blocked by a sibling project's
.dockerignore. Switch to using the repo root as context and pull
encryptid-sdk via Docker's additional_contexts feature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 18:51:24 -07:00
Jeff Emmett 46d8429082 fix: update header after auth via requireAuth flow
When a user authenticates through the community creation form (via
requireAuth), the header bar now re-renders to show the logged-in
state instead of still displaying the Sign In button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 18:34:03 -07:00
Jeff Emmett da48f6faf6 feat: add EncryptID auth header and gate community creation behind sign-in
Adds a persistent header bar with sign-in/sign-up across landing and canvas
pages. The "Create Community Space" form now requires EncryptID authentication,
showing a passkey auth modal if the user isn't signed in. Auth tokens are sent
with the community creation API call. EncryptID WebAuthn modules are lazy-loaded
only when auth is triggered.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 17:50:48 -07:00
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 d8b8864fbc chore: add backlog task 18 for CRDT token issuance
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:15:45 -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 65aeceddd1 chore: add backlog tasks 14-17
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:09:30 -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 38636862d8 fix: overhaul canvas shape creation, connections, and sync
- Fix CSS position:absolute missing for 5 trip planning shapes
- Expand arrow connection mode to all 21 shape types (was only 2)
- Center new shapes in viewport instead of clustering top-left
- Extract createAndAddShape() utility, eliminating ~270 lines of duplication
- Add missing Google Item toolbar button
- Add error handling on remote shape creation (try-catch-finally)
- Implement actual WebSocket keep-alive ping (was a no-op)
- Use shape.toJSON() in sync layer to capture all shape properties (was only 3 types)
- Add index signature to ShapeData for arbitrary shape-specific properties

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 08:27:48 -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 aa3db67048 Fix EncryptID Docker build to include encryptid-sdk dependency
Build context changed to parent directory so the encryptid-sdk
(referenced as file:../encryptid-sdk) is accessible during build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:23:18 -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 fe53340869 Add task_prefix to backlog config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:40:56 -07:00
Jeff Emmett e9f7dba926 Add emoji favicon (🌌) for browser tab
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:13:40 -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 6db71abef9 feat: add internal API key bypass for service-to-service calls
Allows trusted internal services (e.g. rnotes) to push shapes
without EncryptID auth by passing X-Internal-Key header.
Key is set via INTERNAL_API_KEY env var.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 15:02:08 -07:00
Jeff Emmett 3a04416b10 fix: resolve TypeScript build errors for Docker deployment
- Fix duplicate property in addShapes object literal
- Exclude src/encryptid/ from tsc (pre-existing errors, separate module)
- Add ambient type declaration for @encryptid/sdk/server

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:59:04 -07:00
Jeff Emmett 7b230baa9c fix: update Dockerfile for encryptid-sdk file: dependency
Use parent context (context: ..) so the SDK at file:../encryptid-sdk
resolves correctly during Docker build. Same pattern as rnotes-online.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:57:31 -07:00
Jeff Emmett d227fbff16 feat: add POST /api/communities/:slug/shapes endpoint
Enables external apps (e.g. rNotes) to push shapes to a canvas via REST API.
Shapes are added in a single Automerge change and broadcast to connected
WebSocket clients for real-time sync.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:56:39 -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 dd6c65a693 Add backlog tasks for EncryptID and rWallet
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 12:41:01 -07:00
Jeff Emmett 2634d02344 Add trip planning components and postMessage bridge for rtrips.online
New folk-* web components for collaborative trip planning:
- folk-itinerary: timeline with day grouping and category icons
- folk-destination: location card with editable notes
- folk-budget: expense tracker with progress bar
- folk-packing-list: collaborative checklist with progress
- folk-booking: booking card with type/status badges

Also adds postMessage broadcasting in community-sync for iframe
embedding in rtrips.online, and toolbar buttons in canvas.html.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 12:21:03 -07:00
Jeff Emmett 9b8784a0ac feat: enforce EncryptID auth on communities with configurable visibility
Protect POST /api/communities, GET /api/communities/:slug, and WebSocket
upgrade with token verification. Add visibility (public/public_read/
authenticated/members_only) and ownerDID to community metadata. Block
writes from read-only connections.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:54:10 -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 73723b5801 fix: Use web entrypoint and bun-based healthchecks
- Change Traefik entrypoint from websecure to web (Cloudflare terminates TLS)
- Replace curl with bun-based healthcheck (curl not in slim image)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 16:53:04 +00:00
Jeff Emmett 4e5496ecf7 fix: Remove invalid --production=false flag from Dockerfile
Bun no longer accepts --production=false syntax. DevDependencies
are included by default during install.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 16:50:21 +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
Jeff Emmett 9e32b5a457 fix: Use slot.parentElement instead of :scope selector for ShadowRoot
The :scope selector may not work correctly when querying from a ShadowRoot.
Use slot.parentElement to reliably find the container div to replace.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 16:09:48 +01:00
Jeff Emmett 42b29ff9d7 fix: Resolve replaceChild and activeElement errors in FolkJS components
- Fix activeElement undefined error by guarding against missing shadowRoot
- Fix replaceChild "parameter 2 is not of type Node" error in all 15 child
  components by using :scope > div selector to find container div directly
  instead of incorrectly searching inside slot.parentElement

The bug was caused by looking for a nested div that doesn't exist - the slot's
parent IS the container div that needs to be replaced.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 13:38:06 +01:00
Jeff Emmett 8eef5b58b7 feat: Add advanced shapes (task-5)
- folk-video-chat: WebRTC video chat with room joining, mute/video toggle
- folk-obs-note: Rich markdown editor with edit/preview/split modes
- folk-workflow-block: Visual workflow nodes with typed ports

All components integrated into canvas.html with toolbar buttons.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 21:42:41 +01:00
Jeff Emmett a6d2cdcf86 feat: Add AI integration shapes (task-4)
- folk-image-gen: Image generation with style selection
- folk-video-gen: Video generation with I2V/T2V modes
- folk-prompt: LLM chat interface with model selection
- folk-transcription: Real-time transcription via Web Speech API

All shapes integrated into canvas.html with toolbar buttons.
Backend API endpoints are placeholders to be implemented.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 21:30:02 +01:00
Jeff Emmett 061b17c264 feat: Add core data shapes (task-3)
- folk-embed: URL embeds for YouTube, Twitter/X, Google Maps
- folk-calendar: Month view calendar with events
- folk-map: MapLibre GL integration with OSM tiles and markers

Integrated all shapes into canvas.html with toolbar buttons.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 20:27:47 +01:00
Jeff Emmett 5115d03082 feat: Add real-time presence cursors for collaboration
- PresenceManager class tracks remote users' cursors and selections
- SVG cursor with username label and auto-assigned colors
- CommunitySync.sendPresence() broadcasts cursor/selection updates
- Throttled to 50ms to prevent flooding
- Auto-fade after 5s inactivity, auto-remove after 15s
- Selection highlight shows which shape each user has selected

Completes task-7: Real-time presence cursors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 19:13:51 +01:00