Skip to content

godd9170/betpirate

Repository files navigation

Development

npm run dev

This starts your app in development mode, rebuilding assets on file changes.

Unit tests

Unit tests are written using jest. There are two types of unit tests "server" and "react". If it's a react test, ensure that the /** @jest-environment jsdom */ docblock is included at the top of the file so the jsdom is used.

npm test # one off
npm run test:watch # using watcher

Database

local

To apply changes to the schema locally for development

npx prisma db push

To create a migration

npx prisma migrate deploy

hosted

create db

fly postgres connect -a betpirate-db
CREATE DATABASE betpirate;

connect from local

fly proxy 5432 -a betpirate-db

then connect using sql client with username and pass from secret

Deployment

fly deploy

todo

tech debt

  • move "esbuild-register": "^3.4.2" back to dev deps when no longer seeding in prod.
  • in models, infer parameter types from prisma and ids accordingly

feature

  • collect username ✅

      • emoji (maybe image?)
  • ability to mark answers

    • super user ✅
    • special answer key sheet ✅
    • edit prop names/descriptions ✅
  • leaderboard (polling refresh?) ✅

  • prop images

  • mobile first

  • normalize phone numbers on input ✅

  • text results

  • prop short names ✅

  • prop answer short names ✅

  • ability to close sheet to new submissions ✅

  • ability to mark sheet with a winner

  • can auth from different device

  • sheet statuses ✅

  • aggregate correct answers in prisma method ✅

    • count submission proposition selections where proposition selection option's the answer ✅
  • tiebreaker score

  • Add payment explanation, payment before 6pm

  • countdown

  • tiebreaker

  • gatorade multi

  • load test

  • pod monday