How shadcn/ember-cloudflare works
Ember is a Cloudflare-hosted team chat application. People sign in or join a workspace, then use rooms, threads, direct messages, search, files, and optional bots, AI, huddles, and notifications. The browser presents the workspace and calls the Worker; the Worker owns workspace behavior and supporting services, with shared protocol and rich-text packages. The README documents the product capabilities; some subsystem links are documented there or implied by module responsibilities, since much of the implementation was not sampled.
Main entry points: workspace.ts Workspace service · App.tsx Web app · searches.ts Search API · index.ts Worker routes
Components 21
Web application
- Web app
apps/web/src/App.tsx - Workspace UI
apps/web/src/components/workspace/workspace.tsx
Worker runtime
- Worker routes
apps/worker/src/index.ts - Workspace service
apps/worker/src/workspace.ts
Conversation features
- Room runtime
apps/worker/src/chat-room.ts - Conversation state
apps/worker/src/workspace-store.ts - Search API
apps/worker/src/searches.ts - Search index
apps/worker/src/search-index.ts - File handling
apps/worker/src/files/uploads.ts
Workspace services
- Slack-compatible bots
apps/worker/src/bots/webhooks.ts - AI assistants
apps/worker/src/assistant/gateway.ts - Huddles
apps/worker/src/huddles/room.ts - Push delivery
apps/worker/src/push/delivery.ts - Membership and auth
apps/worker/src/auth.ts
Shared packages
- Wire protocol
packages/protocol/src/index.ts - Search contract
packages/protocol/src/search.ts - Rich text
packages/richtext/src/render.ts
Other components
- Team member
- Cloudflare platform
- Webhook senders
- AI providers
Connections 21
- Team member → Web app: uses
- Web app → Worker routes: fetches bootstrap
- Web app → Workspace UI: loads workspace
- Worker routes → Workspace service: dispatches requests
- Workspace service → Conversation state: stores workspace data
apps/worker/src/workspace.ts - Workspace service → AI assistants: delegates AI
apps/worker/src/workspace.ts - Workspace service → Huddles: delegates huddles
apps/worker/src/workspace.ts - Web app → Search API: searches messages
- Search API → Search index: queries index
apps/worker/src/searches.ts - Search API → Search contract: parses search
apps/worker/src/searches.ts - Room runtime → Conversation state: records messages
- Web app → File handling: uploads files
- Webhook senders → Slack-compatible bots: posts webhooks
- Workspace service → Slack-compatible bots: routes bot events
- Workspace service → Push delivery: sends notifications
- Workspace service → Membership and auth: checks access
apps/worker/src/workspace.ts - AI assistants → AI providers: requests model
- Web app → Wire protocol: uses API types
apps/web/src/App.tsx - Workspace service → Wire protocol: handles frames
apps/worker/src/workspace.ts - Workspace UI → Rich text: renders messages
- Cloudflare platform → Worker routes: runs on