Skip to content

NPMChat is an open source, real-time chat platform for developers and teams. Built with the MENN stack (MongoDB, Express, Next.js, Node.js), it features collaborative code editing, live interview mode, file sharing, code execution, and more—all in a beautiful, modern UI. Perfect for learning, collaboration, and building together.

License

Notifications You must be signed in to change notification settings

ThePlator/NPMChat

NPMChat

Real-Time Chat & Code Collaboration for Developers

CodeChat is an open-source platform that lets developers chat, share code, run snippets, and collaborate in real time — all in one place. Designed for coding interviews, pair programming, and learning together.

Project Overview

GitHub stars GitHub forks License ISC Tech Stack


⚡ Tech Stack

Core Framework & Backend

  • MongoDB – NoSQL database for storing chat data and user info
  • Express.js – Backend framework for API and server-side logic
  • Next.js – React framework for building the frontend with SSR & routing
  • Node.js – JavaScript runtime powering the backend

Authentication & User Management

  • Clerk (Optional) – Advanced authentication, user profiles, and management
  • JWT & bcryptjs – Secure token-based authentication and password hashing

Real-Time Communication

  • Socket.IO – WebSocket-based real-time messaging

Features

💬 Real-Time Chat
Instant messaging with live user presence indicators
🔐 Secure Authentication
Sign up, log in, and manage sessions with JWT or Clerk integration
🛡 Role-Based Access Control
Assign different roles and permissions for better management
💻 Collaborative Code Editor
Edit and share code in real-time with syntax highlighting
📂 Shared Scratchpads & Snippets
Save, organize, and share reusable code snippets
🎯 Live Interview Mode
Built-in timer, problem prompts, and private interviewer notes
📎 File Sharing & Code Preview
Upload files and preview supported code formats directly in chat
In-Chat Code Execution
Run and test code instantly using integrated APIs
👤 Profile Management
Customize avatar, bio, and personal information
🌍 Open Source
Free to use, improve, and contribute to the community

📸 Screenshots

Landing Page Sign-Up Chat Interface
🏠 Landing Page 📝 Sign-Up & Authentication 💬 Real-Time Chat Interface

⚙️ Setup Instructions (Run Locally)

Follow these steps to set up CodeChat on your local machine.


Step Action Command / Details
1 Install Prerequisites - Node.js v18+
- MongoDB (local or MongoDB Atlas)
- Cloudinary Account
- (Optional) Clerk account for authentication
2 Clone Repository bash<br>git clone https://github.com/ThePlator/NPMChat<br>cd NPMChat<br>
3 Setup Backend bash<br>cd backend<br>npm install<br>
Configure Environment Create .env file in backend/ with:
env<br>MONGODB_URI=your_mongodb_connection_string<br>JWT_SECRET=your_jwt_secret<br>CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name<br>CLOUDINARY_API_KEY=your_cloudinary_api_key<br>CLOUDINARY_API_SECRET=your_cloudinary_api_secret<br>
Run Backend bash<br>npm run dev<br>
Backend runs at http://localhost:8080
4 Setup Frontend bash<br>cd ../frontend<br>npm install<br>
Configure Environment Create .env.local in frontend/ with:
env<br>NEXT_PUBLIC_API_URL=http://localhost:8080<br>
Run Frontend bash<br>npm run dev<br>
Frontend runs at http://localhost:3000
5 Done! 🎉 You now have CodeChat running locally with both frontend & backend active.

Contributing

Contributions are welcome! Please open issues or pull requests for new features, bug fixes, or improvements.


License

ISC

About

NPMChat is an open source, real-time chat platform for developers and teams. Built with the MENN stack (MongoDB, Express, Next.js, Node.js), it features collaborative code editing, live interview mode, file sharing, code execution, and more—all in a beautiful, modern UI. Perfect for learning, collaboration, and building together.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 17