DSA Quest is a multi-agent learning platform designed to transform how developers prepare for Data Structures & Algorithms. What began as a prototype โ a collaborative LLM-based reasoning workflow โ has evolved into a resilient, secure, test-driven system with a full user interface, authenticated user isolation, safety guardrails, multi-agent reasoning, gamified learning, and real-time AI evaluation.
At its core, the system blends gamification, LLM-powered storytelling, and structured problem-solving to increase retention, engagement, and conceptual understanding. The result is a polished agentic application engineered to be used by real learners, not just as a demonstration.


Mastering Data Structures and Algorithms (DSA) remains one of the most essential skills for software engineers, competitive programmers, and technical interview candidates. DSA determines how efficiently we solve problems, design systems, and think computationally โ yet traditional learning methods are often boring, theory-heavy, and difficult to stay consistent with.
It transforms the rigorous world of DSA into an engaging, gamified, AI-powered learning experience โ supported by a production-grade multi-agent system, real-time LLM reasoning, safe evaluation, and multi-user isolation using Supabase authentication.
It started with a simple question:
What if DSA could be learned the same way players progress through a game โ with stories, analogies, XP, levels, achievements, and instant feedback?
Instead of passive reading, learners experience:
This project demonstrates how agentic AI systems can move beyond prototypes into fully productionized systems โ with safety, testing, resilience, and real usability at their core.
Gamification is not decoration โ it is cognitive engineering.
Research consistently shows:
DSA Quest integrates these principles into a single learning environment.
Our motivations were:
The system is built on three cooperating layers:
The architecture of the DSA Quest application is designed to support scalable multi-user access, real-time interactivity, safe LLM-generated content, and an integrated learning experience that blends problem-solving, gamification, and AI-assisted guidance. Each layer of the system is built to operate independently while working cohesively to ensure reliability and production-grade performance.
At the foundation of the platform is a Streamlit-based user interface, which manages rendering, session separation, and real-time state updates. This UI layer interacts with a set of well-structured backend modules responsible for user authentication, progress tracking, problem browsing, AI-generated educational content, and interactive coding games.

The learning experience itself is driven by two key AI components. The first is a story and analogy generator, which uses Groq-powered Llama models via LangGraph. This module produces concept-focused, error-filtered explanations and learning narratives optimized for clarity. The second is the LLM-based code evaluator, a standalone evaluator that safely analyzes the logic of user-submitted solutions in any language without executing the code. It uses strictly defined prompts, guards, sanitization routines, and controlled sampling settings to ensure both safety and determinism.
Two AI Subsystems Inside :
Used in the Problem Browser:
โ Generates engaging stories
โ Generates analogies
โ Generates specific learning tips
โ Groq-powered Llama supports near-instant responses
โ Debug-traceable
โ Fallback templates ensure reliability

Used in the Practice Area:
โ Safe โ never runs user code
โ Works with Python, Java, C++ or pseudocode
โ Deep comments on logic, structure, clarity
โ Suggests fixes and improvement. Sandboxed prompts and deterministic temperature settings

A Supabase instance serves as the authentication and persistence backbone, ensuring that every user operates in an isolated environment where their data โ solved problems, XP history, game progress, and generated content โ remains strictly scoped to their account.

Each page of the app โ the Problem Browser, Coding Games suite, Profile dashboard, Achievements hub, and Practice Area โ is powered by clear, modular components to keep the system maintainable and testable. Every unit of logic is self-contained, enabling targeted testing and predictable behavior under failure. Together, these design principles allow DSA Quest to function as a cohesive, production-ready learning platform that remains extensible for future features.
The decision to build the system using Groq and LangGraph was guided by clear engineering requirements. Groq provides exceptionally low-latency inference with stable throughput under load, allowing the system to offer interactive AI features โ such as instant story generation and code evaluation โ without latency spikes. The deterministic performance profile reduces timeout complexity and strengthens the systemโs resilience strategy.
LangGraph was chosen because it allows structured multi-step reasoning in a controlled graph environment. Unlike one-off LLM calls, LangGraph enables composition of workflows where output quality can be validated at each node. This is essential for producing structured story/analogy output and ensuring that malformed AI responses are detected early. Its ability to define strict schemas, fallback nodes, and execution guards makes it ideal for production systems where reliability and predictability take priority.
Together, Groq and LangGraph form a stable and efficient AI pipeline that keeps the platform responsive, safe, and easy to maintain โ meeting the exact requirements of the production readiness.
The four integrated mini-games serve as short-form reinforcement tools that help users internalize concepts in a low-pressure environment. Each game targets a different cognitive dimension: speed recognition, conceptual pairing, memory retention, and logic sequencing. These games do not replace problem-solving but support it by strengthening the userโs familiarity with terminology, patterns, and common DSA structures. All gameplay events are locally contained and do not interfere with the core problem-solving workflow, but they contribute to XP to ensure motivational continuity across the application.




Beyond games, the platform extends gamification into the problem-solving workflow itself. Users accumulate XP as they progress through Striverโs A-Z curriculum, unlocking badges that reflect not just quantity but category-specific mastery. The streak system encourages consistent engagement while the Profile and Achievements pages provide clear visibility into long-term progression. Together, these elements convert the traditionally solitary experience of learning DSA into a structured, rewarding journey without compromising academic rigor.


To support deeper understanding, the platform integrates two distinct AI systems, each responsible for a different pedagogical objective. The first, responsible for generating stories, analogies, and learning tips, operates through a LangGraph-managed workflow executed on Groqโs ultra-low-latency inference models. This setup allows every generated explanation to pass through a structured chain that extracts concepts, creates narrative framing, simplifies technical ideas, and validates factual correctness before returning the final output to the user. This multi-step design ensures the generated content is not only engaging but also technically accurate.
These generate content in 3 popular programming languages : Python, Java, C++ available as radio buttons in UI.

