Commit Graph

172 Commits

Author SHA1 Message Date
Jeff Emmett 29df97ccc8 Merge branch 'dev' 2026-02-26 12:02:21 -08:00
Jeff Emmett 5d19ad169c fix: unregister stale service workers + sandbox iframe on landing pages
Stale service workers from the old fetch-proxy approach were intercepting
cross-origin iframe requests, causing CORS and replaceState errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:02:07 -08:00
Jeff Emmett d9c374f784 Merge branch 'dev' 2026-02-26 09:45:15 -08:00
Jeff Emmett bd0916b60f security: remove hardcoded secrets, require env vars
Remove hardcoded encryption fallback and Postgres password defaults
flagged by GitGuardian. ENCRYPTION_SECRET and DATABASE_URL are now
required env vars that throw on missing rather than falling back to
insecure defaults.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:45:10 -08:00
Jeff Emmett 54ead05224 Merge branch 'dev' 2026-02-25 23:47:26 -08:00
Jeff Emmett bfdb09fc4b fix: iframe embed for standalone rApps, all links use rspace.online/r*
Replaced the fetch-and-proxy approach (which caused CORS errors for
cross-origin assets, fonts, and service workers) with full-page iframe
embedding. Modules with standalone domains are embedded in an iframe
below the rSpace header. Modules without get a simple generated landing
page. All "Try Demo" and app switcher links now consistently use
rspace.online/{moduleId} instead of demo.rspace.online.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:47:15 -08:00
Jeff Emmett 15cdadfbf3 merge: resolve docker-compose conflict — keep rswag.online, drop rproviders
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:40:08 -08:00
Jeff Emmett f84b0b9914 refactor: remove rProviders from rApps, fix rSwag domain to rswag.online
rProviders (providers.mycofi.earth) is a separate project — removed
module registration, app switcher entry, tab bar badge, canvas embed
button, Traefik router, and standalone config. rSwag domain updated
from swag.mycofi.earth to rswag.online across all references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:39:43 -08:00
Jeff Emmett 53b3cb5b30 feat: add missing standalone domain routing for all rApps
Added standaloneDomain to rsplat module (rsplat.online). Added 8 missing
Traefik routers: rnotes, rfiles, rphotos, rinbox, rcart, rsplat,
swag.mycofi.earth, providers.mycofi.earth. All 22 standalone-domain
modules now have matching Traefik routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:35:06 -08:00
Jeff Emmett 19ce7080e8 feat: add missing standalone domain routing for all rApps
Added standaloneDomain to rsplat module (rsplat.online). Added 8 missing
Traefik routers: rnotes, rfiles, rphotos, rinbox, rcart, rsplat,
swag.mycofi.earth, providers.mycofi.earth. All 22 standalone-domain
modules now have matching Traefik routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:34:25 -08:00
Jeff Emmett ba8a87727e feat: add rSocials module with campaign builder proxy
Registers rsocials module in rSpace unified system. Embeds the campaign
strategy builder from rsocials:3000 via iframe in the rSpace shell, with
API proxy for campaign CRUD. Accessible at /{space}/rsocials/campaign.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 07:14:52 +00:00
Jeff Emmett 138716660b feat: proxy standalone domain landing pages for rspace.online/{moduleId}
Instead of the generated landing page, rspace.online/rnotes now fetches
and serves the real page from rnotes.online (with <base> tag for asset
resolution). 5-minute in-memory cache avoids repeated fetches. Falls
back to the generated landing page for modules without a standalone
domain or when the fetch fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:14:07 -08:00
Jeff Emmett 2cfe2c744d feat: app switcher links to landing pages, demo uses standalone rApp builds
App switcher on demo/bare domain now links to rspace.online/{moduleId}
landing pages instead of jumping straight to demo. "Try Demo" buttons
use standalone domain builds (rnotes.online, rvote.online, etc.) which
have better styling and more updated features. Falls back to
demo.rspace.online for modules without a standalone domain.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:09:10 -08:00
Jeff Emmett 7698e32774 feat: per-module landing pages on bare domain rspace.online/{moduleId}
Bare domain now serves a dedicated landing page for each rApp instead
of directly loading the demo. "Try Demo" links to demo.rspace.online
which loads the live app. Sub-paths still rewrite to demo for API compat.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:02:39 -08:00
Jeff Emmett 8b9ccff256 fix: use bare domain rspace.online/r* for rApp links instead of personal subdomain
App switcher fallback was "personal" causing all rApp links to resolve
to personal.rspace.online/r*. Changed to "demo" so links use the bare
domain which the server rewrites to demo mode. Updated landing page
CTAs and ecosystem links to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 22:19:51 -08:00
Jeff Emmett 74642a57ca brand: add (you)r* prefix to landing page title
Reinforces the r-suite "your tools" philosophy across all rApp landing pages.
Also normalizes title separators to em-dash (—) for consistency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 04:21:51 +00:00
Jeff Emmett 034e3b308a chore: update TASK-46 progress — postMessage bridge + module switcher
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:50:28 -08:00
Jeff Emmett c934ed3fd0 feat: folk-rapp postMessage bridge, module switcher, open-in-tab
Enhance the folk-rapp canvas shape with three improvements:

1. PostMessage bridge: parent sends context to iframe on load,
   listens for shape-updated events from CommunitySync. Green
   status dot indicates active connection.

2. Module switcher: header dropdown (⇄ button) lets users change
   which rApp is embedded without recreating the shape.

3. Open-in-tab: ↗ button navigates to the module page (adds a tab)
   instead of opening a new browser window.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:50:07 -08:00
Jeff Emmett 0a795006d3 feat: folk-rapp shape — embed live rApp modules on the canvas
POC for cross-app embedding (TASK-46). New folk-rapp shape type that
embeds any rApp module as a live iframe inside a canvas shape. Features:
- Module picker dropdown when no module selected
- Colored header with module badge/icon
- Open-in-tab action button
- Syncs moduleId + spaceSlug via Automerge CRDT
- Toolbar rApps section now creates folk-rapp (not generic folk-embed)
- Fixed stale "canvas" moduleId refs → "rspace" in canvas.html

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:45:22 -08:00
Jeff Emmett 69cb105758 chore: add backlog task TASK-HIGH.1 (bare-domain module routing)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:34:52 -08:00
Jeff Emmett 1bedc4e504 feat: bare-domain module routing — rspace.online/{moduleId} as default
App dropdown links now go to rspace.online/r* (bare domain) instead of
demo.rspace.online/r*. Only the "Try Demo" button links to the explicit
demo subdomain. Server internally rewrites bare-domain module paths to
/demo/{moduleId} while preserving the browser URL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:22:06 -08:00
Jeff Emmett 92bec8243d feat: demo space improvements — description + sorted listing
- Add description to demo space seed for context in the UI
- Sort spaces API: user's own spaces first, then demo, then alphabetical

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:15:35 -08:00
Jeff Emmett 03c843254b feat: add "Try Demo" button to all headers + revert landing page copy
- Add teal "Try Demo" button to rstack-header (right side, before identity)
- Button links to demo.rspace.online/{currentModule} for context-aware demo entry
- Hidden when already on the demo space (server-side conditional)
- Revert website/index.html to original copy, only updating CTA link + adding demo button
- Add demo button CSS to shell.css

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:10:04 -08:00
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 ae9bbebb4a chore: add backlog tasks for canvas tab bar and persistence features
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:51:59 -08:00
Jeff Emmett abca93757b chore: add backlog task TASK-63 (remove iframe shell)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:46:37 -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 fcf350d40a chore: add backlog tasks TASK-59 and TASK-60
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:45:04 -08:00
Jeff Emmett cc116e6be8 feat: canonical subdomain routing — {space}.rspace.online/{moduleId}
Consolidate URL routing so all rApps flow through
{space}.rspace.online/{moduleId} as the canonical URL pattern.

- Subdomain handler now routes all modules (not just canvas)
- Standalone domains (rvote.online etc) → 301 redirect to canonical
- Add shared/url-helpers.ts for subdomain-aware URL generation
- Update app-switcher, space-switcher, identity, tab-bar navigation
- Shell inline scripts use __rspaceNavUrl for all URL generation
- Path-based rspace.online/:space/:moduleId still works as fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:24:36 -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 e7ce57ce0b feat: auto-route users to personal/demo space + landing overlay
- Anon users visiting any rApp (standalone or unified) land on demo space
- Logged-in users auto-redirect to personal space (auto-provisioned)
- POST /api/spaces/auto-provision creates personal space on first visit
- Standalone domains support /<space> path prefix (rpubs.online/jeff)
- rspace.online/ redirects to /demo/canvas (app-first experience)
- Quarter-screen welcome overlay on demo space for first-time visitors
- Full landing page moved to /about
- Auth flow triggers auto-space-resolution on sign-in/register
- Demo space seeded with shapes for all 22 rApps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 15:47:47 -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 1ff0f69218 feat: wire up account settings endpoints (email, device, guardians)
Server (src/encryptid/server.ts):
- POST /api/account/email/start — send 6-digit verification code via SMTP
- POST /api/account/email/verify — verify code and set email on account
- POST /api/account/device/start — WebAuthn creation options for same-device
  passkey registration (authenticated, reuses existing userId)
- POST /api/account/device/complete — store additional credential under
  existing account

DB (src/encryptid/db.ts):
- Add 'device_registration' to StoredChallenge.type union
- Add 'email_verification' to StoredRecoveryToken.type union

Client (shared/components/rstack-identity.ts):
- Rewrite social recovery modal to use existing guardian API:
  GET /api/guardians, POST /api/guardians, DELETE /api/guardians/:id
- Loads existing guardians on open, adds/removes in real-time
- Shows guardian status (accepted/pending), invite emails sent on add
- Two name+email inputs (max 3 guardians, server-enforced)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 14:57:32 -08:00
Jeff Emmett cd33f7c050 feat: redesign identity modal and space switcher UX
- Auth modal: unified "Sign up / Sign in" landing with stacked passkey buttons,
  close X button, and "Powered by EncryptID" link to ridentity.online
- Logged-in dropdown: replace Profile/Recovery (auth.ridentity.online) with
  Add Email, Add Second Device, Add Social Recovery settings modals
- Add Email: two-step flow (enter email → verify code)
- Add Second Device: WebAuthn credential registration for backup access
- Add Social Recovery: trusted contacts with configurable threshold
- Space switcher: emoji visibility badges (🔓 green / 🔑 yellow / 🔒 red),
  remove slash prefix, match app-switcher button styling
- Add rdata.online to standalone domain list

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 14:50:35 -08:00
Jeff Emmett b872e8e053 feat: update rstack-app-switcher categories
- rTube → Creating, rSwag stays in Creating
- Rename Social & Media → Sharing, split rData → Observing
- Add tube to Creating in MODULE_CATEGORIES and badge comments

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 14:17:30 -08:00
Jeff Emmett 7e6d78f4cb refactor: reorganize app-switcher categories — Sharing, Observing, move rTube to Creating
Rename "Social & Media" to "Sharing", split out rData into new "Observing"
category, and move rTube from Social to Creating.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 13:30:44 -08:00
Jeff Emmett db78dbeeb9 feat: color-code space switcher by visibility and style as button
Space dropdown now shows visibility badges (PUBLIC/PRIVATE/PERMISSIONED)
with green/red/yellow color coding and left border accents. Trigger button
styled with background fill to match the rApps dropdown beside it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 13:27:26 -08:00
Jeff Emmett 54671b62c6 Redesign canvas toolbar with grouped dropdowns and collapse
28 flat tool buttons replaced with 6 category dropdowns (Create, Media,
Embed, AI, Travel, Decide) plus direct-access Connect/Memory/Zoom buttons.
Toolbar is now collapsible via a minimize toggle. Mobile responsive with
accordion-style groups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 13:07:24 -08:00
Jeff Emmett 22a461ed86 Standardize emojis across header, favicons, and ecosystem links
Canonical emoji set for consistency:
- 🕸️ rNetwork (was 🌐), ⚖️ rChoices (was 🔀), 📋 rWork (was 💼)
- 🔐 rIdentity (was 🔑), 📖 rPubs (was 📰), 💸 rFunds (was 💰)
- 💰 rWallet (was 💼 in footer), 📬 rInbox (was ✉️)
- 💭 rForum (was 💬, differentiates from rChats)
- 📢 rSocials (was 📱), 🔨 rAuctions (was 🏛️ in footer)
- 🎬 rTube (was 📹 in footer)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 12:57:14 -08:00
Jeff Emmett f82781e5d6 Update rNetwork emoji to 🕸️ in ecosystem links
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 12:50:50 -08:00
Jeff Emmett 3c9741a809 Replace 🌌 emoji favicon with [rS] logo on all pages
Use the actual favicon.png ([rS] brand mark) instead of the galaxy emoji
across index, create-space, and admin pages to match canvas.html.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 12:39:56 -08:00
Jeff Emmett 8e9fc97ec8 feat: change 2-finger gestures from zoom to pan on canvas
Two-finger touch and trackpad scroll now pan instead of zoom.
Zoom is still available via Ctrl+wheel or trackpad pinch (ctrlKey).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:52:15 -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 3b1bde7d02 Add internal provision endpoint for rSpace Registry
Auth-free POST /api/internal/provision creates community via Hono route,
triggers onSpaceCreate for all registered modules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:30:22 -08:00
Jeff Emmett e1b108a329 feat: standardize AppSwitcher and EcosystemFooter across all rApps
- Update AppSwitcher with all 26 r*Apps in 8 categories
- Add EcosystemFooter component with consistent ecosystem links
- Categories: Creating, Planning, Communicating, Deciding,
  Funding & Commerce, Social & Media, Work & Productivity,
  Identity & Infrastructure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:47:54 -08:00
Jeff Emmett 2f1b53cff0 refactor: migrate EncryptID URLs from encryptid.jeffemmett.com to auth.ridentity.online
Part of the ridentity.online branding migration. The EncryptID auth
server is now accessible at auth.ridentity.online (with the legacy
encryptid.jeffemmett.com kept as a backward-compatible alias).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:22:15 -08:00