A Twitter clone that supports text posts, comments, user profiles, follows, threads, bookmarks, and likes.
I built Y as an exercise to get comfortable using Next.js' new, hyped features at the time: the stable release of the App router with Server Actions.
These are the main technologies used to build Y.
First, get the things you'll need:
- Install Node.js
- Install pnpm
npm i -g pnpm
- Setup Neon.
If you're not using Neon Postgres, you'll need to redefine your Prisma schema in
y/prisma/schema.prisma
to support your database. - Obtain client IDs and secrets for Y's supported OAuth providers.
Now, complete these steps:
- Clone the repo
git clone https://github.com/peterjunpark/y.git
- Install dependencies via pnpm
cd y pnpm i
- Create a
.env
file in the root directory and add your database URLs and OAuth client ids and secrets. If you're not hosting on Vercel, you'll also need to add a NEXTAUTH_URL.# OAuth providers DISCORD_ID=... DISCORD_SECRET=... GITHUB_ID=... GITHUB_SECRET=... KAKAO_ID=... KAKAO_SECRET=... OSU_ID=... OSU_SECRET=... # NextAuth NEXTAUTH_SECRET=... # Database NEON_DATABASE_URL=... SHADOW_DATABASE_URL=...
- Migrate your Prisma schema to your db, then generate your Prisma Client.
pnpm db:migrate pnpm generate
- Start the development server
pnpm dev
The app should now be up and running at http://localhost:3000
.
Distributed under the MIT License. See LICENSE.txt
for more information.