/** * Design module — collaborative design workspace via Affine. * * Wraps the Affine instance as an external app embedded in the rSpace shell. */ import { Hono } from "hono"; import { renderShell, renderExternalAppShell } from "../../server/shell"; import { getModuleInfoList } from "../../shared/module"; import type { RSpaceModule } from "../../shared/module"; const routes = new Hono(); const AFFINE_URL = "https://affine.cosmolocal.world"; routes.get("/api/health", (c) => { return c.json({ ok: true, module: "rdesign" }); }); routes.get("/", (c) => { const space = c.req.param("space") || "demo"; const view = c.req.query("view"); if (view === "demo") { return c.html(renderShell({ title: `${space} — Design | rSpace`, moduleId: "rdesign", spaceSlug: space, modules: getModuleInfoList(), theme: "dark", body: `
Collaborative design workspace powered by Affine. Whiteboard, docs, and kanban — all in one tool for your community.
Open Affine