Commit Graph

11 Commits

Author SHA1 Message Date
Jeff Emmett cf3be7d7a9 Wire real auth and backends into all 21 rSpace modules
- Auth: 10 modules now use EncryptID token verification on write
  routes (vote, inbox, forum, files, notes, work, cal, trips,
  cart, providers). All POST/PUT/DELETE without valid token → 401.
- Tube: S3Client for Cloudflare R2 bucket (upload, streaming, range)
- Data: Umami analytics proxy (stats, active, tracker, events)
- Wallet: Safe Global API proxy with 12 chains + cache headers
- Network: Twenty CRM GraphQL client (people, companies, graph)
- Maps: sync-url endpoint for WebSocket connection
- Inbox: background IMAP sync worker (30s poll via ImapFlow)
- Forum: provisioner already wired (Hetzner + Cloudflare + cloud-init)
- Config: .gitignore fix, docker-compose env vars + rmail network,
  added @aws-sdk/client-s3, imapflow, mailparser deps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 19:37:26 +00:00
Jeff Emmett 682c995cc3 feat: add files and forum modules — Phase 7+8
Files module (rFiles): file upload/download, share links with
expiry/password/download limits, memory cards CRUD, access logging,
cleanup timers replacing Django Celery tasks.

Forum module (rForum): Discourse cloud provisioner with Hetzner VPS
creation, Cloudflare DNS, cloud-init for automated Discourse install,
async provisioning pipeline with step logging, instance management.

All 10 modules now active: Canvas, rBooks, rPubs, rCart, Providers,
Swag, rChoices, rFunds, rFiles, rForum.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:25:18 +00:00
Jeff Emmett d9cc86637c feat: add cart, providers, swag modules — Phase 4 cosmolocal commerce
Port the three cosmolocal print-on-demand services (rCart, Provider Registry,
Swag Designer) into the unified rSpace module system. Each module includes
Hono API routes, folk-* web components, DB schemas, and standalone servers.

- Cart: catalog ingest, orders with state machine, x402 detection, rFunds flow deposit
- Providers: 6 seeded providers, earthdistance proximity queries, capability matching
- Swag: product templates (sticker/poster/tee), Sharp image processing, artifact envelopes
- DB: cube + earthdistance extensions, rcart + providers schemas
- Docker: swag-artifacts volume, payment-network for flow service

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 22:59:19 +00:00
Jeff Emmett b42179cff7 feat: add books module — Phase 2 port of rBooks to rSpace platform
Port rbooks-online (Next.js + React) as an rSpace module with Hono routes,
vanilla web components, and shared PostgreSQL schema. Includes library grid
(folk-book-shelf), flipbook PDF reader (folk-book-reader), upload with
EncryptID auth, IndexedDB caching, and standalone deployment support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 22:07:34 +00:00
Jeff Emmett eed7b2f151 feat: unified module system — Phase 0 shell + Phase 1 canvas module
Implement the rSpace module architecture that enables all r-suite apps
to run as modules within a single-origin platform at rspace.online,
while each module can still deploy standalone at its own domain.

Phase 0 — Shell + Module System:
- RSpaceModule interface (shared/module.ts) with routes, metadata, hooks
- Shell HTML renderer (server/shell.ts) for wrapping module content
- Three header web components: rstack-app-switcher, rstack-space-switcher,
  rstack-identity (refactored from rspace-header.ts into Shadow DOM)
- Space registry API (server/spaces.ts) — /api/spaces CRUD
- Hono-based server (server/index.ts) replacing raw Bun.serve fetch handler
  while preserving all WebSocket, API, and subdomain backward compat
- Shared PostgreSQL with per-module schema isolation (rbooks, rcart, etc.)
- Vite multi-entry build: shell.js + shell.css built alongside existing entries
- Module info API: GET /api/modules returns registered module metadata

Phase 1 — Canvas Module:
- modules/canvas/mod.ts exports canvasModule as first RSpaceModule
- Canvas routes mounted at /:space/canvas with shell wrapper
- Fallback serves existing canvas.html for backward compatibility
- /:space redirects to /:space/canvas

URL structure: rspace.online/{space}/{module} (e.g. /demo/canvas)
All existing subdomain routing (*.rspace.online) preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 21:54:15 +00: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 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 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 40ffd135da Fix Traefik routing: only handle subdomains
- Use unique router name 'rspace-canvas' to avoid conflict with rspace-prod
- Only match subdomains, explicitly exclude main domain
- rspace-prod handles rspace.online landing page
- rspace-online handles *.rspace.online canvas

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 08:24:01 +01:00
Jeff Emmett f1224e8b75 fix: Use web entrypoint for Traefik (Cloudflare handles SSL)
- Changed from websecure to web entrypoint
- Removed obsolete version attribute
- Cloudflare tunnel connects to port 80, so no TLS config needed

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 21:14:55 +01:00
Jeff Emmett 1ec463f193 Initial rspace-online: FolkJS collaborative canvas with subdomain routing
- Pure FolkJS implementation with folk-shape, folk-markdown components
- Bun server with WebSocket sync and Host header subdomain detection
- Community creation API at /api/communities
- Docker setup with Traefik labels for wildcard *.rspace.online routing
- Landing page with community creation form
- Canvas page with basic markdown note creation

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 16:27:07 +01:00