Skip to content

Repository files navigation

BoilerSchedule

A course-schedule builder for Purdue University. Search the course catalog, add sections to a weekly calendar, detect time conflicts, and export a printable schedule as PDF or SVG.

Overview

BoilerSchedule is a two-part application:

  • A Go backend loads a scraped snapshot of the Purdue course catalog into an in-memory index and serves it through a small REST API. It also renders the finished schedule to PDF and SVG.
  • A React frontend provides the search, section browser, and weekly calendar, and talks to the backend API.

Course data comes from Purdue's public OData API (api.purdue.io). A Python scraper (purdue_scraper.py) pulls a full term into a JSON file that the server reads at startup; a Fall 2025 snapshot is included.

Features

  • Course search with optional campus and subject filtering.
  • Department and campus listings.
  • Section browser with meeting days, times, locations, and instructors.
  • Weekly calendar view with time-conflict detection.
  • Schedule export to PDF (headless-Chrome HTML rendering or a direct gofpdf layout) and to SVG.
  • Optional student details (name, major, year, email) embedded in exports.

Stack

Backend (Go)

  • net/http with the Gorilla Mux router
  • gofpdf for direct PDF layout
  • chromedp (headless Chrome) for HTML-to-PDF rendering
  • Streaming JSON decode into an in-memory catalog index

Frontend (React)

  • React 19 + Vite
  • Tailwind CSS
  • FullCalendar for the weekly grid
  • Axios, lucide-react, react-hot-toast, jsPDF, html2canvas

Build & Run

Prerequisites

  • Go 1.24+
  • Node.js 18+ and npm
  • Chrome/Chromium available on the host (only needed for HTML-based PDF export)

Production mode

Builds the React app and serves it, plus the API, from the Go server on port 8080:

./run.sh

Then open http://localhost:8080.

Development mode

Runs the backend on port 8080 and the Vite dev server (with hot reload) on port 3000:

./run.sh dev

Running the server directly

# Install dependencies and build the frontend
cd web-react && npm install && npm run build && cd ..

# Serve the built frontend and the API
go run cmd/server/main.go -static web-react/dist

Server flags:

Flag Default Description
-data purdue_courses_fall_2025.json Path to the course-catalog JSON
-addr :8080 HTTP listen address
-static web Directory of static assets to serve

Refreshing course data

purdue_scraper.py fetches a full term from Purdue's OData API and writes purdue_courses_<term>.json:

python3 purdue_scraper.py
# prompts for a term code, e.g. 202510

Point the server at the resulting file with -data.

API

All endpoints are served under /api.

Method Endpoint Description
GET /api/healthz Health check
GET /api/search?q={query}&campus={campus} Search courses
GET /api/departments?campus={campus} List departments
GET /api/campuses List campuses
GET /api/course/{id}/sections?campus={campus} Sections for a course
GET /api/schedule/svg?sections={ids}&width={w}&height={h} Render schedule as SVG
GET /api/schedule/html?sections={ids} Render schedule as HTML
GET /api/schedule/pdf?sections={ids}&format=svg Render schedule as PDF
POST /api/schedule/pdf-from-image Build a PDF from a client-rendered image plus section metadata

Export endpoints accept optional studentName, studentEmail, studentId, major, and year query parameters.

Project structure

cmd/server/            Go server entry point and route wiring
internal/api/          REST handlers, PDF/HTML/SVG rendering
internal/data/         Catalog models and the in-memory store loader
web-react/             React + Vite frontend
purdue_scraper.py      Course-catalog scraper (Purdue OData API)
purdue_courses_fall_2025.json  Bundled Fall 2025 catalog snapshot
run.sh                 Dev/production launcher

Disclaimer

BoilerSchedule is an independent student project and is not affiliated with or endorsed by Purdue University. Course data is sourced from Purdue's public API and may be out of date.

About

Course-schedule builder for Purdue University: search the catalog, build a weekly schedule with conflict detection, and export to PDF/SVG. Go API backend + React frontend.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages