A production-grade, AI-assisted Competitive Programming Learning Platform built with React 19 + Firebase.
Who is the user? Computer science students and competitive programmers (especially IITM BS / Codeforces beginners) who want a structured, personalised learning path for DSA and CP problems.
What problem are we solving? Most CP platforms (like Codeforces, LeetCode) are raw problem archives β they give you thousands of problems but provide zero guidance on what to study, in what order, or how you're progressing. Students choose problems randomly, miss entire topic classes, and have no way to track their study effort holistically.
Why does this matter? A structured, topic-wise, difficulty-gated learning journey dramatically improves retention and interview readiness. AlgoGATE provides:
- Curated, topic-wise problem sets (800 β 900 β 1000 β 1300 β 1500 β 1800 rating tracks)
- Auto-syncing with Codeforces to credit work already done elsewhere
- A GitHub-style activity heatmap combining AlgoGATE + Codeforces data
- Integrated PDF study notes (DSA Java, IITM BS Stats, etc.)
- A real-time discussion thread per problem for community learning
| Feature | Description |
|---|---|
| π Authentication | Email/Password signup & login via Firebase Auth |
| π Dashboard | Streak tracker, stats overview, topic progress rings, activity heatmap |
| π§© Topic-wise Practice | 10+ DSA topics Γ 8 difficulty levels (800β1500) with 100+ curated CF problems |
| β Star / Bookmark | Bookmark problems; view them on a dedicated Starred page |
| π Study Notes | Browse PDF notes by subject (DSA Java, IITM BS Stats/Maths/Python) |
| π¬ Discussion Threads | Real-time per-problem discussion via Firestore onSnapshot |
| π Codeforces Auto-Sync | Auto-detects and marks problems solved on Codeforces into AlgoGATE progress |
| π Activity Heatmap | Codeforces-style 52-week heatmap (AlgoGATE + CF unified) |
| ποΈ Planner Calendar | Plan and track your upcoming study sessions by date |
| π€ Profile Page | View stats, edit CF handle, manually trigger full sync |
| π‘ Hint System | Collapsible, reveal-on-demand hints for curated problems |
| π Protected Routes | All authenticated pages guarded via ProtectedRoute component |
- Functional Components β 100% functional component architecture across all pages and components
- Props & Composition β
StatsCard,ProgressRing,QuestionRow,PdfCard,TopicAccordion, etc. useStateβ Used extensively for local UI state (modals, search, edit toggles, loading flags)useEffectβ Data loading on auth change, CF auto-sync on login, heatmap re-draw triggers- Conditional Rendering β Loading skeletons, error states, solved/unsolved badges, CF modal
- Lists & Keys β Topic lists, question rows, heatmap cells, discussion threads all keyed correctly
- Lifting State Up β Progress, starred, and activity state live in
AppContextand flow down - Controlled Components β All form inputs (login, signup, search boxes, CF handle input) are fully controlled
- React Router v7 β Nested routes, dynamic segments (
/practice/:topic/:questionId),Navigate,Link - Context API β
AuthContext(auth state) andAppContext(global app data) decouple state from UI
useMemoβtopicProgresses,filteredTopics,totalSolved,streak,filteredQuestionsall memoiseduseCallbackβloadUserData,syncIfStale,runSyncwrapped inuseCallbackto prevent re-rendersuseRefβautoSyncFiredRef(session guard),inProgressRef(sync race condition guard)React.lazy+Suspenseβ All 9 pages lazily loaded with a brandedPageLoaderspinner- Custom Hook β
useCodeforcesSyncencapsulates the entire CF API β Firestore sync pipeline
- Firebase Authentication (Email + Password)
onAuthStateChangedlistener inAuthContextβ single source of auth truth- On signup, a Firestore user document is created under
users/{uid} - Protected routes redirect unauthenticated users to
/auth
| Collection | Document ID | Purpose |
|---|---|---|
users |
{uid} |
Name, email, cfHandle, rating, createdAt, lastSyncedAt |
progress |
{uid} |
Nested: topic β difficulty β { solved: [ids] } |
starred |
{uid} |
{ questions: [questionIds] } |
activity |
{uid} |
{ dates: { "YYYY-MM-DD": count }, cfDates: {...} } |
discussions |
{questionId} |
Subcollection comments with real-time onSnapshot |
- Create: Signup (user doc), Post discussion comment, Mark solved, Star question
- Read: Load progress, load starred, load activity, load discussion thread
- Update: Bulk mark solved (CF sync), update CF handle, update rating, log activity
- Delete: Unstar question, delete own discussion comment
src/
βββ components/
β βββ dashboard/ # StatsCard, ProgressRing, CFOnboardModal, CFSyncStatus
β βββ discussion/ # DiscussionThread (real-time Firestore)
β βββ heatmap/ # ActivityHeatmap (GitHub-style)
β βββ layout/ # Navbar, ProtectedRoute
β βββ practice/ # QuestionRow, AdvisoryPopup
βββ context/
β βββ AppContext.jsx # Global state: progress, starred, activity, streak
β βββ AuthContext.jsx # Firebase Auth state & user profile
βββ hooks/
β βββ useCodeforcesSync.js # Custom hook: CF API β Firestore sync
βββ pages/
β βββ LandingPage.jsx
β βββ AuthPage.jsx
β βββ Dashboard.jsx
β βββ PracticePage.jsx
β βββ TopicPage.jsx
β βββ QuestionPage.jsx
β βββ StarredPage.jsx
β βββ StudyPage.jsx
β βββ ProfilePage.jsx
β βββ CalendarPage.jsx
βββ services/
β βββ firebase.js # Firebase app init
β βββ authService.js # signUp, signIn, signOut, getUserProfile
β βββ progressService.js # markSolved, bulkMarkSolved, markUnsolved, starred CRUD
β βββ activityService.js # logActivity, getActivity, setCFActivity
β βββ discussionService.js # getDiscussions, subscribeDiscussions, postComment, deleteComment
β βββ codeforcesService.js # CF API: user info, submissions, solved extraction
βββ utils/
βββ questionData.js # Master DB: 400+ curated CF problems, TOPICS, LEVELS
βββ progressionEngine.js # getLevelStatus, getTopicProgress, getTopicsMastered
βββ streakEngine.js # computeStreak, generateHeatmapData, getIntensity
βββ studyData.js # STUDY_SUBJECTS, topicβPDF mapping, getStudentPdfPath
| Layer | Technology |
|---|---|
| Framework | React 19 (Vite) |
| Routing | React Router v7 |
| Styling | Tailwind CSS v3 |
| Backend / Auth | Firebase v12 (Auth + Firestore) |
| External API | Codeforces Public REST API |
| Icons | Lucide React |
| Deployment | GitHub Pages (via gh-pages) |
- Node.js β₯ 18
- A Firebase project with Authentication (Email/Password) and Firestore enabled
git clone https://github.com/YASHK-arch/AlgoGATE.git
cd AlgoGATEnpm installCreate a .env file in the project root:
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
VITE_FIREBASE_MEASUREMENT_ID=G-XXXXXXXXXXnpm run devApp runs at http://localhost:5173
npm run deploy- β Authentication system (Firebase Email/Password)
- β Dashboard / Main screen with stats, heatmap, progress rings
- β 5+ core features (Practice, Study Notes, Discussions, CF Sync, Starred, Calendar)
- β CRUD functionality (progress, starred, discussions, user profile)
- β Persistent storage (Firestore β survives refresh, cross-device)
- β Routing (React Router v7 with protected + public routes)
- β State management (Context API β AuthContext + AppContext)
π Live Web App πΊ Video Demo / Walkthrough
MIT β feel free to fork, study, and build on top of AlgoGATE.