Skip to content

kratos0718/pathforge

Repository files navigation

PathForge Logo

PathForge β€” AI Career OS

The all-in-one placement preparation platform for CSE students in India

Live Demo Next.js TypeScript Supabase


What is PathForge?

PathForge solves the #1 problem for CSE students: no clear, personalised path from where they are today to a placement offer at their dream company.

Most students waste months jumping between random YouTube playlists, LeetCode problems without strategy, and generic roadmaps that don't account for their semester, skills, or target role. PathForge gives them an AI-powered system that adapts to them β€” acting as a personal placement coach, roadmap planner, and accountability partner.

Built for the ~1.5 million CSE students who graduate in India every year.


Live Demo

πŸ”— pathforge.online

Sign in with Google or use the guest account to explore the full platform.


Features

🧭 AI Role Compass

Identifies your best-fit career path (SDE, Data Science, DevOps, ML Engineer, etc.) based on your skills, interests, and semester β€” powered by Groq Llama 3.3-70B.

πŸ—ΊοΈ 16-Week Placement Roadmap

Personalised week-by-week preparation plan generated by AI. Adapts based on your target role, current skills, and available time. Weekly check-ins keep it current.

πŸ’» DSA Tracker

Track all 455 problems from Striver's A2Z DSA sheet with XP rewards, difficulty filters, topic-wise progress, and a built-in streak system. Marks weakest topics for priority practice.

🏒 Company Intelligence Hub

Company-specific prep paths for Google, Microsoft, Amazon, Flipkart, Goldman Sachs, Razorpay, Infosys, and Adobe β€” including:

  • Round-by-round breakdown
  • OA pattern and timing
  • Must-know topics (weighted by frequency)
  • Past interview questions with difficulty tags
  • Live readiness score based on your DSA progress
  • DSA gap calculator (you need X, you have Y)
  • Insider tips from students who got offers

πŸ“Š Readiness Score

Real-time placement readiness score across DSA, projects, communication, core subjects, and profile completeness. Tracks progress over time.

βœ… Smart Daily Tasks

Auto-generated daily task list based on your roadmap stage, weakest DSA topics, active courses, and target role. Subject rotation by weekday. XP rewards on completion. localStorage persistence.

πŸ“š CSE Subjects

Structured learning paths for OS, DBMS, CN, OOP, System Design, COA, and Discrete Math β€” with curated free resources, topic chips, exam tips, and interview preparation notes.

πŸŽ“ CGPA Calculator

Calculate CGPA across all semesters, check company eligibility cutoffs, and see which companies you qualify for based on your current score.

πŸ“– Interview Stories

Real placement experiences from students who cracked Google, Microsoft, Amazon, Flipkart, and Razorpay β€” with expandable full stories and numbered tips from each person.

πŸ‘₯ Friends & Leaderboard

Connect with batchmates, view activity feeds, and compete on XP leaderboards. Accountability buddy system with missed-day nudges after 6pm.

πŸ† Challenges

Create and join placement preparation challenges with peers. Live competition tracking.

πŸ’Ό Profile Updater

Auto-suggests LinkedIn skill additions and resume updates based on completed milestones. Dismissable tips that persist across sessions.


Tech Stack

Layer Technology
Frontend Next.js 14 (App Router), TypeScript, Tailwind CSS
Animations Framer Motion (spring physics, AnimatePresence)
Backend Next.js API Routes (serverless) + FastAPI (Python)
Database Supabase (PostgreSQL) with Row Level Security
Auth Supabase Auth β€” Google OAuth + Email/Password
AI Groq API (Llama 3.3-70B) with deterministic fallbacks
Payments Razorpay (INR, UPI, cards, net banking)
Deployment Vercel (frontend) + Railway (backend)
PWA @ducanh2912/next-pwa β€” installable on Android & iOS
Icons Lucide React
Fonts Space Grotesk (headings) + Inter (body)

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Next.js Frontend                   β”‚
β”‚  App Router Β· TypeScript Β· Tailwind Β· Framer Motion  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚                         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Next.js API Routes β”‚   β”‚   FastAPI Backend   β”‚
β”‚  /api/tasks/today   β”‚   β”‚   AI agents         β”‚
β”‚  /api/payments/*    β”‚   β”‚   DSA stats         β”‚
β”‚  /api/admin         β”‚   β”‚   Readiness score   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚                         β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚        Supabase          β”‚
          β”‚  PostgreSQL + Auth + RLS β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key architectural decisions:

  • Stateless middleware β€” no Supabase network calls in Edge middleware (prevents 504 timeouts). Auth cookies inspected directly.
  • Service role key server-side only β€” admin operations and payment verification use the service role key exclusively in API routes, never exposed to the browser.
  • Chunked cookie detection β€” Google OAuth tokens are large and get split across multiple cookies (sb-xxx-auth-token.0, .1). Middleware uses includes() not endsWith() to detect all variants.
  • AI with deterministic fallbacks β€” every Groq API call has a pre-built fallback response so the app works even when the AI is unavailable.

Database Schema

users              β€” profile, xp, streak, tier, target_role, college
roadmap_plans      β€” AI-generated 16-week plan per user
roadmap_tasks      β€” individual tasks within each plan
dsa_sheets         β€” problem sheets (Striver A2Z)
dsa_problems       β€” 455 individual problems with topics
dsa_progress       β€” per-user problem completion
courses            β€” user-tracked online courses
readiness_scores   β€” placement readiness over time
friendships        β€” peer connections
activity_feed      β€” friend activity events
challenges         β€” peer challenges + participants
notifications      β€” in-app notification system

All tables have Row Level Security (RLS) enabled. Admin operations bypass RLS via service role key on the server.


Getting Started

Prerequisites

  • Node.js 18+
  • A Supabase project
  • Razorpay account (for payments)
  • Groq API key (for AI features)

Setup

# Clone the repository
git clone https://github.com/kratos0718/pathforge.git
cd pathforge

# Install dependencies
npm install

# Copy environment variables
cp .env.local.example .env.local

Fill in .env.local:

NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

NEXT_PUBLIC_BACKEND_URL=your_fastapi_backend_url

RAZORPAY_KEY_ID=rzp_test_xxxxxxxxxxxx
RAZORPAY_KEY_SECRET=your_razorpay_secret

NEXT_PUBLIC_ADMIN_EMAILS=your@email.com
# Run the development server
npm run dev

Open http://localhost:3000

Database Setup

# Apply the schema to your Supabase project
# Go to Supabase β†’ SQL Editor β†’ paste contents of:
supabase/schema.sql

PWA β€” Install on Mobile

PathForge is a full Progressive Web App.

Android: Chrome β†’ 3-dot menu β†’ "Add to Home Screen"

iOS: Safari β†’ Share button β†’ "Add to Home Screen"

Opens fullscreen with the PathForge logo, violet theme, and app shortcuts for Tasks, DSA, and Roadmap.


Payments

Razorpay integration with server-side HMAC signature verification:

User clicks Upgrade (β‚Ή99/mo)
  β†’ /api/payments/create-order  (creates Razorpay order)
  β†’ Razorpay checkout UI opens
  β†’ User pays via UPI / card / net banking
  β†’ /api/payments/verify  (validates HMAC signature)
  β†’ users.tier = 'premium' + 500 XP awarded

The Key Secret never leaves the server.


Folder Structure

src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/              # Serverless API routes
β”‚   β”‚   β”œβ”€β”€ admin/        # Admin data endpoint
β”‚   β”‚   β”œβ”€β”€ payments/     # Razorpay create-order + verify
β”‚   β”‚   └── tasks/today/  # Smart daily task generator
β”‚   β”œβ”€β”€ auth/             # Login + Google OAuth callback
β”‚   β”œβ”€β”€ dashboard/        # Main dashboard
β”‚   β”œβ”€β”€ company/          # Company intelligence hub
β”‚   β”œβ”€β”€ dsa/              # DSA problem tracker
β”‚   β”œβ”€β”€ roadmap/          # 16-week roadmap
β”‚   β”œβ”€β”€ compass/          # AI role compass
β”‚   β”œβ”€β”€ subjects/         # CSE subject paths
β”‚   β”œβ”€β”€ score/            # Readiness score
β”‚   β”œβ”€β”€ upgrade/          # Premium subscription
β”‚   └── admin/            # Admin panel
β”œβ”€β”€ components/
β”‚   └── ui/               # Reusable components + custom cursor
β”œβ”€β”€ lib/
β”‚   └── supabase.ts       # Supabase client
└── middleware.ts          # Edge auth middleware

Key Engineering Challenges Solved

1. Vercel Edge Middleware 504 Timeout Supabase getUser() and getSession() make outbound network calls which timeout in Vercel's Edge runtime. Solved by making middleware completely stateless β€” only inspects cookie names to determine auth status.

2. Google OAuth Redirect Loop OAuth tokens are large and get chunked into multiple cookies. The middleware only detected single-cookie sessions. Fixed by changing endsWith('-auth-token') to includes('-auth-token').

3. Session Cookies Lost After OAuth NextResponse.redirect() doesn't inherit cookies set via next/headers. After code exchange, session cookies were being lost. Fixed by buffering cookies in an array and attaching them directly to the redirect response.

4. TypeScript Set Iteration JSON.stringify([...Set]) fails without downlevelIteration. Fixed with Array.from().


Screenshots

Dashboard Company Intel DSA Tracker
Daily tasks, stats, modules Company readiness scores 455-problem tracker
Interview Stories Roadmap Upgrade
Real placement experiences 16-week AI plan Razorpay payment

Roadmap (Upcoming)

  • AI Mock Interview β€” practice with real-time AI feedback
  • Resume Builder β€” auto-generate ATS resume from profile data
  • Job Application Tracker β€” kanban board for applications
  • Email reminders β€” streak protection, weekly digest (Resend)
  • Real-time leaderboard β€” Supabase Realtime
  • College leaderboard β€” rank within your college batch

License

MIT β€” free to use, modify, and distribute.


Built with ❀️ for every CSE student grinding for their dream placement.

Try PathForge β†’

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors