A full-stack competitive programming intelligence platform that turns your real submission history into a deterministic skill analysis. AlgoPulse connects to Codeforces, LeetCode, and CodeChef, and combines a rules-based analytics engine with Google Gemini AI and MongoDB Atlas Vector Search to tell you exactly what to practice next, why, and how ready you are for a specific company's interviews.
- Unified Profile Connection across Codeforces, LeetCode, and CodeChef from a single pasted URL
- Automatic Platform Detection and username extraction with live profile verification
- Incremental Sync Engine that ingests submissions, problems, and contests without creating duplicates
- Platform-Agnostic Core — analytics and recommendations operate identically regardless of source platform
- Per-Topic Skill Scoring based on success rate, difficulty weighting, recency, contest performance, and consistency
- Failure Pattern Detection that classifies recurring mistakes (for example, boundary errors, out-of-bounds access, brute-force timeouts)
- Skill Decay Warnings when a previously strong topic has gone unpracticed
- Monthly Progress Trends with automatic flagging of improvement, regression, and stagnation
- Contest Performance Breakdown by problem index across all tracked contests
- Structured Explanations using Google Gemini to translate computed analytics into plain-English insights
- Company-Aware Interview Prep combining skill coverage, difficulty ceiling, and topic trends into a readiness score
- Explain-Only AI Boundary — Gemini never calculates scores or recommendations, it only interprets results already computed deterministically
- Vector Embeddings using Google's
gemini-embedding-001model (768-dimensional) - Natural Language Problem Search — find problems by intent ("graph problems with DSU") rather than exact keyword match
- Find Similar recommendations for any problem, filtered to exclude problems already solved
- MongoDB Atlas Vector Search with metadata filtering by topic, platform, and difficulty
- Ranked Next Problems with explicit, human-readable reasoning
- Week-by-Week Roadmap prioritizing the weakest and highest-decay topics first
- Spaced Revision Queue resurfacing previously failed problems worth retrying
- Automatic Completion Tracking — recommendations close themselves out once the user solves the underlying problem
Frontend React 18, TypeScript, Vite, TailwindCSS, React Router, TanStack Query, React Hook Form, Recharts
Backend Node.js, Express, TypeScript, better-sqlite3, MongoDB Driver
AI/ML
Google Gemini AI (gemini-2.5-flash for text generation, gemini-embedding-001 for vector embeddings) via the Vercel AI SDK
Authentication & Security JWT (httpOnly cookies), bcrypt, Helmet, CORS, rate limiting, per-user data scoping
Data Layer SQLite (WAL mode) for relational data, MongoDB Atlas for vector search
- Node.js v20 or higher, npm v10 or higher
- MongoDB Atlas cluster (optional, required only for semantic search)
- Google Gemini API key (optional, required only for AI explanations and embeddings) — get one here
The application runs fully without MongoDB or Gemini configured. Those features display a clear "not configured" notice instead of failing.
git clone <your-repo-url>
cd AlgoPulse
npm installThis installs dependencies for both the server and client workspaces from the project root.
Create .env in server/:
JWT_SECRET=your_secure_random_string_here
SQLITE_DATABASE_PATH=./data/algopulse.db
PORT=3000
CLIENT_URL=http://localhost:5173
NODE_ENV=development
LOG_LEVEL=info
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/?appName=AlgoPulse
MONGODB_DATABASE=algopulse
GEMINI_API_KEY=your_gemini_api_key_hereCreate .env in client/:
VITE_API_URL=http://localhost:3000Only
JWT_SECRETis strictly required to run the application.MONGODB_URIandGEMINI_API_KEYunlock semantic search and AI features.
npm run devThis starts the Express API on http://localhost:3000 and the React client on http://localhost:5173 concurrently.
Access the application at http://localhost:5173.
npm test --workspace=server- Paste a Codeforces, LeetCode, or CodeChef profile URL into the Profiles page
- The platform is auto-detected and the profile is verified against the live platform
- Once connected, run a sync to pull submissions, problems, and contests into the database
- After syncing, visit the Analytics section to view per-topic skill scores, weaknesses, failure patterns, and progress trends
- Visit Recommendations for a ranked list of next problems, a full roadmap, and a revision queue
- Each recommendation includes a plain-English reason grounded in your actual data
- Enter a natural language query such as "binary search on answer" or "DP on trees"
- Results are ranked by vector similarity and automatically exclude problems already solved
- Use "Find Similar" on any problem to surface related unsolved problems
- Open any analytics page and request an AI explanation for a plain-English summary of the underlying data
- Visit Interview Prep and select a company to see prioritized topics and a deterministic readiness score
Analytics Pipeline Submissions and problems flow through a normalization and deduplication layer into SQLite, where five deterministic engines (skill, weakness, failure, decay, contest) compute scores that are persisted and versioned in a skill history table for trend analysis.
Vector Embedding Pipeline Problem metadata (title, topics, description) is embedded using Gemini's embedding model at a fixed 768 dimensions, upserted into MongoDB Atlas idempotently, and queried through Atlas Vector Search with metadata pre-filtering.
Security JWT authentication delivered via httpOnly, sameSite cookies, bcrypt password hashing, strict per-user data scoping on every query, Helmet and CORS hardening, and stricter rate limits on authentication routes.
AlgoPulse/
├── client/ # React TypeScript frontend
│ ├── src/
│ │ ├── pages/ # Dashboard, Analytics, Recommendations, Search, etc.
│ │ ├── components/ # Reusable UI components
│ │ └── lib/ # API client, hooks, auth context
│ └── package.json
├── server/ # Node.js TypeScript backend
│ ├── src/
│ │ ├── adapters/ # Codeforces, LeetCode, CodeChef adapters
│ │ ├── analytics/ # Skill, weakness, failure, decay, contest engines
│ │ ├── recommendations/ # Next-problem, roadmap, revision logic
│ │ ├── vector/ # Embeddings and MongoDB vector search
│ │ ├── ai/ # Gemini client and structured explanations
│ │ ├── ingestion/ # Sync manager, normalizer, deduplicator
│ │ ├── db/ # SQLite schema, migrations, repositories
│ │ └── routes/ # Express route handlers
│ └── tests/
└── README.md
| Variable | Description | Required |
|---|---|---|
JWT_SECRET |
Secret used to sign authentication tokens | Yes |
SQLITE_DATABASE_PATH |
Path to the SQLite database file | No |
PORT |
Server port | No |
CLIENT_URL |
Frontend origin allowed by CORS | No |
MONGODB_URI |
MongoDB Atlas connection string | No |
MONGODB_DATABASE |
MongoDB database name | No |
GEMINI_API_KEY |
Google Gemini API key | No |
VITE_API_URL |
API base URL used by the frontend | No |
Root
npm run dev # Starts server and client together
npm run typecheck # Typechecks both workspaces
npm test # Runs the server test suiteServer
npm run dev # tsx watch mode
npm run build # Compile TypeScript
npm run typecheck # Type checking only
npm test # Node test runnerClient
npm run dev # Vite dev server with HMR
npm run build # Production build
npm run preview # Preview production buildServer won't start
- Confirm
server/.envexists and includes at leastJWT_SECRET - Confirm the
.envfile has actually been saved to disk, not just typed in the editor
MongoDB connection fails with a TLS/SSL error
- Confirm the cluster is not paused and your IP is allowed under Atlas Network Access
- Try upgrading the
mongodbdriver, or test connectivity from a different network - The application will continue running normally with semantic search disabled while this is unresolved
AI features return an error
- Confirm
GEMINI_API_KEYis set and valid at Google AI Studio - Check server logs for the specific Gemini error message
Semantic search returns no results
- Confirm a sync has completed at least once so problems exist to index
- Confirm
GET /api/healthreports bothmongoConfiguredandaiConfiguredas true
- Incremental sync avoids re-fetching or re-processing already-ingested data
- SQLite runs in WAL mode for concurrent read/write performance
- Client bundle is code-split by route to keep initial load size small
- Vector indexing runs in the background after sync and never blocks the sync response
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Run
npm run typecheckandnpm test --workspace=serverbefore committing - Commit changes (
git commit -m "feat: add new feature") - Push to your branch and open a Pull Request
MIT License — see LICENSE for details.
Built to answer one question honestly: what should I actually practice next?