Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dev-siri/twitter-clone
Fully functional (made with mental health in mind) Twitter Clone built with Next.js, React, Drizzle ORM, Neon & Firebase Storage
https://github.com/dev-siri/twitter-clone
bun drizzle-kit drizzle-orm firebase-storage neondb nextjs nextjs-app-router react tailwindcss typescript
Last synced: about 22 hours ago
JSON representation
Fully functional (made with mental health in mind) Twitter Clone built with Next.js, React, Drizzle ORM, Neon & Firebase Storage
- Host: GitHub
- URL: https://github.com/dev-siri/twitter-clone
- Owner: Dev-Siri
- License: mit
- Created: 2023-10-22T12:02:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-19T15:30:23.000Z (about 1 year ago)
- Last Synced: 2023-11-19T16:33:49.343Z (about 1 year ago)
- Topics: bun, drizzle-kit, drizzle-orm, firebase-storage, neondb, nextjs, nextjs-app-router, react, tailwindcss, typescript
- Language: TypeScript
- Homepage:
- Size: 56.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twitter Clone
Yes. Yet another Twitter clone.
I tried to implement as many features as possible while trying to retaining my sanity. This is by far the biggest App Router app I've ever written in Next.js
## Getting Started
- Clone the repo
```sh
$ git clone https://github.com/Dev-Siri/Twitter-Clone.git
```- Install the dependencies
```sh
$ pnpm i# with buntime
$ bun i
```- Create a database on [Neon](https://neon.tech)
- Create a [Firebase](https://firebase.google.com) Project with the "Storage" service enabled
- Finally, the last secret you'll need is a `JWT_SECRET` key. To generate it, use `openssl`:```sh
$ openssl rand -base64 32
```- Then copy the all the creds into a `.env.local` file. Make sure you follow the format in the `.env.example` file
```sh
DATABASE_URL=""
JWT_SECRET=""
PGHOST=""
PGDATABASE=""
PGUSER=""
PGPASSWORD=""
ENDPOINT_ID=""
FIREBASE_API_KEY=""
FIREBASE_AUTH_DOMAIN=""
FIREBASE_PROJECT_ID=""
FIREBASE_STORAGE_BUCKET=""
FIREBASE_MESSAGING_SENDER_ID=""
FIREBASE_APP_ID=""
```> Note: you need to split your Database URL you get from Neon into individual parts so that drizzle can carry out migrations
>
> If the URL is `postgres://:@/?sslmode=require`
> Then split it into the individual parts as:
>
> ```sh
> DATABASE_URL="postgres://:@/?sslmode=require"
> PGHOST=""
> PGDATABASE=""
> PGUSER=""
> PGPASSWORD=""
> ENDPOINT_ID=""
> ```
>
> Additional note: Make sure you have `?sslmode=require` at the end of the url, it is required by Drizzle.- Then run the drizzle commands to gen and push to the db.
```sh
$ pnpm drizzle:generate && pnpm drizzle:push# with buntime
$ bun drizzle:generate && pnpm drizzle:push
```- Finally start the development server
```sh
$ pnpm dev# with buntime
$ bun dev
```Once again, you have achieved bird.
## License
This project is MIT Licensed, see [LICENSE](LICENSE)