Skip to content

Latest commit

ย 

History

38 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โšก Zenith Workspace

A Real-Time, AI-Powered Collaborative Cloud IDE

Live chat. Live code. Live AI.

MERN Stack ยท WebSockets ยท Gemini AI ยท RAG ยท JWT Auth ยท Redis

๐Ÿ”— Live Demo ย ยทย  โš™๏ธ API ย ยทย  ๐Ÿ“‚ Source


๐Ÿ“ธ Project Preview

Zenith Workspace Preview


๐Ÿ“– About

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.


๐Ÿงญ How It Works โ€” A First-Time Walkthrough

  1. Sign up / Log in โ€” secured with JWT (JSON Web Tokens) and bcrypt-hashed passwords.
  2. Create a Project Room โ€” this becomes your shared workspace with its own file tree and chat.
  3. 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.)
  4. Live Chat with Collaborators โ€” every message is broadcast in real time via Socket.IO, so all room members see the conversation as it happens.
  5. 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.
  6. 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.
  7. 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.
  8. Iterate โ€” edit or regenerate any AI message, clear the chat, rename/delete the project โ€” all from the room itself.

โœจ Feature Highlights

  • ๐Ÿ”ด Real-Time Multiplayer Rooms โ€” live chat + live file-tree sync across every collaborator, powered by Socket.IO.
  • ๐Ÿค– In-Chat AI Pair Programmer โ€” @zenith triggers 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.

๐Ÿ› ๏ธ Tech Stack

Frontend

React Vite Tailwind CSS React Router Socket.io Axios Monaco Editor Markdown

Backend

Node.js Express Socket.io JWT bcrypt

Databases & Caching

MongoDB Mongoose Redis

AI / ML

Google Gemini RAG Vector Embeddings

Deployment

Vercel Render

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


๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      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.


๐Ÿ“„ License

Proprietary / All Rights Reserved

This repository is shared for portfolio purposes only.


๐Ÿ‘ฉโ€๐Ÿ’ป About the Author

Puja Kumari


โญ Support the Project

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.

About

๐—ญ๐—ฒ๐—ป๐—ถ๐˜๐—ต ๐—ช๐—ผ๐—ฟ๐—ธ๐˜€๐—ฝ๐—ฎ๐—ฐ๐—ฒ, is a real-time collaborative coding workspace with an in-built AI SWE assistant "@Zenith", powered by the Google Gemini API and LLMs. - Built with MERN, Tailwind CSS, Socket.IO, AI Integration & RAG.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages