Skip to content

pohang/baddybuddy

Repository files navigation

baddybuddy

App that helps manage badminton #s. It will:

  • Collect # information from players in your group.
  • Use OCR to parse a picture of the # screen to determine who is signed up for what court.
  • Shows you when it is your turn on the court.

Check it out at https://baddybuddy.vercel.app.

How it works

  • Google Vision AI API is used to get image annotations for the # picture.
  • With the assumption that the image contains repeating cells representing a court, we find the boundaries of each court by looking for the largest occurrences of the word Court.
  • For each court, we then sort the annotations within its bounds from top-to-bottom and then parse # information from that.
  • Each picture of the # screen is a snapshot of the # state, and we will advance time in the UI to project the current state.

If you upload a picture to https://baddybuddy.vercel.app, you can click on the Debug button at the bottom to see what text annotations it is considering.

Development

This app is built with T3 Stack, so the docs there are pretty helpful.

Set up an .env file locally following .env.example.

Run the app using

npm run dev

To make changes to the DB schema, update prisma/schema.prisma and then run

npx prisma db push

The UI components in src/components/ui are from shadcn.