The second AI system is embedded in the Practice Area as a logic evaluator. Unlike traditional โrun codeโ environments, this evaluator does not execute user-submitted code. Instead, it performs a reasoning-based assessment of correctness, time complexity, missing edge cases, and algorithm design soundness. The evaluation output is structured, safe, and deterministic, fully independent of language-specific environments. It allows users practicing C++, Java, or Python to receive feedback on their logic without any of the risks associated with arbitrary code execution. This design aligns with production safety requirements and maintains the integrity of the platform.
Together, these AI components transform static problem-solving into a guided learning process where explanations, reasoning feedback, and conceptual clarity support the user at every stage of progression.
Behind the interactive interface, the system enforces multiple layers of safety to ensure reliability and responsible AI usage. All user inputs โ including arbitrary code typed into the Practice Area โ undergo strict preprocessing routines. These routines scan for high-risk patterns such as file operations, subprocess calls, uncontrolled loops, and dynamic evaluation primitives. Inputs that violate these constraints are rejected with clear feedback before reaching the AI evaluator.
On the AI output side, every model response passes through validation filters and structured parsing to eliminate malformed content, hallucinations, or inconsistencies. The LangGraph workflow includes checkpoints that reject outputs lacking required sections or violating formatting rules. Groq models were selected specifically for their deterministic latency and predictable behavior at scale, which helps reduce timeout risks and simplify failure handling.
Guardrails were added and tested for safety, full app testing and these were modified from producing harmful content to harmless content.


Operational safety is reinforced through retry mechanisms, controlled sampling configurations, timeout caps, and error-aware fallbacks. Every LLM call and external tool interaction is internally wrapped with logging hooks that capture exceptions, delays, and validation failures for later inspection. Even in cases where AI components fail, the platform maintains stable behavior by returning meaningful error messages instead of letting the system degrade unpredictably.
This layered safety design ensures that the system remains robust, transparent, and secure throughout heavy use.
Quality Assurance and Testing Strategy
The production version of DSA Quest is backed by a comprehensive testing suite that covers unit modules, integrated workflows, and full end-to-end flows. Core logic โ such as progress tracking, authentication handling, step progression, and badge assignment โ is validated through unit tests that simulate typical user interactions. These tests ensure that all counters, completion flags, boundary cases, and XP calculations behave deterministically.


Integration tests focus on interactions between the UI layer and backend modules. They verify that navigation states persist correctly across sessions, that authenticated and unauthenticated access paths behave as expected, and that AI modules return properly structured output when invoked. Additional tests simulate LLM failures, timeouts, missing fields, and malformed responses to verify the stability of fallbacks and retries.
End-to-end tests were added to validate complete user journeys: signing in, browsing problems, solving them, saving solutions, using games, and viewing progress pages. These workflows ensure that the system operates consistently across isolated sessions and that Supabase maintains data integrity across multiple users.
git clone https://github.com/Blessy456b/dsa-quest.git cd dsa-quest
The entire app lives inside a clean, modular folder structure:
dsa-quest/
โโโ app.py # Streamlit UI + Multi-Agent Orchestration
โโโ langraph_agent.py # Story/Analogy workflow powered by LangGraph
โโโ llm_evaluator.py # AI-powered code reviewer
โโโ dsa_data.py # Striver sheet + problem metadata
โโโ games.py # All 4 gamified learning modes
โโโ progress_tracker.py # Multi-user XP, streaks, badge logic
โโโ backend_user.py # Supabase auth & user persistence
โโโ requirements.txt
โโโ README.md
python3 -m venv venv source venv/bin/activate # macOS / Linux
pip install -r requirements.txt
This installs:
Create a .env file at project root:
touch .env
example:
Groq Key โ https://console.groq.com
Supabase Project URL & Anon Key โ Supabase Dashboard โ Project Settings โ API
Enable Email Auth under Supabase Authentication โ Providers
Inside Supabase Authentication โ URL Configuration:
Site URL (local testing):
http://localhost:8501
Redirect URLs:
http://localhost:8501
https://.streamlit.app
streamlit run app.py
Your app opens automatically at:
You now have:
This app is 100% compatible with Streamlit Cloud.
git add . git commit -m "initial release" git push origin main
https://share.streamlit.io
Click Deploy app โ Choose Repo.
Paste your full .env content into Streamlit Secrets:
SUPABASE_URL=... SUPABASE_KEY=... GROQ_API_KEY=...
Your app becomes publicly accessible at:
https://<appname>.streamlit.app
We include:
To run:
pytest -vv
Coverage:
pytest --cov=.
Now app ships with:
DSA Quest transforms traditional DSA learning into a gamified, AI-augmented, story-driven experience designed for real learnersโnot just for demonstration. Unlike static problem sheets or passive tutorials, DSA Quest brings together:
This project demonstrates not only multi-agent AI techniques, but also the real-world engineering for Module 3 of the AAIDCโsecurity, testing, UX, and operational resilience.
DSA Quest is now a deployable, scalable, user-friendly learning platform that proves your ability to architect, harden, and ship real AI systems.
Several enhancements can elevate DSA Quest into a full learning ecosystem:
This project is released under the MIT License, which allows:
Developed by Blessy Thomas
Built with curiosity using Streamlit, LangGraph, and Supabase technologies for Ready Tensor certification.
For queries
github :
https://github.com/Blessy456b
gmail :
blessy456bthomas@gmail.com