How I used Supabase to build a winning hackathon project
Hackathons don't offer much time to play around, tools like Supabase power databases with simple authentication and other useful features.
Last weekend I participated in MLH's Hackathon 'Hack For The Future' building out the online food diary of the future with blockchain rewards (GoodGrub) - an ambitious project for a hackathon one may think, considering the need for authentication support and all the other database connections to make everything work, but I managed it and even won a prize. It was all thanks to the power of Supabase.
So the project itself sounds simple enough - a food diary with a few additional futuristic features including using Hedera to integrate a blockchain-based incentive to use it regularly. But to have an online solution to something like this there are a few more complex things to solve, such as authentication to make sure users are only accessing their diary entries and storing their entries!
In the past introducing auth and databases to a product securely has been a difficult task that takes hours, if not days.
Using Supabase I was able to easily put together an authentication option using google OAuth to make the app easy for anyone with a google account to access. This integration took around 20 lines of code in total and had the app working dynamically within minutes; something extremely important in a hackathon to keep things moving quickly.
The issue is I didn't just need authentication, I needed to store additional data for each user as well to track their rewards through their Hedera account and their entries to their food diary - but that wasn't a problem!
Using Supabase allowed me to connect a second table to the auth users table without writing a single line of code. This meant I had the power to store additional data against each user, such as their Hedera Account ID and their entries to their food diary. Once stored together I would have everything I needed to get my web app running.
Connecting the database tables by storing the user's ID in both upon signup automated the experience all in the backend, all there was to do from there was generate the other data and place it into the database row already available.
Being able to use Supabase to power the backend of the web application meant that I was able to complete an ambitious project in under 36 hours and despite being hacky - it sure worked!
Not only did the project work, but it utilised Hedera to provide rewarding incentives so well that it won a prize for the 'Best Blockchain Project Using Hedera'.
The power of Supabase's docs, libraries and more is so strong allowing for complete web applications to be built within the space of 2 days instead of 2 months empowering devs to go from idea to product from morning to evening instead of January to December, changing the way we code for the better!
Here's a demo of how it works:
Looking to learn more about what the project was and how it works? Check it out on Devpost where you can find the complete explanation of the story of the project: