Coursify is a course-insights platform for Queen's University students. It features course grade distributions, relevant Reddit and RateMyProfessors comments, and also an AI Chatbot.
| Repository | Purpose |
|---|---|
| Coursify-WebApp | Full stack application |
| Coursify-Scrapers | Scheduled data scrapers for the Queen's academic calendar, Reddit, and RateMyProfessors |
| Coursify-RAG | Queen's Answers - Our chatbot |
- Next.js
- React 18 & TypeScript
- Tailwind CSS — styling (with
tailwindcss-animate,@tailwindcss/typography) - Radix UI — accessible primitives (dialogs, dropdowns, tabs, etc.)
- Supabase — PostgreSQL (course and distribution data) and authentication
- Redis (optional) — Upstash REST; caches course list and related API responses
- Recharts — charts for grade and stats visuals
- Zod & React Hook Form — forms and validation
🤖 The RAG / chat service is maintained in Coursify-RAG (Python / Flask), not in this repo.
Prerequisites: Node.js 20+ recommended, Supabase CLI for database setup. Local Supabase (supabase start) requires Docker Desktop.
git clone https://github.com/CoursifyQU/Coursify-WebApp.git
cd Coursify-WebApp
npm installCopy .env.example to .env.local and fill in:
| Variable | Required | Where to get it |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Yes | Supabase → Project Settings → API |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Yes | Project Settings → API → Legacy keys tab → anon public |
SUPABASE_SERVICE_KEY |
Yes for uploads & /api/me/* |
Project Settings → API → Legacy keys tab → service_role (server only, never in client bundle) |
UPSTASH_REDIS_REST_URL |
No | Upstash Redis → REST API |
UPSTASH_REDIS_REST_TOKEN |
No | Same |
⚠️ Use the Legacy API keys, not the newer "Publishable / Secret" keys. The publishable keys don't work with the Supabase database API. See.env.examplefor the exact mapping.
If you omit Upstash, the app still runs; API routes will skip caching and hit Supabase more often.
Use your own Supabase project (free tier is fine). Schema and sample data live in this repo under supabase/.
-
Create a project at supabase.com.
-
From this repo, link and apply migrations (install CLI, then log in):
npx supabase login npx supabase link --project-ref YOUR_PROJECT_REF npx supabase db push
-
Seed sample courses and comments:
- Local (Docker):
npm run db:reseed— drops everything, re-applies migrations, and runssupabase/seed.sql. - Remote:
npm run db:seed-remote— same as above but targets your linked Supabase project. - Manual fallback: after
db push, open the Supabase SQL Editor, paste the contents ofsupabase/seed.sql, and run it once.
- Local (Docker):
-
Auth URLs: In Authentication → URL configuration, set Site URL to
http://localhost:3000and add redirect URLhttp://localhost:3000/auth/callback(password reset and email verification use this).
Supabase confirmation links are “confirm on visit”. Some university/work email systems automatically scan links by visiting them, which can accidentally verify users without a real click.
This repo includes an in-app confirmation page (/auth/confirm) that only verifies after a button click.
- In Supabase Dashboard → Authentication → Email Templates → Confirm signup, paste the HTML from
supabase/templates/confirmation.html. - In Authentication → URL configuration, ensure Site URL matches your environment (the template uses
{{ .SiteURL }}):- Local testing:
http://localhost:3000 - Production:
https://www.coursify.ca
- Local testing:
- In Authentication → URL configuration → Additional Redirect URLs, allow both:
https://www.coursify.ca/auth/callbackhttps://www.coursify.ca/auth/confirm
Staying up to date: The schema is stable and changes infrequently. If it does change, maintainers will add new SQL under supabase/migrations/ and update supabase/seed.sql. Contributors just git pull then npm run db:reseed (local) or npm run db:seed-remote (remote) to get the latest schema and data.
npm run devOpen http://localhost:3000. Production build: npm run build then npm start. Validation: npm run lint, npm run typecheck, npm run build.
npm scripts (Supabase): npm run db:start, npm run db:reset, npm run db:reseed, npm run db:seed-remote, npm run db:push (wrap npx supabase …).
Contributions are welcome.
- 🐛 Issues — Open an issue to describe bugs, ideas, or schema/API questions before large changes.
- 🔀 Pull requests — Keep changes focused; match existing patterns (TypeScript, App Router, Supabase usage).
- 🔐 Security — Do not commit real API keys or service role keys; use
.env.exampleas a template only. Never paste secrets in issues or PRs.