A production-grade Real-Time Collaborative Notes and Drawing Application. Built with React, Node.js, Socket.io, MongoDB, and Groq (LLaMA 3.1).
- Real-Time Collaboration: Multiple users can edit notes simultaneously with live syncing via Socket.io.
- Infinite Canvas Vector Drawing: Draw, highlight, and collaborate visually in real-time.
- AI Workspace Assistant: An integrated group chat where mentioning
@aisummons a LLaMA 3.1 assistant (via Groq API) that answers questions based on the document's content and chat history. - Authentication: Secure JWT-based login/signup with bcrypt.
- Load-Tested Architecture: Configured with a
k6load testing suite capable of simulating concurrent virtual users broadcasting rapid vector drawing points.
- Frontend: React 19 (Vite), React Router v7, Socket.io Client, Lucide React, Axios
- Backend: Node.js, Express, Socket.io, Groq SDK
- Database: MongoDB (Mongoose)
- Node.js (v18+)
- MongoDB connection string.
- Groq API Key.
- Navigate to the server directory:
cd server - Install dependencies:
npm install
- Configure Environment Variables:
Create a
.envfile in theserverdirectory:PORT=5000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret GROQ_API_KEY=your_groq_api_key FRONTEND_URL=http://localhost:5173
- Start the server:
Server runs on http://localhost:5000
npm run dev
- Navigate to the client directory:
cd client - Install dependencies:
npm install
- Configure Environment Variables:
Create a
.envfile in theclientdirectory:VITE_BACKEND_URL=http://localhost:5000
- Start the client:
Client runs on http://localhost:5173
npm run dev
To benchmark the WebSocket server's performance:
- Ensure k6 is installed.
- Run the load test from the root directory:
k6 run load_test.js
- Open http://localhost:5173
- Sign up for a new account.
- Create a new note from the dashboard.
- Share the URL with other users for real-time collaborative editing and drawing.
- Open the chat panel and mention
@aito get contextual help from the LLaMA 3.1 assistant!