https://github.com/tinspham209/breadit
Fullstack Reddit Clone
https://github.com/tinspham209/breadit
editorjs mysql next-auth nextjs prisma react-hook-form react-query tailwindcss typescript
Last synced: 2 months ago
JSON representation
Fullstack Reddit Clone
- Host: GitHub
- URL: https://github.com/tinspham209/breadit
- Owner: tinspham209
- Created: 2023-06-16T06:52:51.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T08:25:09.000Z (over 2 years ago)
- Last Synced: 2025-01-18T05:44:04.680Z (over 1 year ago)
- Topics: editorjs, mysql, next-auth, nextjs, prisma, react-hook-form, react-query, tailwindcss, typescript
- Language: TypeScript
- Homepage: https://breadit-nine.vercel.app
- Size: 817 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BREADIT
Fullstack Reddit Clone
## Tech-stack
- NextJS 13
- TypeScript
- TailwindCSS, shadcn/ui
- Next-Auth
- Prisma
- Redis (Upstash)
- MySQL / PlanetScale
- React-Query
- React-Hook-Form
- EditorJS
- date-fns
- Vercel
## Setup
1. Connect to DB MySQL/PlanetScale
- Install `planetscale-cli`
- https://github.com/planetscale/cli#windows
- Create an account and & db in [planetscale](planetscale.com)
- Get Connection with Prisma type and update `DATABASE_URL` to `.env`
- Run these cmd
```
pscale auth login
yarn prisma generate
yarn prisma db push
```
2. Create Google ID & Google Client ID
- create new project in [Google Cloud](cloud.google.com)
- setup new credentials in OAuth2
- update `GOOGLE_CLIENT_ID` & `GOOGLE_CLIENT_SECRET` in `.env`
3. Create Upstash/redis ID
- create new project in [Upstash](upstash.com) with Redis database
- get 2 key in REST API (`UPSTASH_REDIS_REST_URL`, `UPSTASH_REDIS_REST_TOKEN`) of console.upstash.com
- update key in `.env`
```
REDIS_URL={UPSTASH_REDIS_REST_URL}
REDIS_SECRET={UPSTASH_REDIS_REST_TOKEN}
```
4. `NEXTAUTH_SECRET`
- access to https://generate-secret.vercel.app/32 to get the key
5. Install dependencies
```
yarn
```
6. Run project
```
yarn dev
```
# Preview
