How rxodhks/live_template works
Madang is a template workspace for design, coding, and documents, with personal and invite-enabled collaborative spaces. The user journey runs from sign-in and account setup to a dashboard or template workspace, where edits are saved locally and backed up or synchronized; inviting members enables live collaboration. The README also documents timelines, encrypted secret notes, version history, presence, chat, and access controls. The graph combines documented capabilities with shown routing and module references; unsampled feature internals are represented at their existing paths, without asserting unverified call sequences.
Main entry points: index.ts HTTP and WebSocket routes · Workspace.tsx Workspace shell · App.tsx App routing · auth.ts Auth client
Components 26
Client experience
- App routing
client/src/App.tsx - Template dashboard
client/src/pages/Dashboard.tsx - Invite entry
client/src/pages/JoinPage.tsx - Template state
client/src/store/templates.ts - HTTP API client
client/src/lib/api.ts
Workspace editing
- Workspace shell
client/src/workspace/Workspace.tsx - Design editor
client/src/modules/design/DesignModule.tsx - Code editor
client/src/modules/code/CodeModule.tsx - Secret notes
client/src/modules/notes/NotesModule.tsx - Local persistence
client/src/lib/local.ts
Collaboration
- Activity timelines
client/src/lib/timeline.ts - Realtime provider
client/src/lib/yprovider.ts - Realtime protocol
shared/protocol.ts - Shared data schema
shared/schema.ts
Identity and access
- Sign-in screens
client/src/pages/Auth.tsx - Session state
client/src/store/session.ts - Auth client
client/src/lib/auth.ts
Worker services
- HTTP and WebSocket routes
worker/src/index.ts - Accounts and invites
worker/src/directory.ts - Collaboration room
worker/src/room.ts - Authentication email
worker/src/mail.ts - Passkey verification
worker/src/passkey.ts - Version history
worker/src/versions.ts
Other components
- Workspace user
- OAuth providers
- Email delivery
Connections 29
- Workspace user → Sign-in screens: signs in
- Workspace user → Template dashboard: opens workspace
- Workspace user → Invite entry: opens invite
- App routing → Sign-in screens: routes to
client/src/App.tsx - App routing → Template dashboard: routes to
client/src/App.tsx - App routing → Workspace shell: routes to
client/src/App.tsx - Sign-in screens → Auth client: authenticates with
client/src/pages/Auth.tsx - Auth client → HTTP API client: requests via
client/src/lib/auth.ts - Auth client → Session state: updates
client/src/lib/auth.ts - HTTP API client → HTTP and WebSocket routes: sends requests
client/src/lib/api.ts - OAuth providers → HTTP and WebSocket routes: authorizes
- HTTP and WebSocket routes → Accounts and invites: dispatches account work
worker/src/index.ts - HTTP and WebSocket routes → Collaboration room: dispatches room work
worker/src/index.ts - HTTP and WebSocket routes → Authentication email: sends login code
worker/src/index.ts - Accounts and invites → Passkey verification: verifies credentials
worker/src/directory.ts - Authentication email → Email delivery: delivers email
- Template dashboard → Template state: reads templates
- Workspace shell → Design editor: renders editor
- Workspace shell → Code editor: renders editor
- Workspace shell → Secret notes: renders editor
- Workspace shell → Realtime provider: provides collaboration
- Design editor → Local persistence: saves edits
- Code editor → Local persistence: saves edits
- Secret notes → Local persistence: stores encrypted notes
- Realtime provider → Realtime protocol: exchanges messages
- Realtime protocol → Collaboration room: defines room messages
shared/protocol.ts - Collaboration room → Version history: manages retention
worker/src/room.ts - Activity timelines → HTTP and WebSocket routes: loads activity
- Shared data schema → Accounts and invites: defines shared data