/discord-clone

Discord clone built with React.js, Next.js, Tailwind, Prisma, and MySQL

Primary LanguageTypeScript

Discord Clone

A fullstack Discord clone built with Next.js, React, Tailwind, Socket.IO, Prisma, and MySQL.

Screenshot

Features

  • ๐Ÿ” Authentication using Clerk
  • ๐Ÿ“Š MySQL database with PlanetScale and Prisma ORM
  • โœ‰๏ธ Real-time messaging using Socket.IO with polling as a fallback
  • ๐Ÿ”‰ Audio and video calls with LiveKit
  • ๐Ÿ”ƒ Infinite scroll for loading messages using @tanstack/react-query
  • ๐Ÿš€ Deployed using Railway
  • โš™๏ธ Create and customize servers and channels
  • ๐Ÿ“ Edit and delete messages
  • ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Invite and manage members
  • โœจ Responsive UI and light/dark mode built with Tailwind and shadcn/ui

Getting Started

Clone the repo

git clone https://github.com/sgbj/discord-clone.git

Install dependencies

npm install

Setup .env file

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
NEXT_PUBLIC_CLERK_SIGN_IN_URL=
NEXT_PUBLIC_CLERK_SIGN_UP_URL=
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=

DATABASE_URL=

UPLOADTHING_SECRET=
UPLOADTHING_APP_ID=

LIVEKIT_API_KEY=
LIVEKIT_API_SECRET=
NEXT_PUBLIC_LIVEKIT_URL=

Setup Prisma

npx prisma generate
npx prisma db push

Start the app

npm run dev

Credit

Created by following along with AntonioErdeljac/next13-discord-clone.