How grilled-swampert/slate-board works
Project type and purpose
• slateboard is a full-stack, real-time collaborative whiteboard application.
• The frontend is a React+TypeScript single-page app (Vite-powered).
• The backend is a Node.js/Express server using Socket.io for real-time messaging and an in-memory room manager for state.
File structure
• Top-level “frontend” and “backend” directories clearly separate concerns.
• Frontend:
• src/components – React UI pieces (Canvas, Toolbar, RoomHeader, etc.)
• src/config.tsx – runtime configuration (e.g., backend URL)
• assets/fonts, public – static assets
• Vite and TypeScript configs for build/dev
• Backend:
• server.js – Express+Socket.io initialization
• utils/roomManager.js – maintains room state and user lists in memory
Key insights from README
• Real-time drawing, cursor tracking, undo/redo, room-based sessions
• No external database—state is ephemeral and held in roomManager
• Frontend and backend communicate exclusively over WebSockets (Socket.io)