Skip to content

JaiSwarup/chat-app

Repository files navigation

Chat-App

This is a real-time messaging application built with Next.js, Prisma, and Pusher. It allows users to register, log in, and chat with each other in real-time.

Deployed using Vercel link

Technologies Used

  • Next.js: A React framework for server-side rendering and generating static websites.
  • React: A JavaScript library for building user interfaces.
  • Tailwind CSS: A utility-first CSS framework for rapid UI development.
  • Pusher: A service for adding real-time functionality to web and mobile apps.
  • MongoDB: A NoSQL database for storing application data.

Getting Started

Prerequisites

Make sure you have the following installed on your machine:

  • Node.js (v14 or later)
  • npm (v6 or later) or yarn (v1.22 or later)
  • MongoDB (for the database)

Installation

  1. Clone the repository:
git clone https://github.com/JaiSwarup/chat-app
cd chat-app
  1. Install the dependencies:
npm install
# or
yarn install
  1. Set up the environment variables:

Create a .env file in the root directory and add the following variables:

DATABASE_URL="your-mongodb-connection-string"
NEXTAUTH_SECRET="your-nextauth-secret"

GITHUB_ID="your-github-client-id"
GITHUB_SECRET="your-github-client-secret"
GOOGLE_ID="your-google-client-id"
GOOGLE_SECRET="your-google-client-secret"

NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="your-cloudinary-cloud-name"

NEXT_PUBLIC_PUSHER_APP_KEY="your-pusher-app-key"
PUSHER_APP_ID="your-pusher=app-id"
PUSHER_SECRET="your-pusher-secret"
PUSHER_CLUSER="your-pusher-cluster"
  1. Generate the Prisma client:
npx prisma generate
  1. Run the Prisma migrations to set up the database schema:
npx prisma migrate dev
  1. Start the development server:
npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

Learn More

To learn more about the technologies used in this project, take a look at the following resources:

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out the Next.js deployment documentation for more details.

About

Real Time Messaging app using Next.js and Pusher.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages