This is a learning project following a tutorial by CodeWithAntonio that aims to create a discord like web app built with Next.js, React.js, TailwindCSS.
It also uses Clerk for the authentication, Prisma for database Management, NeonDB for the database, LiveKit for audio and video streaming.
There might be some problems with the sockets on vercel however you can still see the frontend. In case I also deployed on render:
- User authentication with Clerk
- Chat messages with WebSockets
- File uploads with Uploadthing
- Video and audio calls with LiveKit
- Server and channel management
- Node.js
- npm or yarn
-
Clone the repository:
git clone https://github.com/phlearning/discord-clone.git cd discord-clone -
Install the dependencies:
npm install
-
Set up the environment variables:
Create a
.envfile in the root directory and add the following variables:NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key CLERK_SECRET_KEY=your_clerk_secret_key NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/ NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/ DATABASE_URL=your_database_url UPLOADTHING_TOKEN=your_uploadthing_token LIVEKIT_API_KEY=your_livekit_api_key LIVEKIT_API_SECRET=your_livekit_api_secret NEXT_PUBLIC_LIVEKIT_URL=your_livekit_url
-
Run the development server:
npm run dev
-
Open http://localhost:3000 with your browser to see the result.
This project has been made following the lessons here below: