Skip to main content

Command Palette

Search for a command to run...

How I won supabase hackathon gold๐Ÿฅ‡ On my second ever React project.

Published
โ€ข2 min read
How I won supabase hackathon gold๐Ÿฅ‡ On my second ever React project.

I'm currently in the process of learning how to code. I`ve been working on my first react project for a while now, it's a Saas setup but the bottleneck is stripe and they have not approved my account. So after spending a while configuring my app to have stipe payments working, I need to refactor for a new payment system ๐Ÿ˜… I may go with Coinbase as it is a cyrpto related site and hopefully they will not block me.

Anyway

So while feeling sorry for myself I saw that supabase, the open-source firebase alternative, was running a Christmas hackathon to get their shiny new real-time subscription out there.

So I thought I would enter my first hackathon to lift my spirits.

THE GOAL: Was to create a holiday based project using the new real-time API features

I had limited time as it was the holiday season and I was working flat out in my normal job as a maintenance engineer. So, I got to work on my lunch breaks in my car and decided to make a full-on over the top, cringy-looking Christmas-themed joke wall, using the most Christmasy color pallet I could find.

Screenshot 2022-03-20 at 12.25.15.png

The real-time feature of my app is so that users can vote on jokes that have been posted. Also, the leaderboard and votes would update instantly as shown below.

Screenshot 2022-03-20 at 12.30.32.png

"Supabase provides a realtime engine on top of Postgres, so that you can listen to changes as they happen. Our realtime engine uses the built-in replication functionality of Postgres."

I found it really simple to get the realtime features working in my app.

Once I set up my supabase client, all I had to add to my code was these two functions and add the onClick to the icons to decrement or increment.

const incrementCount = async (row_id) => {
    const { data, error } = await supabase.rpc("increment", { row_id: row_id });
    setFavTouched(!favTouched);
  };

  const decrementCount = async (row_id) => {
    const { data, error } = await supabase.rpc("decrement", { row_id: row_id });
    setFavTouched(!favTouched);
  };

Once this app was built almost all of it was from my car ๐Ÿš— I submitted the site and waited....

A few weeks later I get a tweet I WON GOLD ๐Ÿฅ‡ for the best Christmas themed which is not bad considering it was built in my car and Is my second react project ever!!

Screenshot 2022-03-20 at 12.39.44.png

Check out the site here: %[https://santa-banter.vercel.app/]

github: %[https://github.com/Keoooo/santa-banter]

supabase winners: %[https://supabase.com/blog/2021/12/17/holiday-hackdays-winners-2021]

M

Awesome beginner-friendly project! Even though it was your second react project, it seems pretty professionally designed (aside from some possible contrast optimizations).

Most projects in such hackathons are an overkill, but this one was pretty balanced. Nice job overall! ๐Ÿ˜ƒ

K
KeoooDev4y ago

Thanks Mohit

Yeah it was just a fun little project away from my main one! will take the advice on board thanks!