Skip to content

Latest commit

Β 

History

250 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LeetLab

A focused DSA revision platform that turns inconsistent interview preparation into structured, competitive practice.


The Problem

Students preparing for coding interviews often fall into a familiar trap: they keep solving new problems, but rarely revisit the ones they already solved. That makes learning feel like a checklist instead of a mastery process. As a result, problem-solving patterns fade, confidence drops, and interview preparation becomes unpredictable.

LeetLab solves the painful gap between learning and retention by making DSA revision intentional, repeatable, and social.


Why I Built This

In school, the most effective study routine was never just reading new material. It was weekly or bi-weekly revision tests that forced us to review old chapters, compare progress, and compete with friends. That structure kept momentum, reduced forgetfulness, and made learning much more engaging.

I wanted that same cadence for coding interview preparation. Instead of endless new questions, I needed a way to revisit solved problems, create revision contests, and keep the process social. That’s why I built LeetLab.


The Solution

LeetLab helps learners turn DSA revision into a structured workflow:

  1. Create a custom contest from previously solved problems or chosen topics.
  2. Run the contest in real-time for yourself or with friends.
  3. Track performance with leaderboards and contest analytics.
  4. Discuss problems in TalkTown through private and group chat.

This is not just another practice platform. It is a revision engine that aligns with the real behavior of interview prep: solve, revise, compete, discuss.


Who It's For

LeetLab is built for:

  • Students preparing for coding interviews
  • Competitive programmers who want structured revision
  • DSA learners who need repeatable practice
  • Study groups that want group contests and discussion
  • Friends practicing together with shared goals

Key Features

Custom Contest Creation

LeetLab lets users build contests from their own question set or selected topics. This solves the core pain point of unstructured revision by making practice intentional.

How it Works:

  • Create & Customize: The host sets the contest title, selects problem collections or specific topics, chooses visibility (Public or Private), and sets a custom duration.
image
  • Unique Entry Code: Upon launching, a unique Contest Code is generated for the lobby. The host can share this code with friends or study group members.

  • Join via Code: Participants simply enter the Contest Code in the Join a Contest arena to enter the pre-contest lobby.

image
  • Waiting Lobby & Live Start: Participants gather in the lobby to view contest rules, duration, and participant lists. Once everyone is ready, the host starts the contest, triggering a synchronized live coding session where users solve and submit problems in real-time.
image

Real-Time Contest Participation

Users can participate in contests live, which brings accountability and urgency to revision. This feature exists because practice is more effective when it feels like a real challenge, not a passive exercise.

Leaderboards

Leaderboards surface progress and promote healthy competition. They solve the problem of motivation loss by showing users where they stand and encouraging consistent effort.

TalkTown (Private and Group Chat)

TalkTown is the conversation layer for LeetLab. It solves the isolation of solo prep by giving users a place to discuss problems, compare strategies, and coordinate contests. image

Key Features & Functionality:

  • User Discovery & Search: Users can search for anyone on LeetLab, view peer profiles, and connect with other learners.
image
  • Direct Messaging (Private Chats): Enables one-on-one communication between peers to discuss specific coding problems, share strategies, or coordinate study sessions.
image
  • Group Chats Users can create group chats for study circles or contest teams. Group members can collaborate, discuss problem approaches, and share resources.
image
  • Group & Admin Controls: Group admins have full management control, including the ability to delete groups when needed, while participants can freely leave a group whenever they choose.
image

User Discovery / Search

A search feature helps users find peers with similar goals. This solves the problem of limited collaboration by making it easier to connect with other learners.

Authentication & Profiles

Secure onboarding, profile management, and role-based access ensure that users can safely manage contests, chat, and revision content.

Contest Analytics

Contest analytics turn practice into insight. Users get feedback on performance trends, not just raw problem counts.


Product Walkthrough

A typical user journey on LeetLab:

  1. A user signs up and completes their profile.
  2. They create a revision contest using selected problems and a time limit.
  3. They invite friends or join a private contest.
  4. They participate in the contest in real time.
  5. They view the leaderboard to compare results.
  6. They discuss approaches in TalkTown after the contest.
  7. They track progress over time and repeat the cycle.

