An interactive, full-stack application designed to train and evaluate developers on their debugging and problem-solving skills. Unlike traditional quizzes, this simulator mimics real-world scenarios by requiring users to actively investigate logs, check database indexes, and review code before submitting a diagnosis.
The application evaluates the user's investigation behavior (rewarding optimal paths, penalizing skipped steps or wrong concepts) and leverages Google's Gemini AI to provide personalized coaching feedback based on their submission.
- Interactive Investigation: Navigate through non-linear scenarios by viewing server logs, query explains, metrics, and code snippets.
- Thinking-Based Evaluation: Scores are calculated based on finding the root cause, explaining the technical reasoning, and proposing a valid fix.
- Behavior Tracking: Penalizes skipping critical steps (e.g., guessing a DB issue without checking indexes) and rewards optimal investigation paths.
- AI Coaching: Integrates the Google Gemini API to act as a Senior Developer, providing nuanced feedback on what you missed in your analysis.
- Fuzzy Keyword Matching: Built-in tolerance for typos and synonyms using the
fuzzballlibrary.
- Frontend: React, Vite, Vanilla CSS
- Backend: Node.js, Express
- Database: MongoDB, Mongoose
- AI/LLM: Google Gemini API (
@google/genai)
git clone https://github.com/your-username/debugging-simulator.git
cd debugging-simulatorcd backend
npm installCreate a .env file in the backend/ directory:
# Local MongoDB (or replace with Atlas URI if remote)
MONGODB_URI=mongodb://127.0.0.1:27017/debug-simulator
# Get a free API key from https://aistudio.google.com/
GEMINI_API_KEY=your_gemini_api_key_hereSeed the database with the built-in scenarios:
npm run seedStart the backend server:
npm start(The server will run on http://localhost:5001)
Open a new terminal window:
cd frontend
npm install(Optional) Create a .env file in the frontend/ directory if your backend is hosted elsewhere:
VITE_API_URL=http://localhost:5001Start the development server:
npm run dev(The app will open at http://localhost:5173)
- Set the Root Directory to
backend. - Build Command:
npm install - Start Command:
npm start - Add
MONGODB_URIandGEMINI_API_KEYto the environment variables.
- Set the Root Directory to
frontend. - Build Command:
npm run build - Add
VITE_API_URLto the environment variables, pointing to your deployed backend URL (e.g.,https://my-backend.onrender.com).