https://github.com/ben-bromley/office-pong
Ping pong score tracking for cool offices like REVIEWS.io 😎
https://github.com/ben-bromley/office-pong
nextjs ping-pong postgresql prisma sqlite t3-stack trpc typescript typescript-react
Last synced: 2 months ago
JSON representation
Ping pong score tracking for cool offices like REVIEWS.io 😎
- Host: GitHub
- URL: https://github.com/ben-bromley/office-pong
- Owner: Ben-Bromley
- Created: 2022-08-24T18:10:13.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-16T15:02:42.000Z (over 3 years ago)
- Last Synced: 2025-01-23T17:56:55.720Z (over 1 year ago)
- Topics: nextjs, ping-pong, postgresql, prisma, sqlite, t3-stack, trpc, typescript, typescript-react
- Language: TypeScript
- Homepage:
- Size: 2.41 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Office Pong
[](https://github.com/Ben-Bromley/office-pong)
Hey! Welcome to the Office Pong repo. I was challenged to build this by my fellow developers at [REVIEWS.io](https://reviews.io) so that we could all track our scores when we play ping pong at lunch.
I worked on this for months building a custom API to integrate with firebase, but then one of the developers had mentioned something called "the t3 stack"
I had no clue what that was, but I looked into the repository: [t3-oss/create-t3-app](https://github.com/t3-oss/create-t3-app)
There was once a long explanation of how much better T3 is than NEXT.js and Firebase, but the TL;DR is that the tools included in the T3 template made it exponentially easier to build this.
## Development Instructions
These instructions a wip, so let me know if you encounter any issues.
### Database Set-up
in primsa/schema.prisma
- set `provider = sqlite`
- comment out `db.text()` annotations
in .env
- Database URL should be `file:./dev.db`
Run the below to create the database, and fill in sample data
```bash
$ npx prisma db push
$ npx prisma db seed
```
### Auth Setup
Set up both the google auth and next auth stuff.
#### Google Auth ([Documentation](https://next-auth.js.org/providers/google))
- Set up a [new google cloud project](https://console.cloud.google.com/projectcreate)
- generate a new oauth client
- add the keys from the new oauth into .env
#### Next Auth
- the next auth secret can be any random string
- the next auth url should be http://localhost:3000