Inspiration
Software engineers and students tend to often solve LeetCode problems to get better at their jobs, but what about the real-life aspect that involves them having to understand code written by others? And potentially having to document other people's code?
What it does
LeetWrite will choose questions from a question bank, and use generative AI to generate a clean/messy/unreadable program. The user will have to attempt to understand the provided code, and write a description of the code, and get judged. Therefore, this is like a "reverse leetcode", which trains the user's backward thinking process.
It includes a multiplayer experience, where multiple users can queue up in games, and obtain rankings by winning or losing games. The final score is determined by the LLM, through multiple criterias such as correctness, creativity, and clarity in their answers. An ELO ranking system is used to award players.
How we built it
I build it using Express and Socket.IO on the backend to handle real-time communication, and Next.JS on the frontend as a framework. I used OpenAI's API to make use of generative AI's to generate the sample code provided to users, and to do the judging. MongoDB was used as a storage for the user's ratings.
Challenges we ran into
I ran into lots of issues when designing real-time systems, as it requires more thinking to implement these systems. Especially, the "lobby" system for queuing games took the longest time.
Accomplishments that we're proud of
I'm proud of having successfully implemented the project within 24 hours, although I did not sleep.
What we learned
I learned a lot about implementing large language models into applications, as this is my first time working with OpenAI's API. Also, I learned that working on such a project alone is difficult, since it requires a lot energy and moral support from other peers.
What's next for LeetWrite
- A competitive mode, where each user is also ranked a league, instead of just a ranking as a number.
- Automatic queuing, so that players don't have to manually create lobbies
- Better UI/UX
Built With
- express.js
- mongodb
- next.js
- openai
- socket.io




Log in or sign up for Devpost to join the conversation.