How vivekjadhav2001/dev-arena works
DevArena turns a developer’s GitHub and LeetCode activity into a deterministic identity, then lets them compete in authoritative live coding battles and carry results into XP, badges, rankings, profiles, and seasonal recaps. The frontend routes users through those experiences and calls typed API clients; the backend routes requests to feature controllers, persists product state, and uses Socket.IO for live presence and updates. The README documents several capabilities whose implementation was not sampled; those are represented at their documented subsystem level, with uncertain internal wiring omitted.
Main entry points: user.model.ts User records · arena.controller.ts Battle operations · auth.routes.ts OAuth routes · battle.model.ts Battle records
Components 27
Frontend experience
- App routes
frontend/src/app/routes.tsx - API clients
frontend/src/services
Identity and insights
- OAuth routes
backend/src/routes/auth.routes.ts - Session auth
backend/src/controllers/auth.controller.ts - GitHub import
backend/src/services/github.service.ts - LeetCode sync
backend/src/services/leetcode.service.ts - DNA endpoint
backend/src/controllers/dna.controller.ts - DNA scoring
backend/src/services/dna.service.ts - Dashboard data
backend/src/controllers/dashboard.controller.ts
Arena and battles
- Arena routes
backend/src/routes/arena.routes.ts - Battle operations
backend/src/controllers/arena.controller.ts - Question selection
backend/src/services/battle-questions.service.ts - Code grading
backend/src/services/code-execution.service.ts - Live events
backend/src/sockets/index.ts
Progress and sharing
- Battle rewards
backend/src/services/battle-stats.service.ts - Rankings
backend/src/controllers/leaderboard.controller.ts - Season recap
backend/src/controllers/wrapped.controller.ts - Share previews
backend/src/controllers/share.controller.ts - Profiles and settings
backend/src/controllers/user.controller.ts
Backend platform
- MongoDB
- HTTP server
backend/src/server.ts - User records
backend/src/models/user.model.ts - Battle records
backend/src/models/battle.model.ts
Other components
- Developer
- GitHub
- LeetCode
- Judge0
Connections 33
- Developer → App routes: uses
- App routes → API clients: requests data
- API clients → HTTP server: calls API
- HTTP server → OAuth routes: mounts routes
- HTTP server → Arena routes: mounts routes
- Developer → OAuth routes: starts OAuth
- OAuth routes → Session auth: handles session
- OAuth routes → GitHub import: starts background sync
- GitHub import → GitHub: imports activity
- GitHub import → User records: updates stats
- LeetCode sync → LeetCode: syncs username
- DNA endpoint → DNA scoring: calculates DNA
- DNA endpoint → User records: reads activity
- DNA scoring → User records: derives traits
- Dashboard data → User records: reads stats
- Arena routes → Battle operations: dispatches requests
- Battle operations → Question selection: selects questions
- Battle operations → Code grading: runs and grades code
- Code grading → Judge0: executes tests
- Battle operations → Battle records: reads and writes battles
- Battle operations → User records: reads players
- Battle operations → Battle rewards: completes battle
- Battle operations → Live events: emits updates
- Battle rewards → User records: awards XP
- Rankings → User records: ranks developers
- Season recap → Battle records: summarizes results
- Season recap → User records: reads profile stats
- Share previews → Season recap: builds recap
- Share previews → Battle records: reads finished battles
- Share previews → User records: reads public profile
- Profiles and settings → User records: updates settings
- User records → MongoDB: persists users
- Battle records → MongoDB: persists battles