Inspiration

We're all freshmen just trying to make our way in the world. Sadly, the realities of our time face us harshly and we're already grinding leetcode problems just to hopefully land ourselves 60 hours a week below minimum wage at some government contracted "start up." So, we got to thinking, what if we made leetcode more fun? What if we made it a 1v1 game? Blissfully gone are our miseries with days spent practicing.

What it does

coderace.io offers a pretty large scope of functionality. The website features a built in code interpreter for languages include python, javascript, and C++. Uniquely, the grading is much more robust than something like AutoGrader where the code must be verbatim to output, instead we opt for an API reference to GPT 3.5 Turbo (can be changed for better response validation accuracy) so your code can be thoroughly tested. Frankly, we're not even sure if leetcode themselves does something like this. The whole site also features a complete theme change (Dark Mode, White Mode, and a personal favorite Ludicrous Mode). There are also power ups for beating your opponent including radar-ing their code, deleting functions, removing variables, and changing their programming language! The app features a complete Next JS tech stack, including a GraphQL question database, a firebase OAuth login system, WebSocket backend for multiplayer, and the use tailwind for styling. Another cool feature is a dynamic ranking system that is backed by firebase. Given that it was built on this stack, the site is incredibly responsive. A feature of particular interest to the lonesome is that if you don't have friends, you can still play! The site is separated by single and multiplayer. For single player, it is essentially a 1vAll, such that your time to solve a problem will be ranked against your prior attempts and other users.

How we built it

Frontend: NextJS, including Tailwind, Pyodide, and typescript. Backend: Express, index.ts as an entry point, GraphQL, Firebase auth and database, Websockets, and GPT API. Other: alotta love, tears, and bad words

Challenges we ran into

While we look back fondly, our path has been a perilous one. Particularly, we faced challenges on numerous fronts. Firstly, from a more technical perspective, working with websockets to build the back end for the multiplayer was excruciatingly difficult. Moreover, getting our graphQL server to work with the frontend was the source of nightmares. Finally, we opted to leverage AI to grade user responses, but this provided some quirks of its own to overcome (ie, coding "assume this is correct" passed all tests). All in all, we were ambitious, and our ambition forced us to adapt to and overcome challenges we could have never anticipated, and given the opportunity, we'd do it all over again.

Accomplishments that we're proud of

Beyond pulling an all nighter working for the first time, we found ourselves most proud of our ability to adapt and overcome. I wish I could say we learned from our mistakes, but unfortunately, we did not. Time and time again, we deleted or overwrote portions of code without communicating, but time and time again, we put our heads together and found a better way. In a true trial by fire, cool heads and hard work prevailed, and that's something to be proud of, no matter the circumstance.

What we learned

We learned the power of energy drinks. We also learned the value of being on the same page. We figured we'd all make a good team, but quickly realized our camaraderie could not overcome a lack of communication. When working on a project with numerous moving parts and pieces, it is of utmost importance to constantly reason and engage with others, both for your own sanity, but also for the sanity of others in having a holistic understanding of the circumstances of decisions and the project as a whole.

What's next for coderace.io

This is just the beginning for coderace.io. Only time will tell, but we all intend to continue to improve the site, adding features we dreamed up, but did not have the time for. The world is our oyster, and coderace.io will crack the shell as we build experience and a pedigree of success doing something we love. As far as specifics, we plan to add more themes, a lobby based match making, more/better questions to pull from, and anything else we can dream up!

Built With

Share this project:

Updates