A full-stack competitive programming tracker and AI mentoring platform. Built as an evolution of a GDG hackathon project, CP Tracker integrates Codeforces, LeetCode, and AtCoder into a single unified dashboard with a global leaderboard and context-aware AI chatbot.
This project is structured as a monorepo with a distinct frontend and backend:
- Framework: Next.js 15 (App Router) + React 19
- Styling: Tailwind CSS + shadcn/ui components
- State/Auth: Custom React Contexts (
AuthContext,SocketContext)
- Framework: Express.js + Socket.IO
- Database: PostgreSQL via Prisma ORM
- Auth: JWT (Access + Refresh tokens) + bcrypt
- AI Integration: Google Generative AI (
gemini-2.5-flash) - Background Jobs:
node-cronfor polling external APIs
- Unified CP Dashboard: Visual heatmap and timeline of your submissions across CF, LC, and AC.
- Global Leaderboard: Ranks users based on our custom Code Quality Index (CQI) algorithm (volume, consistency, and contest rating).
- Context-Aware AI Chatbot: Chat with Gemini 2.5 Flash. It has access to your actual CP profile context (CQI, recent submissions, linked platforms) and supports code file uploads for deep debugging.
- Real-time Contests: Socket.IO powered widget showing live and upcoming contests.
You will need a PostgreSQL database. Neon is recommended for a quick serverless instance.
cd server
npm install
# Set DATABASE_URL in server/.env
npx prisma db push
npx prisma generateCopy .env.example to .env in the root and fill it out:
DATABASE_URLJWT_ACCESS_SECRET/JWT_REFRESH_SECRETGOOGLE_GENAI_API_KEYRESEND_API_KEY(optional, for password resets)
cd server
npm run dev
# Starts on port 3001npm install
npm run dev
# Starts on port 9002