Project Info
Built With Frontend (Desktop Application) Electron.js - Cross-platform desktop framework for building the native application Node.js - JavaScript runtime for the main process HTML5/CSS3 - Modern web technologies for the chat interface JavaScript (ES6+) - Client-side logic and IPC communication IPC (Inter-Process Communication) - Electron's messaging system between main and renderer processes Backend (AI Service) Python 3.13 - Core backend language FastAPI - High-performance async web framework for RESTful API Uvicorn - Lightning-fast ASGI server Pydantic - Data validation and schema modeling AI & Machine Learning Anthropic Claude API - Claude 3 Haiku model for intelligent tutoring Claude 3 Haiku - Fast, cost-effective LLM optimized for conversational AI Custom Socratic System Prompt - Professional teaching methodology implementation JSON Structured Outputs - Typed responses with classification metadata Key Libraries & Dependencies anthropic (Python) - Official Anthropic SDK for Claude API integration python-dotenv - Environment variable management Chokidar - File system watching (disabled in current version) httpx - Async HTTP client for API calls Architecture & Design Patterns RESTful API - Standard HTTP endpoints for code analysis Event-Driven Architecture - EventEmitter pattern for service communication Session State Management - In-memory tracking of tutoring sessions Observer Pattern - For monitoring user interactions Singleton Pattern - Service instances in backend Development Tools npm - Package management for Node.js pip - Python package management Git - Version control Markdown - Documentation and LaTeX support Deployment & Infrastructure localhost:8000 - Backend API server CORS middleware - Cross-origin resource sharing for security JSON API - Standardized data exchange format Special Features Safe Console Wrapper - Custom EPIPE error prevention system Cursor-Style Sidebar - Modern chat interface design Real-time Classification - SYNTAX/LOGIC/CONCEPTUAL issue detection Adaptive Memory System - Tracks repeated mistakes and learning patterns Multi-Level Hint System - Progressive disclosure of guidance (3 levels) Technology Highlights Why Claude 3 Haiku? β‘ Fast response times (~1-2 seconds) π° Cost-effective for educational applications π§ Excellent reasoning for Socratic questioning π Structured outputs with JSON mode Why Electron? π₯οΈ Cross-platform (macOS, Windows, Linux) π¨ Modern UI with web technologies π§ Native integrations (system tray, notifications) π¬ Cursor-style sidebar overlay capabilities Why FastAPI? π Async/await for concurrent requests π Auto-generated docs (Swagger/OpenAPI) β Type safety with Pydantic β‘ High performance (comparable to Node.js) API Endpoints Tech Stack Summary Total Tech Stack: 15+ technologies integrated into a cohesive learning platform
SocraticCode - AI Coding Tutor
SocraticCode is an AI-powered coding tutor that teaches programming through guided hints and step-by-step problem solving. Instead of giving you the answer directly, it provides hints at three different levels to help you learn and understand the solution process.
Features
-
Three-Level Hint System:
- Level 1: Conceptual questions to guide your thinking
- Level 2: Stepwise algorithmic instructions
- Level 3: Detailed pseudocode with examples
-
Progressive Learning: Hints unlock as you progress through levels
-
Session Tracking: Your progress is saved as you work through problems
-
Multiple Programming Languages: Support for JavaScript, Python, Java, C++, and more
-
Problem Categories: Algorithms, Data Structures, Arrays, Strings, Math, etc.
-
Difficulty Levels: Beginner, Intermediate, Advanced
Tech Stack
- Frontend: React with TypeScript
- Backend: Node.js with Express
- Database: MongoDB with Mongoose
- Styling: CSS3 with modern design
Prerequisites
- Node.js (v14 or higher)
- MongoDB (local installation or MongoDB Atlas)
- npm or yarn
Installation
-
Clone the repository
git clone <repository-url> cd CalHacks -
Install dependencies
# Install root dependencies npm install # Install backend dependencies cd server npm install # Install frontend dependencies cd ../client npm install -
Set up environment variables
Create a
.envfile in theserverdirectory:PORT=4001 MONGODB_URI=mongodb://localhost:27017/socraticcode NODE_ENV=development -
Start MongoDB
Make sure MongoDB is running on your system:
# If using local MongoDB mongod # Or if using MongoDB Atlas, update the MONGODB_URI in .env -
Seed the database
cd server npm run seed -
Start the application
# From the root directory npm run dev # Or start them separately: # Terminal 1 - Backend cd server && npm run dev # Terminal 2 - Frontend cd client && npm start
Usage
- Browse Problems: Visit
http://localhost:3000to see available problems - Filter Problems: Use the filter options to find problems by difficulty, language, or category
- Start Learning: Click "Start Problem" to begin working on a problem
- Request Hints: Use the hint buttons to get guided help:
- Start with Level 1 for conceptual guidance
- Progress to Level 2 for algorithmic steps
- Use Level 3 for detailed pseudocode
- Write Code: Use the code editor to implement your solution
- Submit Solution: Submit your code when ready
API Endpoints
Problems
GET /api/problems- Get all problems (with optional filters)GET /api/problems/:id- Get a specific problemPOST /api/problems- Create a new problem (admin)
Hints
GET /api/hints/:problemId/:level- Get hint for specific levelGET /api/hints/:problemId- Get all hints for a problem
Sessions
POST /api/sessions- Create a new sessionGET /api/sessions/:sessionId- Get session detailsPUT /api/sessions/:sessionId- Update session (record hints, attempts)
Project Structure
CalHacks/
βββ client/ # React frontend
β βββ src/
β β βββ components/ # React components
β β βββ services/ # API services
β β βββ types/ # TypeScript types
β β βββ ...
βββ server/ # Node.js backend
β βββ models/ # MongoDB models
β βββ routes/ # API routes
β βββ middleware/ # Express middleware
β βββ ...
βββ package.json # Root package.json
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT License - see LICENSE file for details
Future Enhancements
- Code execution and testing
- User authentication and profiles
- Progress tracking and analytics
- More programming languages
- Mobile app version
- Collaborative problem solving
- AI-powered hint generation
Analysis
View
Metric
- 13
- 8
- 3
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- FastAPIIn code
- Google GeminiIn code
- HTMLIn code
- JavaScriptIn code
- OpenAIIn code
- PythonIn code
- CSSClaimed
- JavaClaimed
7 of 9 appear in the indexed code. 2 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
324 KB
Source files
49
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
tanvi-badadare/CalHacks
61 files Β· 5.5 MB Β· @ a73915e
Structure
Interface
2 files Β· 3%Screens, components and styles rendered to the user.
Application logic
33 files Β· 54%Domain rules, services and shared utilities.
+2 moreData & schema
1 file Β· 2%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here β open the file browser to check anything the diagram implies.
Languages
- JavaScript46%
- Markdown29%
- HTML16%
- Python7%
- Shell2%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
socraticcode-desktop/package.json
npm Β· 9- @google/generative-ai
- @types/node
- axios
- chokidar
- openai
- tesseract.js
- typescript
- +2 more
python-backend/requirements.txt
pypi Β· 7- anthropic
- fastapi
- httpx
- pydantic
- python-dotenv
- uagents
- uvicorn
Declared in the repositoryβs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This projectβs features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.