A Hack'n'Roll 2021 Submission by Team Silverhand (@Q-gabe). ♫
Listening to the radio, checking the newspaper and online sources are the few avenues available for punters in Singapore to check the Singapore Pools lottery results every week. However, upon buying many tickets, it is often easy to miss a number or two in our haste. Even with proper concentration, the tedium of entering the numbers one-by-one can quickly get loh soh (Singlish slang for longwinded).
Using GCP-provided Optical Character Recognition models, "Huat Did I Win", a pun using "Huat" which in Hokkien means "prosper", provides gamblers and easy way to simply scan their physical tickets for a quick litmus test for a windfall!
Try it now at HuatDidI.Win!
(Positive example sourced from this Mothership article of this lucky person.)
In no way shape or form am I encouraging gambling even in legalized forms such as those avenues provided by Singapore pools by building and publicizing this application. This application is built mainly to solve a user experience problem that I encountered.
First, clone this repository, and run the Next.js development server:
git clone https://github.com/Q-gabe/huat-did-i-win.git
cd huat-did-i-win
npm install
# or
yarn
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
API routes can be accessed on endpoints served from pages/api
.
In order to access the GCP Vision API, follow the setup guide from GCP documentation. Ticket recognition will not work without a service account for the server.
The json credentials for a GCP service account must be provided in base64 and set as the environment variable GCP_CREDENTIALS
. You can manually do this by editing value of GCP_CREDENTIALS
in the next.config.js
file.
- Typescript, React, Bootstrap
- Next.js
- GCP Vision API
- Vercel
- Credits to my partner-in-crime Rachel for the incredible name of the web app.
- Special thanks to my family for trying their luck at the recent $8 million prize pot and painstakingly using the Singapore pools website to enter every freaking $1 ordinary Toto bet. It was so infuriating to use that this idea was spawned.