Skip to content

shihabcodes/DevChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevChat — Real-Time Developer Chat Platform

Real-time chat built for developers. Share code, get AI explanations, collaborate faster.

🔥 View Live App | 📚 Read Deployment Guide

Next.js Express Socket.io MongoDB


Features

  • 💬 Real-time messaging via WebSocket (Socket.io)
  • 🖥️ Code snippets with Monaco Editor (VS Code engine), syntax highlighting, and line numbers
  • AI code explanation — click "Explain this" on any code block for an inline GPT-4o-powered explanation
  • 🏢 Workspaces & Channels — create teams, organize conversations by topic
  • 🟢 Presence indicators — see who's online in real-time
  • ⌨️ Typing indicators — "Shihab is typing..."
  • 🔗 Invite codes — share a code to invite teammates
  • 🌙 Dark-mode first — built for developers who live in the terminal

Tech Stack

Layer Technology
Frontend Next.js 15 + React 19
Styling Tailwind CSS 4
Code Editor Monaco Editor
Real-Time Socket.io
Backend Node.js + Express
Database MongoDB + Mongoose
Auth JWT (email/password)
AI OpenAI GPT-4o

Quick Start

Prerequisites

1. Clone & Install

# Install server dependencies
cd server && npm install

# Install client dependencies
cd ../client && npm install

2. Configure Environment

# Copy the example env file
cp server/.env.example server/.env

# Edit server/.env with your values:
# - MONGODB_URI (required)
# - JWT_SECRET (change for production)
# - OPENAI_API_KEY (optional, for AI explanations)

3. Run

# Terminal 1 — Start the backend
cd server && npm run dev

# Terminal 2 — Start the frontend
cd client && npm run dev

Open http://localhost:3000 → Register → Start chatting!

Project Structure

DevChat/
├── client/                  # Next.js frontend
│   └── src/
│       ├── app/             # Pages (App Router)
│       ├── components/      # UI components
│       └── lib/             # API client, Socket.io
├── server/                  # Express backend
│   └── src/
│       ├── models/          # Mongoose schemas
│       ├── routes/          # REST API
│       ├── socket/          # Real-time handlers
│       └── middleware/      # JWT auth
└── README.md

License

MIT

About

A developer-first real-time chat app with syntax-highlighted code sharing, one-click AI code explanations, and team workspaces. Built with Next.js, Socket.io, and OpenAI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors