{"repo": "aclarke500/queens-schedule-verification", "files": {"README.md": {"f13d1db0f2a4bb33766380275b25271e50f9b662": {"t": 1786068580.7782888, "n": 4605, "h": "6de354490d78c42f", "c": "# 🧠 Schedule Verifier\n \n\n\n---\n\n## 🧠 Overview\n\nThis project is your AI-powered co-pilot for navigating Queen’s CS course planning. It combines OCR, LLM reasoning, and a custom RAG pipeline to help students—especially frosh—verify their schedules, understand program requirements, and get answers to major-specific academic questions. Off-topic? The chatbot has a personality and will *gently* troll you back.\n\n## 🚀 Try It Out\n\n👉 [https://queens-schedule-analyzer.netlify.app](https://queens-schedule-analyzer.netlify.app/)\n\n---\n\n## 🔍 Features\n\n- **Agentic Chatbot** – Built with **LangChain**, **OpenAI GPT-4o**, and **DeepSeek**, enabling contextual multi-turn conversations with memory and reasoning\n- **Agentic Context Retrieval** – Uses LLMs to dynamically decide what types of context (RAG, structured data, course plans) to retrieve per message\n- **Supabase Vector DB** – Custom **cosine similarity** search via `rpc()` function\n- **LLM-Orchestrated Data Access** – Course plans, options, and program data queried only when relevant, using structured planning LLMs\n- **Document AI Integration (GCP)** – Extracts text from student schedules via OCR\n- **LLM-Powered Correction Pipeline** – Fixes formatting and semantic errors in OCR output before validation\n- **Schedule Validator** – Automatically flags missing or invalid courses for a student’s specific major and year\n- **Vue.js Frontend** – Responsive chat interface with file uploads and real-time feedback\n- **Flask Backend** – Handles embeddings, Supabase access, and LLM orchestration logic\n- **CI/CD via Render** – Auto-deployments with environment-based secrets for fast iteration and testing\n\n\n## 🛠️ Technologies Used\n\n### 🧩 Backend\n- **Python** – primary backend language\n- **Flask** – lightweight API server for chatbot, RAG, and OCR pipelines\n- **Supabase** – free Postgres vector DB with custom RPC for similarity + filtering\n- **Google Cloud Document AI** – OCR engine for extracting course text from images\n- **OpenAI GPT-4o / DeepSeek** – used for reasoning, chunking, and parsing academic data\n- **LangChain** – for output schema enforcement, prompt pipelines, and LLM chaining\n\n### 🎨 Frontend\n- **Vue.js** – dynamic SPA for chat, upload, and user interaction\n- **Vite** – ultra-fast bundler for dev & production\n\n### ⚙️ DevOps\n- **Render** – free-tier hosting with GitHub CI/CD integration\n- **Netlify** - free-tier hosting with GitHub CI/CD integration\n- **.env-based secrets** – secure management of OpenAI, Supabase, and GCP keys\n\n---\n\n## Getting Started (Local Development)\n\n### Prerequisites\n\n- Python 3.10+\n- Node.js 18+\n- Google Cloud Service Account JSON key\n- OpenAI API key\n\n## 🛠️ Backend Setup\n\nTo run the backend locally:\n\n1. **Clone the repo** and navigate to the backend directory:\n\n ```bash\n cd backend\n pip install -r requirements.txt\n ```\n\n2. **Create .env file** with your api keys:\n ```bash\n open_ai_key=your_openai_key\n gcp_project_id=your_gcp_project_id\n gcp_location=your_gcp_location\n gcp_processor_id=your_gcp_document_ai_processor_id\n db_pass=your_database_password\n supabase_url=https://your-project.supabase.co\n supabase_service=your_supabase_service_role_key\n deepseek_key=your_deepseek_api_key\n ```\n\n3. **Setup Python in a virtual environment:**\n ```bash \n python -m venv venv\n source venv/Scripts/activate # On Windows\n pip install -r requirements.txt\n ```\n\n4. **Run Flask API:**\n ```bash\n python app.yp\n ```\n\nMake sure your Supabase project is set up with the expected schema and RPC functions. Frontend will connect automatically using the configured endpoints.\n\n## Database Schema\n\n![Database Schema](./db_schema.png)\n\n\n\n\n\n### Frontend\n\n```bash\ncd frontend\nnpm install\nnpm run dev\n```\n\n## Frontend Environment Variables\nAdd a .env with these variables inside your frontend directory\n```bash\nVITE_DEV=true\nVITE_DEV_URL=http://127.0.0.1:5000\nVITE_API_URL=http://localhost:5000\nVITE_PROD_URL=https://your_deployment_url.ca\n```\n\n---\n\n## Deployment\n\n- **Render Web Service (backend)**: uses Gunicorn and auto-builds with requirements.txt and Procfile\n- **Netlify or Render Static Site (frontend)**: deploys from `dist/` after `npm run build`\n\n---\n\n## Use Case\n\nThis application was built to support incoming Queen’s University students in verifying their academic schedules. By combining OCR, LLM-based parsing, and domain-specific logic, it ensures students have clear and accurate access to their course information.\n\n---\n\n## License\n\nMIT License\n"}}}}