Inspiration
Wheels of fortunate are relatively popular in many regions around the world.
What it does
It has single player and multiplay mode. Where single player you can use it to help you make decisions on what to eat and/or drink when it's hard to decide.
For multiplayer mode, you can use it play drinking or regular party games with your friends.
How we built it
We started our skeleton project by setting up our environment following Convex's template guideline here using Next.js: https://docs.convex.dev/quickstart/nextjs. From there we setup a Convex database to store anything we needed to store. We used Auth0 API to allow users to login. We then allowed users to do multiple player mode with Realtime database on Convex. We used an open source project called "spin-wheel" to empower our real time spinning game.
Challenges we ran into
We realized database did not have a date type for us to store dates. So we used number type to store our dates. This could be a problem when we want to do analytics in the future when pulling the data out from the database.
We found it inefficient to implement interceptor for every single one of our endpoints to determine whether or not people are logged in. Please refer to general nest.js interceptor implementation where it could be applied to all endpoints. (https://docs.nestjs.com/interceptors)
Convex lacked the documentation on how to implement other options of login implementations other than Auth0 and Clerk.
We found it difficulty to use "await ctx.db.query("tasks").collect(); " because it returned Any Type. With opinion, we believe it made more sense in Prisma, it should return the type from the database. At least the basic types such as number, string, date, etc.
useQuery(api.tasks.get) didn't return loading status. We believe it is extremely important to know the loading status when doing a query.
Accomplishments that we're proud of
We were able to complete the project using Convex with 1 week since start and the actual implementation.
What we learned
We learn Convex API and real time database in-depth.
What's next for Wheel of fortune
Wee see potentials of wheel of fortune in product check out (follow up reward choices), registration process (random bonus), and even in regular gaming and drinking sessions.
Built With
- convex
- next.js
- node.js
Log in or sign up for Devpost to join the conversation.