myagent10101 commited on
Commit
56f95c7
Β·
verified Β·
1 Parent(s): 3024739

Initial commit: CodeSync collaborative coding platform

Browse files
Files changed (1) hide show
  1. README.md +87 -16
README.md CHANGED
@@ -1,26 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
- tags:
3
- - ml-intern
4
- ---
5
 
6
- # myagent10101/codesync-collaborative-platform
 
 
 
 
 
 
 
 
 
 
 
7
 
8
- <!-- ml-intern-provenance -->
9
- ## Generated by ML Intern
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
- 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.
12
 
13
- - Try ML Intern: https://smolagents-ml-intern.hf.space
14
- - Source code: https://github.com/huggingface/ml-intern
 
 
 
 
 
 
 
 
 
 
 
15
 
16
- ## Usage
 
 
 
 
 
 
 
 
17
 
18
- ```python
19
- from transformers import AutoModelForCausalLM, AutoTokenizer
20
 
21
- model_id = "myagent10101/codesync-collaborative-platform"
22
- tokenizer = AutoTokenizer.from_pretrained(model_id)
23
- model = AutoModelForCausalLM.from_pretrained(model_id)
24
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- For non-causal architectures, replace `AutoModelForCausalLM` with the appropriate `AutoModel` class.
 
1
+ # πŸš€ CodeSync β€” Real-Time Collaborative Coding Platform
2
+
3
+ <div align="center">
4
+
5
+ ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
6
+ ![Next.js](https://img.shields.io/badge/Next.js-000000?style=for-the-badge&logo=next.js&logoColor=white)
7
+ ![Socket.io](https://img.shields.io/badge/Socket.io-010101?style=for-the-badge&logo=socket.io&logoColor=white)
8
+ ![Redis](https://img.shields.io/badge/Redis-DC382D?style=for-the-badge&logo=redis&logoColor=white)
9
+ ![Docker](https://img.shields.io/badge/Docker-2496ED?style=for-the-badge&logo=docker&logoColor=white)
10
+ ![WebRTC](https://img.shields.io/badge/WebRTC-333333?style=for-the-badge&logo=webrtc&logoColor=white)
11
+
12
+ **A production-grade multiplayer code editor with AI assistance, video collaboration, and sandboxed execution.**
13
+
14
+ </div>
15
+
16
  ---
 
 
 
17
 
18
+ ## ✨ Features
19
+
20
+ - πŸ”„ **Real-Time Collaboration** β€” CRDT-based sync (Yjs) with cursor presence
21
+ - πŸ“ **Monaco Editor** β€” VS Code-grade editing experience
22
+ - 🏠 **Rooms System** β€” Create/join rooms with role-based access control
23
+ - πŸ’¬ **Real-Time Chat** β€” Room messaging with typing indicators
24
+ - ⚑ **Code Execution** β€” Docker sandbox isolation (JS, Python, C++, Java)
25
+ - πŸ“Ή **Video/Audio Calls** β€” WebRTC peer-to-peer with screen sharing
26
+ - πŸ€– **AI Assistant** β€” OpenRouter-powered debugging and optimization
27
+ - πŸ” **JWT Authentication** β€” Secure auth with Google OAuth
28
+
29
+ ## πŸ—οΈ Architecture
30
 
31
+ ```
32
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
33
+ β”‚ Client (Next.js 14) β”‚
34
+ β”‚ Monaco Editor β”‚ Socket.io β”‚ WebRTC β”‚ Zustand β”‚ Tailwind β”‚
35
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
36
+ β”‚ WebSocket + REST
37
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
38
+ β”‚ Backend (Express + Socket.io) β”‚
39
+ β”‚ REST API β”‚ CRDT Engine β”‚ WebRTC Signaling β”‚ Execution Queue β”‚
40
+ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
41
+ β”‚ β”‚ β”‚
42
+ β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
43
+ β”‚ PostgreSQL β”‚ β”‚ Upstash β”‚ β”‚ Docker Sandboxes β”‚
44
+ β”‚ (Supabase) β”‚ β”‚ Redis β”‚ β”‚ (Isolated) β”‚
45
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
46
+ ```
47
 
48
+ ## πŸ› οΈ Tech Stack
49
 
50
+ | Layer | Technology |
51
+ |-------|-----------|
52
+ | Frontend | Next.js 14, TypeScript, Tailwind CSS, Monaco Editor |
53
+ | State | Zustand |
54
+ | Real-time | Socket.io, Yjs (CRDT) |
55
+ | Video | WebRTC |
56
+ | Backend | Node.js, Express |
57
+ | Database | PostgreSQL (Prisma ORM) |
58
+ | Cache | Upstash Redis |
59
+ | Execution | Docker containers |
60
+ | AI | OpenRouter (multi-model) |
61
+ | Auth | JWT + Google OAuth |
62
+ | Deploy | Vercel + Railway |
63
 
64
+ ## πŸš€ Quick Start
65
+
66
+ ```bash
67
+ pnpm install
68
+ cp apps/server/.env.example apps/server/.env
69
+ docker compose -f docker/docker-compose.yml up postgres redis -d
70
+ cd apps/server && npx prisma migrate dev
71
+ cd ../.. && pnpm dev
72
+ ```
73
 
74
+ ## πŸ“ Project Structure
 
75
 
 
 
 
76
  ```
77
+ codesync/
78
+ β”œβ”€β”€ apps/
79
+ β”‚ β”œβ”€β”€ web/ # Next.js 14 frontend
80
+ β”‚ └── server/ # Express + Socket.io backend
81
+ β”œβ”€β”€ packages/shared/ # Shared types & constants
82
+ β”œβ”€β”€ docker/ # Docker configs + sandboxes
83
+ └── docs/ # Architecture & deployment docs
84
+ ```
85
+
86
+ ## Key Design Decisions
87
+
88
+ | Decision | Rationale |
89
+ |----------|-----------|
90
+ | Yjs (CRDT) over OT | No central authority needed; guaranteed convergence |
91
+ | Redis Pub/Sub | Enables horizontal scaling without sticky sessions |
92
+ | Zustand over Redux | Less boilerplate, better TS support |
93
+ | Docker Isolation | Security-first execution with resource limits |
94
+
95
+ ## πŸ“„ License
96
 
97
+ MIT