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
- 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.
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)
- Clone the repository:
git clone https://github.com/JaiSwarup/chat-app
cd chat-app- Install the dependencies:
npm install
# or
yarn install- 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"- Generate the Prisma client:
npx prisma generate- Run the Prisma migrations to set up the database schema:
npx prisma migrate dev- Start the development server:
npm run dev
# or
yarn devOpen http://localhost:3000 with your browser to see the result.
To learn more about the technologies used in this project, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Prisma Documentation - learn about Prisma ORM.
- Pusher Documentation - learn about Pusher for real-time communication.
- NextAuth.js Documentation - learn about authentication in Next.js.
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.