Skip to content

A full-stack, real-time chat application built with Next.js, Node.js, TypeScript, and Socket.IO. The project includes secure authentication, chat rooms, direct messaging, persistent chat history, and a "user is typing" indicator.

Notifications You must be signed in to change notification settings

Ghost-web-ops/real-time-chat-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Real-time Chat Application ๐Ÿš€

A full-stack, real-time chat application built with a modern technology stack. This project features user authentication, chat rooms, direct messaging, typing indicators, and a persistent message history.

Live Demo:

  • Frontend (Client): [Your Vercel App URL Here]
  • Backend API: [Your Render App URL Here]

โœจ Key Features

  • Secure User Authentication: Register and Login with JWT.
  • Password Recovery: "Forgot Password" flow with email verification. -- Chat Rooms: Users can create and join public chat rooms.
  • Direct Messaging: Users can have private one-on-one conversations.
  • Real-time Experience: Features like "online users list" and "typing indicators".
  • Persistent History: Messages are saved to a PostgreSQL database.
  • Professional Architecture: Built with a monorepo structure and a clean separation of concerns (Routes, Controllers, Services).

๐Ÿ› ๏ธ Tech Stack

  • Frontend: Next.js, React, TypeScript, Tailwind CSS, Socket.io-client, Axios
  • Backend: Node.js, Express.js, TypeScript, Socket.io
  • Database: PostgreSQL + Prisma (ORM)
  • Validation: Zod
  • Deployment: Vercel (Client), Render (Server & DB)

๐Ÿš€ Getting Started

To run this project locally, follow these steps:

  1. Clone the repository

    git clone [Your GitHub Repo URL]
    cd real-time-chat-app
  2. Install dependencies from the root

    npm install
  3. Set up environment variables

    • Create a .env file inside the server directory.
    • Add your DATABASE_URL, JWT_SECRET, and RESEND_API_KEY.
  4. Run database migrations and seed

    # Go to the server directory to run prisma commands
    cd server
    npx prisma migrate dev
    npx prisma db seed
    cd .. 
  5. Start the development servers

    npm run dev

    The client will be available at http://localhost:3000 and the server at http://localhost:4000.

About

A full-stack, real-time chat application built with Next.js, Node.js, TypeScript, and Socket.IO. The project includes secure authentication, chat rooms, direct messaging, persistent chat history, and a "user is typing" indicator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors