Commit Graph

28 Commits

Author SHA1 Message Date
Jeff Emmett a5f8389239 feat: r-prefix module slugs, landing page, clickable rStack header
- Rename all 23 module IDs to r-prefixed slugs (canvas→rspace, notes→rnotes, etc.)
- Root rspace.online/ now serves the landing page instead of redirecting to demo
- rStack header in app switcher dropdown is now a clickable link to rstack.online
- Update all internal navigation links, badge maps, and URL helpers
- Space root redirects to /rspace instead of /canvas

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:04:22 -08:00
Jeff Emmett f9bda6c35d refactor: remove iframe shell — render all modules directly via web components
Every module except canvas was using renderIframeShell() to embed standalone
domains (rdata.online, rwork.online, etc.) via iframe. None of these domains
had independent deployments — they routed back to the same container, causing
infinite redirect loops or 404s.

Now all 22 modules render their web components directly inside renderShell(),
eliminating cross-origin failures, iframe loading spinners, and ~820 lines
of dead code. Standalone domain requests are internally rewritten to module
routes instead of 301 redirecting.

- Remove renderIframeShell(), renderStandaloneShell(), IframeShellOptions
- Remove keepStandalone set; rewrite standalone domains internally
- Convert all module GET / handlers to renderShell + <folk-*> components
- Delete 20 standalone.ts entry points (circular/broken)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:45:41 -08:00
Jeff Emmett a483cbe0af fix: tab bar persistence + iframe loading/error states
Tabs now persist in localStorage across page navigations so opening
a new rApp adds it alongside existing tabs instead of replacing them.
Iframe shell shows a loading spinner with 12s timeout and error panel
when standalone apps are unreachable. Converts rSwag to iframe shell.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:19:07 -08:00
Jeff Emmett 0f7d4eb7bb feat: canvas tab bar + rApps toolbar + iframe shell for all modules
Add the missing tab bar to the canvas page so users can switch between
rApp layers (with full CommunitySync persistence). Add an "rApps"
toolbar group that embeds any of the 18 remaining modules as interactive
iframes directly on the canvas. Switch all module page routes to
renderIframeShell, loading standalone domains inside the unified shell.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:03:29 -08:00
Jeff Emmett ddd5f957b4 feat: add rPhotos module + finish header standardization across all rApps
- Create modules/photos/ with Immich API proxy, gallery component,
  shared albums, lightbox viewer, and standard rapp-nav header
- Register photosModule in server/index.ts and add vite build step
- Fix remaining module headers: books (shelf + reader), splat, swag, tube
- All 23 modules now use consistent rapp-nav pattern — no branding headers
- Immich running at demo.rphotos.online, landing page at rphotos.online
- Add backlog tasks 53-58 for recent feature work

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:06:17 -08:00
Jeff Emmett b299caf433 refactor: standardize module component UI across all rApps
Consistent nav headers, button styles, and layout patterns
across calendar, cart, choices, data, forum, funds, inbox,
maps, network, notes, providers, trips, vote, and work modules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 15:47:58 -08:00
Jeff Emmett 38a5d84f72 feat: layered tab system with inter-layer flows and bidirectional feeds
Introduces the full layer/tab architecture for rSpace — each rApp becomes
a layer in a vertical stack with typed flows (economic, trust, data,
attention, governance, resource) connecting them.

New components:
- rstack-tab-bar: tab bar with flat/stack view toggle, drag reorder,
  drag-to-connect flow creation with kind/label/strength dialog
- folk-feed: canvas shape that pulls live data from other layers with
  bidirectional write-back (edit items inline, push changes to source API)
- layer-types: Layer, LayerFlow, FlowKind types and color palette

Automerge schema extended with layers, flows, activeLayerId, layerViewMode.
CommunitySync gains 11 new methods for layer/flow CRUD.

Feed definitions added to 10 modules (funds, notes, vote, choices, wallet,
data, work, network, trips, canvas) with typed feeds and acceptsFeeds.

RSpaceModule interface extended with FeedDefinition and acceptsFeeds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 15:29:03 -08:00
Jeff Emmett 4587387dec feat: consistent headers across all rApps + add mi AI assistant
Header consistency:
- Fix 52px → 56px header height in 7 module CSS files (pubs, funds,
  providers, books, swag, choices, cart)
- Remove custom header background overrides in books.css and pubs.css
- All pages now use the same 3-section header layout: left (app/space
  switchers), center (mi), right (identity)
- Add <rstack-mi> to all 4 standalone HTML pages (index, admin,
  create-space, canvas) and both shell renderers

mi AI assistant:
- New <rstack-mi> web component with search input "Ask mi anything..."
- Dropdown panel with streaming chat UI, typing indicator, markdown
  formatting
- POST /api/mi/ask endpoint: streams from Ollama with full rApp context
  in system prompt (all 22 modules, current space/module)
- Graceful fallback to keyword-based responses when Ollama unavailable
- Configurable via MI_MODEL and OLLAMA_URL env vars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 15:09:41 -08:00
Jeff Emmett 6d6476e917 feat: notes module reads from Automerge docs via WebSocket sync (Tier 1)
Notebook detail view now subscribes to Automerge docs instead of REST,
enabling real-time sync across tabs. Note creation and editing use
Automerge.change() with debounced sync. REST fallback after 5s timeout.
Notebook list and search remain REST-based.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 08:32:37 +00:00
Jeff Emmett 346b406b80 fix: switch all module shell themes from light to dark
The light theme was causing the header bar to render with a white
background, clashing with the dark-themed module content underneath.
All modules and both shell renderers now default to dark theme.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 19:42:33 -08:00
Jeff Emmett f84e45fc5a feat: rebrand AppSwitcher with pastel badges, rStack header, updated categories
- Pastel rainbow badges (rS, rN, rP, rC, rT...) replace plain emoji icons
- Emoji moved to right of app name in dropdown items
- rStack header with gradient badge at top of dropdown
- rStack footer link at bottom
- Canvas renamed to rSpace
- rMaps moved to Planning category
- "Sharing & Media" renamed to "Social & Sharing" with rNetwork at top
- Trigger button shows pastel badge + app name

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 19:36:58 -08:00
Jeff Emmett 86fc403138 feat: rFunds landing page overhaul with EncryptID auth and space-scoped flows
Enhanced landing page with gradient hero, 5-card features grid, auth-aware
"Your Flows" section, and 3-step "How TBFF Works" walkthrough. Added
EncryptID token verification on flow creation, space_flows DB table for
per-space flow association, and space-scoped flow listing API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 02:19:23 +00:00
Jeff Emmett af17153a41 fix: resolve all TypeScript build errors across modules
- Change sql.unsafe() param arrays from unknown[] to any[] (9 modules)
- Exclude sw.ts and demo-sync.ts from tsconfig (separate build targets)
- Add type stub for @mkkellogg/gaussian-splats-3d (CDN-loaded)
- Rename private title → designTitle in folk-swag-designer (HTMLElement conflict)
- Fix Hono context typing and instanceof cast in splat module

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 19:42:44 -08:00
Jeff Emmett 05fc9d142a feat: restructure rFunds — landing page + multi-view TBFF flow
rfunds.online now shows a landing page with TBFF info and flow list
instead of the river demo. The river is one tab in a 3-tab flow detail
view (Table | River | Transactions).

- Add folk-funds-app.ts: main app component with landing + detail views
- Extract mapFlowToNodes to shared lib/map-flow.ts
- Simplify folk-budget-river.ts to pure renderer (no API fetching)
- Restructure routes: / = landing, /demo = demo detail, /flow/:id = flow
- Expand funds.css for landing, tabs, table cards, transaction list
- Add folk-funds-app.ts build entry to vite.config.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 19:18:01 -08:00
Jeff Emmett 05d2280a2b Remove rnotes.online routing — re-deployed standalone with Memory Card spec
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 22:53:11 +00:00
Jeff Emmett 519f13045e Add sample splats + photo/video upload pipeline for rSplat
Seed gallery with real Bonsai and Nike Shoe splat scenes from Hugging Face,
replacing the synthetic Rainbow Sphere. Add photo/video upload endpoint
(POST /api/splats/from-media) with processing status tracking for future
COLMAP + OpenSplat generation. Gallery now shows upload mode toggle
(splat file vs photos/video) and processing status overlays on cards.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 03:27:41 +00:00
Jeff Emmett d6f9b4e83c Fix rSplat viewer: add file extension to URL for format detection
GaussianSplats3D infers format from URL file extension. Changed file
serve route to /api/splats/:id/:filename so URLs end in .splat/.ply/.spz.
Also fixed camera orientation (Y-up) and scale values in test data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 00:31:46 +00:00
Jeff Emmett e721c20382 Move conic trajectory visualization into rTrips as route planner
Relocate the conic intersection calculator from standalone rConic module
into rTrips at /routes sub-page. Adds enhanced visualization with ghost
conic curves, distinct arc colors, overlap zones, crossing angle lines,
pulsing intersection markers, arc labels, and SVG legend.

