Skip to content

GodWar9/Cp_eval_tracker

Repository files navigation

CP Tracker / ALL IN

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.

Architecture

This project is structured as a monorepo with a distinct frontend and backend:

Frontend (Next.js 15)

  • Framework: Next.js 15 (App Router) + React 19
  • Styling: Tailwind CSS + shadcn/ui components
  • State/Auth: Custom React Contexts (AuthContext, SocketContext)

Backend (/server - Node/Express)

  • 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-cron for polling external APIs

Key Features

  1. Unified CP Dashboard: Visual heatmap and timeline of your submissions across CF, LC, and AC.
  2. Global Leaderboard: Ranks users based on our custom Code Quality Index (CQI) algorithm (volume, consistency, and contest rating).
  3. 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.
  4. Real-time Contests: Socket.IO powered widget showing live and upcoming contests.

Local Development

1. Database Setup

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 generate

2. Environment Variables

Copy .env.example to .env in the root and fill it out:

  • DATABASE_URL
  • JWT_ACCESS_SECRET / JWT_REFRESH_SECRET
  • GOOGLE_GENAI_API_KEY
  • RESEND_API_KEY (optional, for password resets)

3. Run Backend

cd server
npm run dev
# Starts on port 3001

4. Run Frontend

npm install
npm run dev
# Starts on port 9002

Documentation

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages