Live chat. Live code. Live AI.
MERN Stack ยท WebSockets ยท Gemini AI ยท RAG ยท JWT Auth ยท Redis
๐ Live Demo ย ยทย โ๏ธ API ย ยทย ๐ Source
Zenith Workspace is a real-time collaborative coding platform. Anyone can spin up a project room, invite teammates, and live-chat with every collaborator inside that room โ while an integrated AI Software Engineering Assistant, Zenith, sits right there in the conversation, ready to help whenever someone types @zenith.
Zenith isn't a bolt-on chatbot. It's context-aware: it reads your project's actual files, retrieves only the ones relevant to your question using vector embeddings + cosine similarity search (a lightweight RAG pipeline), and streams back code, fixes, or full file trees live into everyone's editor over WebSockets.
- Sign up / Log in โ secured with JWT (JSON Web Tokens) and bcrypt-hashed passwords.
- Create a Project Room โ this becomes your shared workspace with its own file tree and chat.
- Invite Collaborators โ add teammates by email. (Only registered users can be added โ a teammate must already have a Zenith account before they can be added as a collaborator.)
- Live Chat with Collaborators โ every message is broadcast in real time via Socket.IO, so all room members see the conversation as it happens.
- Code Together โ the built-in Monaco Editor (the same editor that powers VS Code) lets everyone create, edit, rename, and delete files/folders, synced live for the whole room.
- Bring in Zenith โ mention
@zenith <your request>in the chat. Behind the scenes:- Your prompt is converted into a vector embedding (
gemini-embedding-001). - It's compared against every project file's stored embedding using cosine similarity to pull in only the most relevant files as context (RAG in action).
- That context + your prompt goes to Gemini (
gemini-2.5-flash) with a custom system-instruction persona, so Zenith responds like a senior engineer, not a generic bot.
- Your prompt is converted into a vector embedding (
- Watch It Build โ Zenith's reply (explanation, fix, or a generated file tree) is parsed, merged into the live project, saved, and pushed to every collaborator's screen instantly.
- Iterate โ edit or regenerate any AI message, clear the chat, rename/delete the project โ all from the room itself.
- ๐ด Real-Time Multiplayer Rooms โ live chat + live file-tree sync across every collaborator, powered by Socket.IO.
- ๐ค In-Chat AI Pair Programmer โ
@zenithtriggers context-aware code generation and engineering guidance via Google Gemini. - ๐ง Retrieval-Augmented Generation (RAG) โ embeddings + cosine similarity ensure Zenith only sees relevant files, not a blind dump of the whole codebase.
- ๐ฅ๏ธ In-Browser Monaco Editor โ full VS-Code-grade editing experience, no local setup.
- ๐ Secure, Stateless Auth โ JWT + bcrypt, with HTTP-only cookies.
- ๐ซ Redis-Backed Token Blacklisting โ logout instantly invalidates a JWT via Redis, closing the replay-attack window.
- ๐ฌ Editable, Persistent Chat History โ edit/regenerate messages, clear chat โ backed by MongoDB.
- ๐จ Polished, Responsive UI โ React 19 + Tailwind CSS v4, resizable split panels, Markdown-rendered, syntax-highlighted AI responses.
- ๐ค Account Management โ dedicated profile page to view account info, securely change your password, and log out.
Frontend
Backend
Databases & Caching
AI / ML
Deployment
Core Concepts Applied: Retrieval-Augmented Generation (RAG) ยท Vector Embeddings & Cosine Similarity Search ยท WebSocket-Based Real-Time Sync ยท RESTful API Design ยท Stateless JWT Authentication ยท Token Blacklisting / Session Invalidation ยท MVC Architecture ยท Middleware-Based Auth Guards ยท Prompt Engineering ยท Recursive File-Tree Data Structures
โโโโโโโโโโโโโโโโโโโ WebSocket (Socket.IO) โโโโโโโโโโโโโโโโโโโโ
โ React Client โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบโ Node.js + Express โ
โ (Vite + Monaco) โ REST API (Axios/JWT) โ + Socket.IO Serverโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ
โ MongoDB โ โ Redis Cache โ โ Google Gemini โ
โ Users ยท Projects โ โ (JWT Blacklist) โ โ Chat + Embeddingsโ
โ Messages ยท Files โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ
โ + Vector Embeddingsโ
โโโโโโโโโโโโโโโโโโโ
RAG flow: prompt โ embed (gemini-embedding-001) โ cosine-similarity match against stored file embeddings โ top-K relevant files as context โ gemini-2.5-flash generates response (auto-falls back to gemini-3.5-flash on failure) โ file tree merged & broadcast live to the room.
Proprietary / All Rights Reserved
This repository is shared for portfolio purposes only.
Puja Kumari
- ๐ฆ X (Twitter): https://x.com/pujakumaricodes
- ๐ผ LinkedIn: https://www.linkedin.com/in/betterversionofpuja
- ๐ง Email: betterversionofpuja@gmail.com
If you found this project useful or interesting, consider giving it a โญ on GitHub.
It helps others discover the project and motivates me to continue building and improving it.
