[go: up one dir, main page]

Skip to content

peterjunpark/y

Repository files navigation

About

Y login page screenshot

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.

Built with

These are the main technologies used to build Y.

(back to top)

Installation

First, get the things you'll need:

Prerequisites

  • 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.

Getting started

Now, complete these steps:

  1. Clone the repo
    git clone https://github.com/peterjunpark/y.git
  2. Install dependencies via pnpm
    cd y
    pnpm i
  3. 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=...
    
  4. Migrate your Prisma schema to your db, then generate your Prisma Client.
    pnpm db:migrate
    pnpm generate
    
  5. Start the development server
    pnpm dev

The app should now be up and running at http://localhost:3000.

(back to top)

Screenshots

image

image

image

image

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

About

🐦 An X clone built on Next.js' App Router.

Resources

License

Stars

Watchers

Forks

Releases

No releases published