Skip to content

Create chat rooms instantly and invite friends with a passcode to chat into a room.

Notifications You must be signed in to change notification settings

Pratik-050/Chat-Rooms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗨️ Chat-Rooms

A full-stack real-time chat application built with:

Features

  • User Authentication (JWT / OAuth)
  • Real-time 1:1 and group messaging
  • Message delivery acknowledgments
  • Redis pub/sub for event propagation
  • Persistent chat storage via PostgreSQL
  • Scalable and production-ready architecture

Tech Stack

Layer Tech Used
Frontend Next.js, Tailwind CSS, Socket.IO Client
Backend Next.js API Routes, Express (optional), Socket.IO Server
Database PostgreSQL + Prisma ORM
Caching Redis (for sessions, pub/sub)
Auth NextAuth.js and JWT
Dev Tools Docker, ESLint, Prettier

Setup Instructions

Manual Setup (Local Machine)

Prerequisites:
    Node.js 21+
    PostgreSQL
    Redis
    npm
    prisma CLI (globally or via npx)
  1. Clone the repo
git clone https://github.com/your-username/chat-rooms.git
cd chat-rooms
  1. Configure Environment

Create .env files in both frontend and server (use variable names from .env.example)

  1. Install dependencies
cd frontend
npm install

cd ../server
npm install
  1. Setup Database
cd server
npx prisma generate
npx prisma migrate dev --name init
  1. Setup Postgresql

Either use local setup or you can use a supabase or firebase instance.

  1. Setup Redis

Make sure docker is installed in your system. Pull redis-stack image from dockerhub

docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 -e redis/redis-stack:latest

Docker Setup

  1. Clone the repo
git clone https://github.com/your-username/chat-rooms.git
cd chat-rooms
  1. Setup .env files (same as manual setup)

  2. Start with Docker Compose

docker-compose up --build

About

Create chat rooms instantly and invite friends with a passcode to chat into a room.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published