How jaspreet210/pixelglobe works
Purpose and topology
This repository is a collaborative canvas application with a Vite/React client and a Node.js server. The client provides local, global, and private-room canvas modes; the server is the backend entry point for shared-session behavior.
Client bootstrap and application shell
The browser application starts at client/src/main.jsx, mounts the top-level UI in client/src/App.jsx, and applies global presentation from client/src/index.css and client/src/App.css. client/index.html is the Vite HTML host.
Canvas modes and navigation boundary
Canvas experiences are separated by page-level components:
• client/src/pages/Lobby.jsx is the likely session/mode selection surface.
• client/src/pages/LocalCanvas.jsx owns single-browser/local drawing behavior.
• client/src/pages/GlobalCanvas.jsx represents a shared global canvas.
• client/src/pages/PrivateRoom.jsx represents scoped or inviteable room sessions.
This page split is the main boundary between local state and networked/shared canvas contexts.
Shared drawing workspace
client/src/components/SharedCanvas.jsx is the central reusable canvas component, likely parameterized by the selected page or room context. It concentrates drawing/rendering and shared-canvas interaction semantics so local, global, and private modes can reuse the same workspace implementation.
Interaction and export stages
client/src/components/Toolbar.jsx provides drawing controls and tool selection adjacent to the canvas. client/src/components/ExportModal.jsx handles output/export interaction. These components form distinct control and output boundaries around SharedCanvas.jsx, rather than embedding those concerns in each canvas page.
Server and real-time boundary
server/index.js is the backend runtime entry point. It is the repository’s likely authority for connection/session coordination and propagation of canvas updates between clients. Browser code should treat this server as the boundary for global canvas and private-room synchronization; LocalCanvas.jsx can remain independent of that path.
Runtime and deployment
The client uses React and Vite, defined by client/package.json and client/vite.config.js. The backend runtime is Node.js, defined by server/package.json. Dockerfile provides the containerization boundary for deployment, likely packaging one or both runtimes into a deployable service.
Main entry points: SharedCanvas.jsx Shared canvas · Lobby.jsx Lobby · main.jsx Client bootstrap · App.jsx Application shell
Components 14
React/Vite client
- Vite HTML host
client/index.html - Client bootstrap
client/src/main.jsx - Application shell
client/src/App.jsx - Global styles
client/src/index.css - App styles
client/src/App.css - Shared canvas · Reusable drawing and canvas-interaction implementation.
client/src/components/SharedCanvas.jsx - Toolbar
client/src/components/Toolbar.jsx - Export modal
client/src/components/ExportModal.jsx
Canvas modes
Page-level boundary between local and shared contexts.
- Lobby
client/src/pages/Lobby.jsx - Local canvas · Single-browser drawing mode.
client/src/pages/LocalCanvas.jsx - Global canvas
client/src/pages/GlobalCanvas.jsx - Private room
client/src/pages/PrivateRoom.jsx
Server runtime
- Session sync server · Coordinates connections, sessions, and canvas update propagation.
server/index.js
Other components
- Container deployment
Dockerfile
Connections 16
- Vite HTML host → Client bootstrap: loads
- Client bootstrap → Application shell: mounts
- Client bootstrap → Global styles: applies
- Application shell → App styles: applies
- Application shell → Lobby: presents
- Lobby → Local canvas: selects local mode
- Lobby → Global canvas: selects global mode
- Lobby → Private room: selects room mode
- Local canvas → Shared canvas: uses
- Global canvas → Shared canvas: uses
- Private room → Shared canvas: uses
- Toolbar → Shared canvas: controls drawing
- Shared canvas → Export modal: exports output
- Global canvas → Session sync server: synchronizes updates
- Private room → Session sync server: synchronizes room updates
- Container deployment → Session sync server: packages runtime