How ankushkumar2/mergespace works
MergeSpace is a browser-based collaborative coding workspace. Users sign in, create or join workspaces, manage members and files, edit code together, and run a live preview. The React app uses InsForge for authentication and workspace data, and Socket.IO/Yjs for collaboration; the server keeps session state for reconnection. The excerpts show frontend call ownership and chat wiring; server internals and several editor features are documented in the README but not sampled, so those relationships are cited to the README.
Main entry points: App.jsx Account and workspace app · Root.jsx Routing and site shell · AnimatedLanding.jsx Landing experience · useWorkspaceChat.js Workspace chat state
Components 23
Web experience
- React application
Frontend/vite-project/src/main.jsx - Routing and site shell
Frontend/vite-project/src/site/Root.jsx - Landing experience
Frontend/vite-project/src/landing/AnimatedLanding.jsx - Landing motion
Frontend/vite-project/src/landing/useLandingMotion.js - Legal and support
Frontend/vite-project/src/site/LegalPages.jsx - Support form
Frontend/vite-project/src/site/SupportPage.jsx - Consent settings
Frontend/vite-project/src/site/consent.js - Page metadata
Frontend/vite-project/src/site/usePageMeta.js - Form spam guard
Frontend/vite-project/src/site/useSpamGuard.js - Toast context
Frontend/vite-project/src/site/toastContext.js
Workspace editing
- Account and workspace app
Frontend/vite-project/src/app/App.jsx - Code editor and preview
Frontend/vite-project/src/app/App.jsx
Live collaboration
- Workspace chat UI
Frontend/vite-project/src/components/ChatPanel.jsx - Workspace chat state
Frontend/vite-project/src/hooks/useWorkspaceChat.js - Chat data API
Frontend/vite-project/src/lib/chatApi.js - Remote cursor styles
Frontend/vite-project/src/hooks/useRemoteCursorStyles.js - Socket.IO and Yjs server
backend/server.js - Persistent session state
backend/server.js
Data platform
- InsForge client
Frontend/vite-project/src/lib/insforge.js - Workspace database and policies
migrations
Other components
- Browser user
- InsForge services
- Optional analytics
Connections 27
- Browser user → React application: opens
README.md - React application → Routing and site shell: renders
Frontend/vite-project/src/main.jsx - Routing and site shell → Account and workspace app: routes to
Frontend/vite-project/src/site/Root.jsx - Routing and site shell → Landing experience: routes to
Frontend/vite-project/src/site/Root.jsx - Landing experience → Landing motion: uses
Frontend/vite-project/src/landing/AnimatedLanding.jsx - Landing experience → Page metadata: sets metadata
Frontend/vite-project/src/landing/AnimatedLanding.jsx - Landing experience → Consent settings: opens settings
Frontend/vite-project/src/landing/AnimatedLanding.jsx - Routing and site shell → Legal and support: routes to
Frontend/vite-project/src/site/Root.jsx - Routing and site shell → Support form: routes to
Frontend/vite-project/src/site/Root.jsx - Legal and support → Consent settings: reads consent
Frontend/vite-project/src/site/LegalPages.jsx - Legal and support → Page metadata: sets metadata
Frontend/vite-project/src/site/LegalPages.jsx - Support form → Form spam guard: guards submissions
Frontend/vite-project/src/site/SupportPage.jsx - Support form → Toast context: reports status
Frontend/vite-project/src/site/SupportPage.jsx - Consent settings → Optional analytics: loads on consent
Frontend/vite-project/src/site/consent.js - Account and workspace app → InsForge client: calls
Frontend/vite-project/src/app/App.jsx - InsForge client → InsForge services: uses
Frontend/vite-project/src/lib/insforge.js - InsForge services → Workspace database and policies: reads and writes
README.md - Account and workspace app → Code editor and preview: runs preview
README.md - Account and workspace app → Workspace chat state: uses
Frontend/vite-project/src/app/App.jsx - Account and workspace app → Workspace chat UI: renders
Frontend/vite-project/src/app/App.jsx - Workspace chat UI → Workspace chat state: invokes actions
- Workspace chat state → Chat data API: calls
Frontend/vite-project/src/hooks/useWorkspaceChat.js - Workspace chat state → InsForge client: loads members
Frontend/vite-project/src/hooks/useWorkspaceChat.js - Chat data API → InsForge client: uses
Frontend/vite-project/src/lib/chatApi.js - Account and workspace app → Remote cursor styles: uses
Frontend/vite-project/src/app/App.jsx - React application → Socket.IO and Yjs server: connects by Socket.IO
README.md - Socket.IO and Yjs server → Persistent session state: persists room state
README.md