- New math: sampleConicCurve() for ghost curve tracing, conicTangentAt()
  for tangent/crossing angle computation
- Route planner served at /{space}/trips/routes with OSRM proxy
- Removed standalone conic module registration from server/index.ts
- Updated vite build config to build folk-route-planner under trips

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 00:10:52 +00:00
Jeff Emmett f504ca1a68 Add rSplat module — Gaussian splat viewer with x402 gated uploads
New rSpace module for 3D Gaussian splat viewing. Gallery + full-viewport
Three.js/GaussianSplats3D viewer loaded via CDN importmap. EncryptID auth
on uploads, optional x402 micro-transaction gate. Reusable x402 Hono
middleware in shared/x402/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 20:55:45 +00:00
Jeff Emmett 12818b4689 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 a6ad8c2264 Include all apps with standalone domains and user-accessible spaces
App switcher:
- Add standaloneDomain to ModuleInfo (exposed via /api/modules)
- Add missing standaloneDomain to 5 modules: funds, files, wallet,
  choices, forum (20/21 modules now have standalone domains)
- Show external link arrow on hover for each app's standalone site

Space switcher:
- Pass auth token when fetching /api/spaces so the API returns
  private (authenticated/members_only) spaces the user owns or
  is a member of
- Group spaces into "Your spaces" (with role badge) and "Public
  spaces" sections
- Reload space list on auth-change (sign-in/sign-out)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 01:44:12 +00:00
Jeff Emmett 3ad004d011 feat: add 13 new modules — complete r-suite platform unification
Port all remaining r-suite apps as rSpace modules:

Batch 1: vote, notes, maps, wallet
- rVote: conviction voting engine with quadratic credit costs
- rNotes: markdown note-taking with notebooks and tags
- rMaps: interactive map viewer with markers and routes
- rWallet: multi-chain crypto wallet viewer (Safe Global API)

Batch 2: work, trips, cal, network
- rWork: kanban board with configurable status columns
- rTrips: trip planner with destinations, itinerary, expenses, packing
- rCal: calendar with lunar phase computation and cross-module linking
- rNetwork: graph visualization placeholder (Automerge + CRM proxy)

Batch 3: tube, inbox, data
- rTube: video library + HLS live streaming (Cloudflare R2)
- rInbox: collaborative email with multisig approval workflow
- rData: privacy-first analytics dashboard (Umami proxy)

All 21 modules registered, built, deployed, and verified at
rspace.online/demo/{moduleId}. Each module has:
- mod.ts (Hono routes + RSpaceModule export)
- standalone.ts (independent deployment)
- folk-* web component (Shadow DOM, no framework)
- CSS + DB schema (where needed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:59:00 +00:00
Jeff Emmett a7e364ef5f 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 b0173b4833 feat: add choices and funds modules — Phase 5+6
Phase 5 — Choices: Lightweight module wrapping the canvas-native
folk-choice-vote/rank/spider components. Lists choice shapes from the
space's Automerge doc, links to canvas for creation/interaction.

Phase 6 — Funds: Port of rfunds-online BudgetRiver visualization to
vanilla web component. Includes simulation engine (pure functions),
types (stripped @xyflow), demo presets, and SVG sankey river with
animated waterfalls, overflow branches, and sufficiency badges.
Flow-service API proxy for same-origin frontend calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:11:48 +00:00
Jeff Emmett f7615f4aad 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 91dd701619 feat: add pubs module — Phase 3 port of rPubs to rSpace platform
Port pocket-press (Next.js + Typst) as an rSpace module with Hono routes,
vanilla folk-pubs-editor web component, and Typst v0.13.1 for PDF generation.
Includes all 4 format templates (A7, A6, Quarter Letter, Digest), artifact
envelope creation with cosmolocal spec, and standalone deployment support.

Typst binary installed in Docker via multi-stage build from debian:bookworm-slim.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 22:41:10 +00:00
Jeff Emmett 835d15215e 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 59d00588b4 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