A real-time collaborative platform for code editing and rich text collaboration with live session sharing.
π Live Demo:
- π Real-time Collaboration - WebSocket-based live synchronization
- π Dual Editor Interface - Monaco Editor + Lexical rich text editor
- π― Session Management - Unique URLs with automatic clipboard copy
- β‘ Performance Optimized - Throttled updates for smooth experience
- π Dark/Light Mode - Comfortable coding in any environment
- π Resizable Interface - Customizable split-pane layout
- π³ Docker Ready - One-command deployment
- π± Responsive Design - Works on all devices
ShareBoard features a clean, modern interface with:
- π Monaco Code Editor - Full-featured with syntax highlighting
- βοΈ Lexical Text Editor - Modern rich text editing
- ποΈ Language Selector - 50+ programming languages
- π Real-time Sync - Instant collaboration updates
- π Auto URL Copy - Easy session sharing
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β React Frontendβ β NestJS Backend β β PostgreSQL DB β
β β β β β β
β β’ Monaco Editor βββββΊβ β’ WebSocket API βββββΊβ β’ Session Data β
β β’ Lexical Editorβ β β’ TypeORM β β β’ Real-time β
β β’ Chakra UI β β β’ Throttling β β β’ Persistent β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- βοΈ React 18 with TypeScript
- π¨ Chakra UI - Modern component library
- π Monaco Editor - VS Code's editor engine
- βοΈ Lexical - Facebook's rich text editor
- π Redux Toolkit - State management
- π Socket.IO Client - Real-time communication
- πͺΊ NestJS - Progressive Node.js framework
- ποΈ TypeORM - Database ORM
- π Socket.IO - WebSocket server
- π PostgreSQL - Reliable database
- β‘ Lodash Throttle - Performance optimization
- Docker and Docker Compose
- Node.js 16+ (for development)
git clone https://github.com/yourusername/shareboard.git
cd shareboard
docker-compose up --build- π Frontend: http://localhost:4200
- βοΈ Backend: http://localhost:3000
- ποΈ Database: localhost:5432
- Visit http://localhost:4200
- A new session is created automatically
- URL is copied to your clipboard
- Share the link with collaborators
- Edit code and text in real-time! π
shareboard/
βββ π³ docker-compose.yml # Multi-container setup
βββ βοΈ services/ # NestJS backend
β βββ src/
β β βββ π app.gateway.ts # WebSocket handlers
β β βββ π§ app.service.ts # Business logic
β β βββ ποΈ entities/ # Database models
β β βββ π¦ dto/ # Data transfer objects
β βββ package.json
βββ π¨ webapp/ # React frontend
βββ src/
β βββ π§© components/ # React components
β βββ π redux/ # State management
β βββ π App.tsx # Main application
βββ package.json
cd webapp
npm install
npm run developcd services
npm install
npm run developsetData- Initialize session dataretriveData- Get existing session datacodeEditor/setValue- Update code contenttextEditor/setValue- Update text contentlanguage/setLanguage- Change programming language
@Entity()
export class Session {
@PrimaryColumn()
sessionId: string
@Column()
language: string;
@Column()
codeValue: string;
@Column()
textValue: string;
}version: "3.8"
services:
database:
image: postgres:13
environment:
POSTGRES_USER: shareboard
POSTGRES_PASSWORD: shareboard
POSTGRES_DB: shareboard
volumes:
- pgdata:/var/lib/postgresql/data
services:
build: ./services
environment:
DATABASE_URL: 'postgresql://shareboard:shareboard@database:5432/shareboard'
ports: - 3000:3000
webapp:
build: ./webapp
ports: - 4200:80
volumes:
pgdata:- WebSocket-based synchronization
- Throttled updates (10s DB, 1s frontend)
- Automatic session joining
- Monaco Editor: Professional code editing with syntax highlighting
- Lexical: Modern rich text editing with clean UI
- Split Pane: Resizable layout for optimal workflow
- Database write throttling prevents overload
- Frontend update throttling ensures smooth UX
- Efficient Redux state management
- Optimized WebSocket communication
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Monaco Editor - VS Code's editor engine
- Lexical - Facebook's modern text editor
- Chakra UI - Beautiful React components
- NestJS - Progressive Node.js framework
β Star this repository if you found it helpful!
Built with β€οΈ for the developer community
