Shapify is a full-stack collaborative whiteboard where users can draw, edit, and delete shapes in real-time.
It’s built with Next.js, TypeScript, WebSockets, Prisma, and PostgreSQL, designed for scalability and real-time collaboration.
- 🎨 Collaborative Whiteboard – draw rectangles, circles, and lines in real-time.
- 🔄 WebSocket Sync – shapes update instantly across all connected users.
- 🧹 Eraser Tool – delete shapes directly from the canvas.
- 💬 Room-based Chats – users can join rooms and exchange messages tied to drawings.
- 🔒 JWT Authentication – secure access to rooms and persistent sessions.
- 🗄️ Persistent Storage – Prisma ORM with PostgreSQL for saving shapes and chat history.
- ⚡ Scalable Architecture – supports future features like infinite canvas, user cursors, and advanced tools.
- Frontend: Next.js 14, TypeScript, React, TailwindCSS
- Backend: Node.js, Express, WebSockets (
ws) - Database: PostgreSQL + Prisma ORM
- Auth: JWT-based authentication
- Deployment: Vercel (Frontend) + Vercel/Node backend
apps/
exceldraw-frontend → Next.js frontend (canvas UI, authentication)
http-backend → Express + WebSocket backend (chat + shape sync)
ws-backend → Experimental WebSocket services
packages/
backend-common → Shared backend config (JWT secret, utils)
db → Prisma ORM + database client
typescript-config → Shared TS config
common → Shared types & constants
ui → Shared UI components
git clone https://github.com/<your-username>/shapify.git
cd shapifyUsing pnpm (recommended):
pnpm installCreate .env files in both frontend and backend apps.
apps/http-backend/.env
DATABASE_URL="postgresql://user:password@localhost:5432/shapify"
JWT_SECRET="your-secret-key"
PORT=8080apps/exceldraw-frontend/.env
NEXT_PUBLIC_BACKEND_URL="http://localhost:8080"cd packages/db
pnpm prisma migrate dev# Run backend
cd apps/http-backend
pnpm dev
# Run frontend
cd apps/exceldraw-frontend
pnpm devFrontend runs on http://localhost:3000
Backend runs on http://localhost:8080
pnpm build- Frontend: Deploy
apps/exceldraw-frontendto Vercel. - Backend: Deploy
apps/http-backendto Vercel Functions or any Node hosting (Railway, Render, AWS).
@repo/backend-common and @repo/db before deploying, or import from dist/ instead of src/.
Shapify – Collaborative Real-Time Whiteboard
• Built a full-stack collaborative whiteboard application supporting real-time drawing, editing, and deletion with WebSocket-based synchronization.
• Developed backend WebSocket server with secure JWT authentication and Prisma ORM for persistent shape storage in PostgreSQL.
• Optimized frontend rendering by efficiently redrawing shapes on canvas using TypeScript, Next.js, and React hooks.
• Designed scalable architecture enabling future extensions like infinite canvas, user cursors, and advanced drawing tools.
• Tech Stack: Next.js, TypeScript, WebSockets, Prisma ORM, PostgreSQL.
- Adarsh Raghuwanshi