Initial commit: CodeSync collaborative coding platform
Browse files1234567891011121314151623417618192021222324252627282930893132333435363738394041424344454647114849131450515253545556575859606162631664656667686970717273181974752122237677787980818283848586878889909192939495962697# π CodeSync β Real-Time Collaborative Coding Platform
<div align="center">

**A production-grade multiplayer code editor with AI assistance, video collaboration, and sandboxed execution.**
</div>
---tags:- ml-intern---
# myagent10101/codesync-collaborative-platform## β¨ Features
- π **Real-Time Collaboration** β CRDT-based sync (Yjs) with cursor presence- π **Monaco Editor** β VS Code-grade editing experience- π **Rooms System** β Create/join rooms with role-based access control- π¬ **Real-Time Chat** β Room messaging with typing indicators- β‘ **Code Execution** β Docker sandbox isolation (JS, Python, C++, Java)- πΉ **Video/Audio Calls** β WebRTC peer-to-peer with screen sharing- π€ **AI Assistant** β OpenRouter-powered debugging and optimization- π **JWT Authentication** β Secure auth with Google OAuth
## ποΈ Architecture
<!-- ml-intern-provenance -->## Generated by ML Intern```ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Client (Next.js 14) ββ Monaco Editor β Socket.io β WebRTC β Zustand β Tailwind ββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ β WebSocket + RESTβββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ Backend (Express + Socket.io) ββ REST API β CRDT Engine β WebRTC Signaling β Execution Queue ββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββββββ¬ββββββββββββ β β ββββββββ΄ββββββ βββββββ΄ββββββ ββββββββββ΄ββββββββββ PostgreSQL β β Upstash β β Docker Sandboxes ββ (Supabase) β β Redis β β (Isolated) ββββββββββββββ βββββββββββββ βββββββββββββββββββ```
This model repository was generated by [ML Intern](https://github.com/huggingface/ml-intern), an agent for machine learning research and development on the Hugging Face Hub.## π οΈ Tech Stack
- Try ML Intern: https://smolagents-ml-intern.hf.space- Source code: https://github.com/huggingface/ml-intern| Layer | Technology ||-------|-----------|| Frontend | Next.js 14, TypeScript, Tailwind CSS, Monaco Editor || State | Zustand || Real-time | Socket.io, Yjs (CRDT) || Video | WebRTC || Backend | Node.js, Express || Database | PostgreSQL (Prisma ORM) || Cache | Upstash Redis || Execution | Docker containers || AI | OpenRouter (multi-model) || Auth | JWT + Google OAuth || Deploy | Vercel + Railway |
## Usage## π Quick Start
```bashpnpm installcp apps/server/.env.example apps/server/.envdocker compose -f docker/docker-compose.yml up postgres redis -dcd apps/server && npx prisma migrate devcd ../.. && pnpm dev```
```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizer## π Project Structure
model_id = "myagent10101/codesync-collaborative-platform"tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForCausalLM.from_pretrained(model_id)```codesync/βββ apps/β βββ web/ # Next.js 14 frontendβ βββ server/ # Express + Socket.io backendβββ packages/shared/ # Shared types & constantsβββ docker/ # Docker configs + sandboxesβββ docs/ # Architecture & deployment docs```
## Key Design Decisions
| Decision | Rationale ||----------|-----------|| Yjs (CRDT) over OT | No central authority needed; guaranteed convergence || Redis Pub/Sub | Enables horizontal scaling without sticky sessions || Zustand over Redux | Less boilerplate, better TS support || Docker Isolation | Security-first execution with resource limits |
## π License
For non-causal architectures, replace `AutoModelForCausalLM` with the appropriate `AutoModel` class.MITREADME.md+87-16