DEV Community

Amrit Raj
Amrit Raj

Posted on

StepWise DSA: Stop Copying Solutions. Start Solving.

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built StepWise DSA, an AI-powered Data Structures & Algorithms learning mentor.

I built it for a friend who was preparing for software engineering interviews and regularly practiced problems on platforms like LeetCode. The biggest issue was that whenever they got stuck and asked an AI for help, it would often provide the complete solution immediately.

That helps you finish the problem, but it doesn't necessarily help you learn how to solve the next one.

StepWise takes a different approach.

Instead of immediately giving the answer, it guides the learner through the problem using progressive hints.

It has two main modes:
Approach Mode — breaks a DSA problem into logical steps and helps the learner discover the algorithm themselves.
Code Hint Mode — analyzes the learner's own code and gives targeted hints about bugs, logic, complexity, or edge cases without rewriting the solution for them.

The goal is simple:
Don't give me the answer. Help me reach it.

Demo

Code

StepWise DSA

Tagline: "Learn the approach, not the answer."

StepWise DSA is an AI-powered DSA learning mentor. It helps students understand how to solve DSA problems without immediately giving them the final answer. The application has two core modes:

  1. Approach Mode: Guides the student's thinking stage-by-stage.
  2. Code Hint Mode: Analyzes student code to provide bug hints, complexity analysis, and edge cases.

Each learner registers an account and signs in. Every learning session, hint, submitted code revision, and conversation is saved to that authenticated account in MongoDB.

Tech Stack

  • Frontend: React + Vite
  • Backend: Node.js + Express
  • Database: MongoDB Atlas
  • AI: Gemma open-weight model (via local Ollama) or Google Gemini API.

Project Structure

  • /client - React frontend
  • /server - Express backend with AI service
  • /render.yaml - Render deployment configuration

Local Development Setup

1. MongoDB Setup

  • Create a MongoDB Atlas cluster.
  • Copy your connection string.
  • Set…

How I Built It

StepWise is a full-stack web application built with React, Vite, Node.js, Express, and MongoDB Atlas.

The frontend handles the learning experience, while the Express backend manages authentication, AI requests, conversation state, and hint progression.

MongoDB Atlas stores user accounts, learning sessions, submitted code, and hint history.

The core of the application is an open-weight Qwen model accessed through Groq.

I designed a custom AI mentoring system around a Socratic teaching approach. Instead of allowing the model to immediately generate a solution, the backend maintains a Hint Level from 1 to 5.

The AI starts with a conceptual hint and becomes progressively more specific only when the student asks for additional help.

For example:
Hint 1: Look at how many times your code searches through the array.

Then:
Hint 2: Can you avoid repeating that search?

And finally:
Hint 3: Think about a data structure that allows fast lookup.

The student still has to make the final connection and write the solution themselves.

The application also keeps track of the conversation context so the AI knows what hints have already been given and doesn't randomly jump straight to the answer.

Why Does Open Innovation Matter?

Open innovation matters because the goal of StepWise isn't simply to generate code — it's to control how AI teaches.

Most AI coding assistants are optimized to be helpful by solving a user's problem as quickly as possible. For learning DSA, that can be counterproductive.

Using an open-weight model gives me more control over the model's behavior and lets me design a different interaction:
AI as a mentor, not an answer generator.

The model can be adapted through system instructions, prompting strategies, and application-level logic to enforce progressive hints and protect the student's problem-solving process.

It also gives the project more flexibility to change models or potentially move inference to a local environment instead of being completely locked into one closed AI provider.

My Agent Session

I built StepWise using an iterative AI-assisted development workflow, using AI to help develop and test the mentor logic, API flow, and progressive hint system.

Prize Categories

Best Use of Render
StepWise is deployed on Render, hosting the full-stack application so that the project can be accessed and used through a public URL.

Best Use of MongoDB Atlas
MongoDB Atlas is the application's persistent data layer. It stores user accounts, DSA sessions, hint history, submitted code, and learning progress.

Top comments (0)