A university course recommendation system with a Java Spring Boot backend, React + TypeScript + Vite frontend, and a local Llama LLM for AI-powered course planning.
One command to build and run everything:
./start.shThis will:
- Check that Java, Maven, Node.js, and npm are installed
- Build the backend (
mvn clean package) - Start the Spring Boot backend on
http://localhost:8080 - Install frontend dependencies (if needed)
- Start the Vite dev server on
http://localhost:5173 - Print the URLs and wait — press
Ctrl+Cto stop all services
AICourseGuide/
start.sh # One-command startup script
README.md
images/
CourseGuide/
frontend/ # React + TypeScript + Vite frontend
src/
App.tsx # Main UI (Tailwind CSS, settings modal, workflow panel)
main.tsx # Entry point
App.css # Minimal reset styles
index.html
package.json
...
src/main/java/com/courseguide/
App.java # Spring Boot entrypoint
ApiController.java # Main API endpoints
processors/ # Recommendation and data processors
services/ # Web scraping, LLM, PDF extraction, file storage
dto/ # Data transfer objects (records, enums)
utils/ # Utility classes
...
pom.xml # Maven build file
...
- Java 21+ (backend uses Java 21 features)
- Node.js 18+ and npm (frontend development)
- Maven 3.6+ (backend build)
- MySQL 8.0+ (course database and prerequisite DAG)
- Llama API Server running on http://localhost:8075 (local LLM analysis)
- Optional: Playwright (auto-installed by Maven for web scraping)
-
Compile the backend:
cd CourseGuide mvn clean package -
Run the backend:
java -jar target/courseguide-0.1.0-SNAPSHOT.jar
The backend will start at http://localhost:8080.
-
Install dependencies:
cd CourseGuide/frontend npm install -
Start the development server:
npm run dev
The frontend will be available at http://localhost:5173 and will proxy API requests to the backend.
-
Build for production:
npm run build
- Open http://localhost:5173 for the React frontend.
- Click "How it works — AI Workflow" to see the 6-step pipeline explanation.
- Click the gear icon (top-right) to configure your own LLM API.
The app supports user-defined LLM providers via the settings modal (gear icon in the header).
| Field | Description | Default |
|---|---|---|
| API Base URL | OpenAI-compatible endpoint (e.g., https://api.openai.com/v1) |
http://localhost:8075 |
| API Key | Your provider's API key (stored in browser localStorage only) | — |
| Model Name | Model identifier (e.g., gpt-4o, llama-3.3-70b-versatile) |
Auto-discovered |
Works with any OpenAI-compatible provider: OpenAI, Groq, Together AI, local llama.cpp, Ollama, etc.
The app runs a 6-step AI pipeline when you submit a request:
- Student Profile — Collects university, major, degree level, graduation year, and progress PDF
- Web Search — Queries DuckDuckGo for the university's degree requirements page
- Page Scraping — Uses Playwright to render the page to a PDF snapshot
- PDF Text Extraction — Extracts text from degree requirements and progress PDFs
- LLM Analysis — Sends text to a local Llama model which generates an XML course plan
- Course Selection — Parses the XML, builds a prerequisite graph, and selects up to 6 courses
POST /api/recommendations— Simple recommendations (JSON:{ major, gpa })POST /api/upload-progress— Upload a progress PDF (multipart/form-data)POST /api/recommendations/profile— Rich recommendations (JSON profile, can reference uploaded PDF)POST /api/courses/select— Select courses from XML course planGET /api/health— Health check endpoint
POST /api/progress/case-number— Generate a new unique case numberPOST /api/progress/save/local— Save progress to local SQL databasePOST /api/progress/save/online— Save progress to Supabase (with local fallback)GET /api/progress/load/{caseNumber}?mode=local|online— Load progress by case numberGET /api/progress/list— List all saved progress entriesDELETE /api/progress/delete/{caseNumber}— Delete progress by case numberPOST /api/progress/sync— Sync unsynced local progress to online storageGET /api/progress/sync/status— Get sync status (unsynced count)
The application supports saving and restoring user progress using unique case numbers (uppercase letters + digits).
- Local Mode (Default): Progress is saved to MySQL database
- Online Mode: Progress is synced to Supabase cloud (requires configuration in
application.properties)
Add Supabase credentials to application.properties:
supabase.url=https://your-project.supabase.co
supabase.anon-key=your-anon-keyWhen switching from local to online mode, the system will:
- Detect unsynced local records
- Prompt user to confirm sync
- Upload all unsynced records to Supabase
- Mark records as synced in local database
- Frontend uses ESLint (see
frontend/eslint.config.js) - Styling uses Tailwind CSS (loaded via CDN in
index.html) - Run
npm run lintfromCourseGuide/frontend/to check for issues
