"Don't just solve problems. Learn to think through them."
HintCode is an intelligent, AI-powered Data Structures and Algorithms (DSA) learning platform engineered for Computer Science students and developers. Instead of dumping full solutions when you get stuck on a coding problem, HintCode provides progressive Socratic hintsβguiding your problem-solving mindset step-by-step from conceptual nudges to pseudocode.
When practicing on platforms like LeetCode, getting stuck is natural. However, asking traditional AI tools like ChatGPT often results in immediate code dumps. This deprives learners of critical problem-solving practice and active recall.
HintCode bridges the gap between getting stuck and mastering DSA. It connects directly to LeetCode, parses problem specifications, and delivers progressive guidance tailored to your current progress:
- Level 1β2: High-level conceptual nudges & pattern recognition.
- Level 3β4: Algorithmic intuition & pseudocode walkthroughs.
- Level 5: Targeted code snippets & solution reveals (only when you explicitly ask).
- π LeetCode Problem Integration: Instantly fetch problems by problem number or URL slug.
- π‘ Progressive Socratic Hints: 5 dynamic hint levels to keep you thinking without spoiling the answer.
- π§© AI Problem Breakdown: Simplifies complex constraints and problem statements into plain English.
- π Intelligent Debug Assist: Analyzes code errors and test case failures to point out logic bugs.
βΆοΈ In-Browser Code Execution: Write, run, and test Python, Java, or C++ solutions against standard and custom test cases.- π Submission History & Progress Tracking: Keep track of previous attempts and solution progress.
- π User Authentication: Secure sign-in and profile management via Clerk.
HintCode/
βββ frontend/ # Next.js 16 (App Router) Frontend Application
β βββ app/ # Pages, layouts, and API routes (/api/hint, /api/run-code, etc.)
β βββ components/ # UI components (CodeEditor, HintPanel, ProblemPanel, etc.)
β βββ lib/ # Services & API integrations (Gemini, Claude, JDoodle, Piston, LeetCode)
β βββ scripts/ # Utility scripts
β βββ package.json # Frontend dependencies & scripts
β βββ .env.example # Environment variable template for frontend
β
βββ backend/ # Node.js + Express + TypeScript API Service
βββ src/
β βββ routes/ # Express API endpoints & router logic
β βββ index.ts # Express server entry point
βββ tsconfig.json # TypeScript compiler configuration
βββ package.json # Backend dependencies & scripts
βββ .env.example # Environment variable template for backend
Before getting started, make sure you have the following installed on your system:
- Git: Download Git
- Node.js: v18.0.0 or higher Download Node.js
- npm: v9.0.0 or higher (comes bundled with Node.js)
Follow these step-by-step instructions to clone, configure, and run HintCode on your local machine.
Open your terminal or command prompt and run:
git clone https://github.com/Aakash8210/HintCode.git
cd HintCode-
Navigate to the frontend folder:
cd frontend -
Install frontend dependencies:
npm install
-
Create the local environment file:
cp .env.example .env.local
-
Add your API Keys to
.env.local: Open.env.localin your editor and add your key credentials:# AI Models GEMINI_API_KEY=your_gemini_api_key_here # Clerk Authentication NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key CLERK_SECRET_KEY=your_clerk_secret_key # Code Execution (JDoodle or Judge0) JDOODLE_CLIENT_ID=your_jdoodle_client_id JDOODLE_CLIENT_SECRET=your_jdoodle_client_secret
-
Start the Next.js development server:
npm run dev
-
Open your browser and go to:
http://localhost:3000
Open a new terminal tab/window and run:
-
Navigate to the backend folder:
cd HintCode/backend -
Install backend dependencies:
npm install
-
Create the environment file:
cp .env.example .env
-
Start the Express backend development server:
npm run dev
-
The backend service will run on:
http://localhost:5001(Health check athttp://localhost:5001/api/health).
| Variable Name | Description | Required / Optional |
|---|---|---|
GEMINI_API_KEY |
Google Gemini API key for progressive hints and AI breakdowns | Required |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Clerk Authentication publishable key | Required for Auth |
CLERK_SECRET_KEY |
Clerk Authentication secret key | Required for Auth |
JDOODLE_CLIENT_ID |
JDoodle API client ID for running code snippets | Optional (or Piston/Judge0) |
JDOODLE_CLIENT_SECRET |
JDoodle API secret key for code execution | Optional |
DATABASE_URL |
PostgreSQL / Neon Database connection string | Optional (for persistent history) |
PORT |
Backend server port (Default: 5001) |
Optional |
npm run dev: Starts local Next.js server atlocalhost:3000npm run build: Compiles optimized production bundlenpm start: Runs production servernpm run lint: Checks TypeScript & code styling
npm run dev: Starts Express server with hot-reloading usingtsxnpm run build: Compiles TypeScript source todist/npm start: Runs compiled production backend server (node dist/index.js)
- Frontend: Next.js 16 (React 18), TypeScript, Tailwind CSS, Framer Motion, Monaco Editor, Zustand, Shadcn UI
- Backend: Node.js, Express, TypeScript
- AI Integrations: Google Gemini API (
@google/genai), Anthropic Claude API - Code Execution Engines: JDoodle API, Judge0 API, Piston API
- Data & Auth: Clerk Auth, Neon PostgreSQL (
@neondatabase/serverless)
Distributed under the MIT License. See LICENSE for details.