How its-shinde4241/intelliroom works
Project Type & Purpose
• This is a full-stack, collaborative real-time code editor and execution platform (“IntelliRoom”).
• Frontend: React + TypeScript + Vite, hosting Monaco Editor, UI components, state stores, auth flows.
• Backend: Node.js + Express + TypeScript, serving REST API, WebSockets, auth verification, Prisma ORM to MySQL.
• External Services: Firebase Auth for user identity; Judge0 API for code compilation/execution.
File Structure Analysis
• Top-level “frontend” and “backend” directories signal clear separation of client and server.
• Frontend subfolders: components/, pages/, store (Zustand), lib (axios + firebase helpers), hooks.
• Backend subfolders: controller (route handlers), routes (Express routers), middleware (auth guard), db (Prisma + Firebase Admin), lib (constants + helpers), websocket support.
• Prisma schema under backend/prisma. Config files: tsconfig, nodemon.json, package.json.
Key README Insights
• Describes architecture: React UI ↔ Express API ↔ MySQL via Prisma; real-time via WebSocket; Firebase Auth; Judge0 for execution.
• Enumerates API endpoints (auth, rooms, files, projects).
• Lists environment variables and deployment steps.
• Emphasizes security and extensibility.
Main Components
a. Client (Browser)
• React App (Monaco Editor, UI, Zustand stores, React Router)
• HTTP (REST) for CRUD (auth, rooms, files, projects)
• WebSocket (real-time code sync, presence)
• Firebase JS SDK for sign-in flows
b. Web Server
• Express API (controllers, routes, middleware)
• Auth verification (Firebase Admin SDK)
• WebSocket server (via Express‐integrated ws library or socket.io‐style)
c. Database
• MySQL, accessed by Prisma Client
• Entities: User, Room, Project, File, Message
d. External Services
• Firebase Auth (OAuth + email/password)
• Judge0 API (code compilation/execution)
e. (Optional) Gemini AI integration via external generative‐language API
Relationships & Interactions
• Client → HTTP → Express REST endpoints
• Client → WebSocket → Real-time channels per room
• Express → Prisma → MySQL for persistent data
• Express → Firebase Admin → Verify ID tokens
• Express → Judge0 API → Execute code, return results
• Client ← HTTP/WebSocket (data + events)
Architectural Patterns & Principles
• Layered architecture: UI → Application/Service layer (controllers) → Data access layer (Prisma + Firebase Admin)
• Separation of concerns: REST for CRUD, WebSockets for real-time sync
• Stateless HTTP, stateful WebSocket channels
• Environment-driven configuration, secure credentials via env vars