Skip to content

GitExcited/Socratic

Repository files navigation

Winner at ConUHacks X (MLH Best usage of MongoDB Atlas)

Socratic πŸ›οΈ

Learn to code without getting the answers handed to you.

Socratic is a VS Code extension that helps you learn programming through the Socratic method β€” guiding you with questions and hints instead of giving you direct solutions.

Built for ConUHacks 2026 πŸŽ‰

Watch Demo Tech Deep Dive

The Problem

Traditional coding assistants give you the answer immediately. You copy-paste, it works, but did you actually learn anything?

Our Solution

Socratic acts as your personal coding mentor. Instead of solving your problems, it asks the right questions to help you solve them yourself β€” building real understanding and problem-solving skills.

Features

Skill Atlas

πŸ” Real-Time Code Analysis

  • Automatic code analysis as you type
  • Contextual popups with hints and suggestions
  • Quick action buttons: Explain, Debug, Improve, Stuck



Skill Atlas

AI Teachers Marketplace

Pick your teaching style from a variety of AI personalities:

  • Socrates β€” Classic questioning approach
  • Gangsta β€” Street-smart coding wisdom
  • Ninja β€” Stealthy problem-solving
  • Army General β€” Disciplined, structured learning
  • ASMR Girl β€” Gentle, calming guidance

Each teacher has unique:

  • Voice (powered by ElevenLabs)
  • Personality and teaching style
  • Custom encouragement phrases



Skill Atlas

Skill Atlas

Visual radar chart showing your proficiency across skill categories:

  • Track progress across Python fundamentals, data structures, OOP, and more
  • Unlock skill packs from the marketplace
  • Download sponsored skill paths (AWS, MongoDB, course-specific)



Skill Atlas

Voice Features

Text-to-Speech Encouragement

  • Get voice feedback when you're doing well
  • Teacher-specific voices via ElevenLabs
  • Dynamic encouragement every 10 lines of code

Speech-to-Text Input

  • Click the mic icon to speak your questions
  • Powered by ElevenLabs STT API



RAG

RAG File Context (MongoDB Vector Search)

Upload documents to give your AI teacher context about your project:

  • Drag & drop files into the chat
  • Supports: .txt, .py, .js, .ts, .json, .md, .pdf, and more
  • Uses MongoDB Atlas Vector Search for semantic retrieval
  • Teacher uses your files as reference material



Adaptive Help Modes (5 Levels)

Choose your level of assistance based on how much you want to learn vs. how much you need help:

Level Mode Description
1 Slight Nudge Minimal hints, maximum learning
2 General Direction Conceptual guidance without spoilers
3 Detailed Guidance Examples and explanations
4 Step-by-Step Structured walkthrough
5 Full Hands-On Complete solutions when you need them

Quick Start

1. Install Dependencies

npm install

2. Set Up API Keys

Create a .env file in the project root:

GEMINI_API_KEY=your_gemini_api_key
ELEVENLABS_API_KEY=your_elevenlabs_api_key
MONGODB_URI=your_mongodb_connection_string

Get your keys:

3. Run the Extension

# Development
npm run watch   # Start TypeScript compiler in watch mode
# Press F5 in VS Code to launch Extension Development Host

# Package for distribution
npm run package   # Creates socratic-x.x.x.vsix

4. Install the VSIX

  1. Open VS Code
  2. Press Ctrl+Shift+P β†’ "Extensions: Install from VSIX..."
  3. Select the .vsix file from the project root
  4. Reload VS Code

Tabs Overview

Tab Purpose
Profile View stats, skill radar, edit avatar/banner
Work Chat with your AI teacher, set focus, manage files
Teachers Browse and select teachers, test voices, edit settings
Settings Configure triggers, response style, keyboard shortcuts

Tech Stack

Technology Usage
TypeScript Extension logic
VS Code Webview API Sidebar UI
Google Gemini AI-powered guidance & RAG embeddings
ElevenLabs Text-to-speech & speech-to-text
MongoDB Atlas User data, skill tracking, vector search

Keyboard Shortcuts

Shortcut Action
Ctrl+Shift+S Toggle real-time analysis
Ctrl+Alt+S Scan full file

Project Structure

Socratic/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ extension.ts        # Entry point
β”‚   β”œβ”€β”€ views/
β”‚   β”‚   β”œβ”€β”€ SocraticSidebarProvider.ts
β”‚   β”‚   β”œβ”€β”€ MarketplacePanel.ts
β”‚   β”‚   β”œβ”€β”€ SkillAtlasPanel.ts
β”‚   β”‚   β”œβ”€β”€ templates/      # HTML templates for tabs
β”‚   β”‚   └── components/     # Popup components
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ DataService.ts       # Hybrid MongoDB/local data
β”‚   β”‚   β”œβ”€β”€ GeminiService.ts     # AI chat
β”‚   β”‚   β”œβ”€β”€ ElevenLabsService.ts # Voice TTS/STT
β”‚   β”‚   β”œβ”€β”€ RAGService.ts        # Vector search
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ db/                 # MongoDB operations
β”‚   └── types/              # TypeScript interfaces
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ config.json
β”‚   β”œβ”€β”€ teachers/           # Teacher JSON profiles
β”‚   └── users/              # User profiles
β”œβ”€β”€ docs/
β”‚   └── index.html          # Landing page website
└── package.json

MongoDB Integration

Socratic uses MongoDB Atlas for:

  1. User Profiles β€” Cloud-synced stats, progress, preferences
  2. Skill Atlas Data β€” Proficiency tracking with nested updates
  3. Marketplace Teachers β€” Shareable teacher configurations
  4. RAG Vector Storage β€” Document chunks with embeddings for semantic search

Key MongoDB Features Showcased:

  • Nested atomic updates with $set dot notation
  • $inc for stat increments
  • Flexible schema for different skill packs
  • Atlas Vector Search with $vectorSearch aggregation

ElevenLabs Integration

  • TTS API β€” Generate teacher voice audio
  • STT API β€” Transcribe student voice input
  • Multiple Voices β€” Each teacher can have a unique voice

Google Gemini Integration

  • Chat Completions β€” Socratic dialogue generation
  • Embedding API β€” Vector embeddings for RAG (text-embedding-004)
  • Batch Processing β€” Efficient embedding of large documents

Troubleshooting

Extension freezes on load

  • Check console for errors (Help > Toggle Developer Tools)
  • Verify .env file has valid API keys
  • Try without MongoDB (it gracefully falls back to local data)

Voice not playing

  • Ensure ELEVENLABS_API_KEY is set
  • Check that the teacher has a valid voice ID
  • Look for errors in the Developer Console

RAG files not processing

  • Ensure GEMINI_API_KEY is set
  • Check file size (max 10MB)
  • MongoDB must be connected for vector storage

Team

Built with ❀️ at ConUHacks 2026


"I cannot teach anybody anything. I can only make them think." β€” Socrates

About

Agent tutor that helps you code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors