Initial commit: CodeSync collaborative coding platform
Browse files1234567891011121314151617181920212223242526---tags:- ml-intern---# myagent10101/codesync-collaborative-platform<!-- ml-intern-provenance -->## Generated by ML InternThis 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.- Try ML Intern: https://smolagents-ml-intern.hf.space- Source code: https://github.com/huggingface/ml-intern## Usage```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizermodel_id = "myagent10101/codesync-collaborative-platform"tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForCausalLM.from_pretrained(model_id)```For non-causal architectures, replace `AutoModelForCausalLM` with the appropriate `AutoModel` class.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697# π CodeSync β Real-Time Collaborative Coding Platform<div align="center">**A production-grade multiplayer code editor with AI assistance, video collaboration, and sandboxed execution.**</div>---## β¨ 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```ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ 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) ββββββββββββββ βββββββββββββ βββββββββββββββββββ```## π οΈ Tech Stack| 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 |## π 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```## π Project Structure```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 |## π LicenseMIT
README.md+87-16