Codergrounds is a real-time collaborative coding playground designed for peer programming, study groups, and competitive practice. It features a fully interactive code editor, live collaboration, chat, and a self-hosted code execution pipeline.
- Monorepo: pnpm workspaces
- Frontend: React, TypeScript, Vite, Monaco Editor, Redux Toolkit, React Query
- Backend: Express.js, TypeScript, Socket.io (WebSockets)
- Database: PostgreSQL (Data), Redis (Cache/PubSub/Queues)
- Execution: Self-hosted Judge0 instance
- Infrastructure: Docker, GitHub Actions, Nginx
This project follows a Feature-First architecture within a Monorepo structure:
codergrounds/
├── apps/
│ ├── backend/ # Express API & WebSocket Server
│ ├── frontend/ # React Client Application
│ └── worker/ # Job Queue Worker for Code Execution
├── packages/
│ └── shared/ # Shared Zod Schemas, Types, and Constants
├── pnpm-workspace.yaml
└── package.json
- Node.js (v18+)
- pnpm (v9+)
- Docker & Docker Compose (optional, for DB/Redis/Judge0)
# 1. Install dependencies (recursive)
pnpm install
# 2. Setup Environment Variables
# (Copy .env.example to .env in apps/backend and apps/frontend - coming soon)# Run all apps in development mode
pnpm dev
# Run specific workspace
pnpm --filter @codergrounds/backend dev
pnpm --filter @codergrounds/frontend dev# Run tests across all workspaces
pnpm test
# Run linting
pnpm lint
# Format code
pnpm exec prettier --write .- Ensure you follow the Feature-First folder structure.
- All shared types/schemas must reside in
packages/shared. - Run
pnpm testandpnpm lintbefore committing. - Commit messages should follow standard conventions.
MIT