A simple twitter clone made with NextJS using Typescript, TRPC, and Tailwindcss.
View Demo
Table of Contents
This project has a working social-login authentication using next-auth. The database is mysql hosted on planetscale through prisma. It utilizes data fetching and mutation through react-query included in trpc.io
The project includes:
- public stream of tweets as well as only those you follow using react-query useInfiniteQuery
- Follow/Unfollow profiles
- Heart tweets
- Clear cache through revalidation of server side generated react components whenever a follow/unfollow event happens
To get a local copy up and running follow these simple example steps.
- Clone the repo
git clone https://github.com/mewben/twitter-clone-trpc.git
- Install packages
pnpm i
- Setup environment variables in .env file
cp .env.example .env
- Run locally and go to http://localhost:3000 in a browser
pnpm dev
Melvin - @melsoldia