A Twitter clone application built with Next.js, Tailwind CSS, Prisma, and MongoDB.
- Introduction
- Features
- Technologies Used
- Getting Started
- Authentication System
- Notification System
- Image Upload
- Prisma ORM with MongoDB
- Responsive Layout with Tailwind CSS
- 1 To Many Relations (User - Post)
- Many To Many Relations (Post - Comment)
- Following Functionality
- Comments / Replies
- Likes Functionality
- Deployment
This project is a Twitter clone application that is built with Next.js, Tailwind CSS, Prisma, and MongoDB. The purpose of this project is to learn various functionalities that are commonly used in web development.
The Twitter clone application comes with the following features:
- Authentication system with next auth
- Notification system
- Image Upload using Base64 strings
- Prisma ORM with MongoDB
- Responsive Layout with Tailwind css
- 1 To Many Relations (User - Post)
- Many To Many Relations (Post - Comment)
- Following functionality
- Comments / Replies
- Likes functionality
- Vercel Deployment
- Next.js
- Tailwind CSS
- Prisma
- MongoDB
To get started with this project, you need to:
- Clone this repository to your local machine
- Install dependencies by running
npm install
- Create a
.env.local
file and add the following environment variables:
MONGODB_URI= NEXTAUTH_URL=
- Start the development server by running
npm run dev
- Open your browser and go to
http://localhost:3000
The authentication system in this project is implemented with next auth. Next auth is a complete authentication solution for Next.js applications.
The notification system in this project is implemented with the help of toast notifications. When a user follows or likes a post, a toast notification will be displayed to the user.
The image upload functionality in this project is implemented using Base64 strings. Users can upload their profile picture and also add images to their posts.
This project uses Prisma ORM with MongoDB as the database. Prisma is a modern database toolkit that makes it easy to work with databases.
The layout of this project is implemented with Tailwind CSS. Tailwind CSS is a utility-first CSS framework that provides pre-defined CSS classes that can be used to create responsive and scalable layouts.
This project implements a 1 to many relation between the user and the post. A user can have multiple posts but a post can only belong to one user.
This project implements a many to many relation between the post and the comment. A post can have multiple comments and a comment can belong to multiple posts.
The following functionality in this project allows a user to follow another user. When a user
Users can reply to comments, creating a nested comment structure.
Users can like posts and comments.
The app is deployed to Vercel, making it easy to share with others.