Technology Stack

  • Frontend: React, Vite, Tailwind CSS, React Router, React Query
  • Backend: Node.js, Express, Socket.IO, JWT authentication
  • Database: MongoDB
  • Real-Time Layer: Socket.IO for live contest and chat updates
  • Deployment-ready: API-driven architecture with clear frontend/backend separation

My Role

I designed, built, and deployed LeetLab end to end:

  • Developed the frontend experience in React
  • Built the backend API with Node.js and Express
  • Designed database models and relationships in MongoDB
  • Implemented authentication, authorization, and session flows
  • Built real-time contest and chat systems with Socket.IO
  • Defined the product workflow and feature priorities
  • Maintained a user-first approach across every feature

Challenges Faced

  • Designing real-time contest workflows that stay consistent under live updates
  • Managing Socket.IO connections for contest state and chat delivery
  • Building a scalable contest model without making the system overly complex
  • Ensuring chat and contest data remained synchronized
  • Keeping feature design purposeful instead of adding functionality for its own sake

What I Learned

  • How a full-stack DSA product is architected end-to-end
  • Real-time application design for contest and chat experiences
  • Product-driven feature prioritization for learner retention
  • The importance of user workflows over feature count
  • How backend and frontend need to align on API contracts and state management

What I'd Do Differently

  • Move real-time contest coordination to a microservice pattern
  • Introduce Redis for caching and pub/sub support
  • Add event-driven contest analytics pipelines
  • Implement push notifications for contest invites and chat updates
  • Build stronger monitoring and observability around real-time state

Future Roadmap

Planned Improvement Why it matters
Persistent contest rooms Keep session state when users reconnect
Notifications Increase engagement and reactivation
Advanced analytics Turn contest history into smarter study plans
Mobile-friendly UI Increase accessibility for learners on the go
Peer review workflows Enable collaborative problem feedback

Screenshots

Screenshots are placeholders. Replace these with actual product visuals.

Contest creation placeholder TalkTown chat placeholder


Installation

git clone https://github.com/Uzmaa7/LeetLab.git
cd LeetLab

Backend

cd Backend
npm install
cp .env
npm run dev

Frontend

cd ../Frontend
npm install
npm run dev

Open the app in your browser at the frontend development URL.


Environment Variables

Create .env files with the following values.

Backend .env

PORT=5000
MONGODB_URI=mongodb://localhost:27017/leetlab
ACCESS_TOKEN_SECRET=your_access_secret
REFRESH_TOKEN_SECRET=your_refresh_secret
JWT_SECRET=your_jwt_secret
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_key
CLOUDINARY_API_SECRET=your_cloudinary_secret
JUDGE0_API_HOST=https://judge0-ce.p.rapidapi.com
JUDGE0_API_KEY=your_judge0_key
FRONTEND_URL=http://localhost:5173

Frontend .env

VITE_API_BASE_URL=http://localhost:5000/api/v1


πŸ“š Documentation


API Overview

The backend exposes the following core API groups:

Area Base Path Purpose
Authentication /api/v1/auth User signup, login, token refresh, avatar updates
Problems /api/v1/problems Problem creation, retrieval, and admin management
Execution /api/v1/execute-code Run code, judge test cases, track submissions
Submissions /api/v1/submission User submission history and counts
Lists /api/v1/list Problem playlists and custom learning lists
Contests /api/v1/contest Custom contests, contest lifecycle, analytics
Chat /api/v1/chat TalkTown private/group messaging
Friends /api/v1/friend Discover users, send and accept requests

Contributing

Contributions are welcome. Please follow these guidelines:

  1. Open an issue before building a major feature.
  2. Follow existing code style and API conventions.
  3. Keep features aligned with the problem of structured DSA revision.
  4. Submit pull requests with a clear summary and tests if applicable.

License

This project is licensed under the ISC License.


Repository Structure

LeetLab/
β”œβ”€β”€ Backend/      # Node.js / Express API, Socket.IO, MongoDB models
β”œβ”€β”€ Frontend/     # React application, Vite, Tailwind
β”œβ”€β”€ README.md     # Product-focused project README

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages