Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

πŸŽ“ KCSE Course Checker

Helping Kenyan students discover the university and diploma courses they qualify for β€” based on their real KCSE grades and 2024 KUCCPS cutoff points.

🌐 Live App: course-compass-one.vercel.app


πŸ“± What It Does

Every year, thousands of Kenyan Form 4 leavers struggle to know which university courses they qualify for. This tool solves that.

Enter your KCSE grades β†’ get your cluster scores β†’ see every course you qualify for.

Features

  • βœ… Automatic cluster score calculation using the official KUCCPS formula
  • βœ… 393 courses β€” 291 degrees + 102 diplomas with exact 2024 KUCCPS cutoff points
  • βœ… Interest-based filtering β€” only see courses in fields you care about
  • βœ… M-Pesa STK Push payment via IntaSend (secure backend verification)
  • βœ… Google OAuth β€” sign in once, retrieve results anytime without re-paying
  • βœ… Diploma-only mode β€” automatically detected for students below C+
  • βœ… Returning user flow β€” retrieve previous results by name and phone
  • βœ… Installable as a PWA β€” works like a native app on Android and iPhone
  • βœ… 2024 KUCCPS official cutoff points PDF embedded for verification
  • βœ… WhatsApp support button for direct student assistance

πŸ› οΈ Tech Stack

Layer Technology
Frontend React 18 + TypeScript
Styling Tailwind CSS + shadcn/ui
Backend / Database Supabase (PostgreSQL + RLS)
Auth Supabase Google OAuth
Payments IntaSend M-Pesa STK Push
Serverless Functions Supabase Edge Functions (Deno)
PWA vite-plugin-pwa + Workbox
Deployment Vercel
Build Tool Vite + SWC

πŸ—οΈ Architecture

User enters KCSE grades
 ↓
Cluster engine calculates scores (calibrated to 2024 KUCCPS data)
 ↓
matchCoursesWithCutoffs() β†’ ranked list of qualifying courses
 ↓
M-Pesa STK Push (IntaSend) β†’ Edge Function β†’ Supabase payments table
 ↓
mpesa-callback Edge Function verifies payment server-side
 ↓
Frontend polls DB for confirmed status β†’ unlocks results

Payment flow is fully secure β€” access is only granted after the backend Edge Function confirms the transaction from IntaSend's webhook. The frontend never grants itself access.


πŸ—„οΈ Database Tables

Table Purpose
users Student profiles (name, gender, age, phone)
user_results KCSE subject grades per student
user_cluster_results Calculated cluster scores
payments M-Pesa payment records with status
courses 393 courses with cutoff points
degree_programme_cutoffs_exact_2024 703 exact 2024 KUCCPS cutoffs
reviews Student reviews (admin-approved before display)

βš™οΈ Cluster Score Formula

×ば぀ (t/84)) ×ば぀ 48 ×ば぀ 0.957">
C = √((r/48) ×ば぀ (t/84)) ×ば぀ 48 ×ば぀ 0.957

Where r = raw cluster subject score (max 48) and t = KCSE aggregate (max 84). Calibrated to match 2024 KUCCPS placement data.


πŸš€ Getting Started (Local Development)

# Clone the repo
git clone https://github.com/gitau254-m/course-compass.git
cd course-compass
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Fill in your Supabase URL and anon key
# Start dev server
npm run dev

Environment Variables

VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_PUBLISHABLE_KEY=your_supabase_anon_key

πŸ“¦ Edge Functions

Function Purpose
intasend-stk Initiates M-Pesa STK Push, creates payment record
mpesa-callback Receives IntaSend webhook, verifies and confirms payment
intasend-webhook Secondary webhook handler

πŸ‘¨β€πŸ’» Author

Wallace Gitau


πŸ“„ License

MIT License β€” feel free to fork and build on this.


Built with ❀️ for Kenyan students navigating university admissions.

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /