Project Info
ProfAI - AI Professor-in-a-Box
An intelligent course management system that automates syllabus operations, weekly pacing, and student triage using AI-powered multi-agent routing. Think of it as a "TA in a box" that handles routine course questions while intelligently escalating complex issues to the professor.
π― Project Overview
ProfAI is designed to manage course operations rather than just teaching content. It acts as a smart assistant that:
- Answers student questions about course policies, concepts, and schedules
- Automatically triages queries to determine if they need professor attention
- Generates weekly announcements based on course schedules
- Provides insights to professors about student confusions and concerns
The system uses a human-in-the-loop approach where AI handles routine tasks and escalates complex or sensitive issues to the professor.
ποΈ Architecture
Tech Stack
- Framework: Next.js 14+ (App Router) with TypeScript
- Styling: Tailwind CSS + Shadcn/UI components
- Backend: Supabase (PostgreSQL + Auth + Edge Functions)
- AI: Google Gemini via LangChain
- Vector DB: Supabase Vector (pgvector) for RAG
- State Management: React Server Components + useOptimistic for chat
Key Components
-
Multi-Agent Router: Classifies student queries into three categories:
- POLICY (Syllabus questions) β Routes to Syllabus Agent
- CONCEPT (Learning questions) β Routes to Concept Agent
- ESCALATE (Personal/Complex issues) β Creates escalation for professor
-
RAG (Retrieval-Augmented Generation):
- Chunks syllabus and course content into vector embeddings
- Retrieves relevant context for accurate responses
- Provides source citations (e.g., "See Syllabus page 4")
-
Sunday Night Conductor:
- Automated weekly announcement generator
- Reads course schedule and generates week-specific announcements
- Creates drafts for professor review and approval
π Core Features
For Students
Chat Interface
- Ask questions about the course in natural language
- Receive instant responses with source citations
- Get answers about:
- Course policies (deadlines, grading, attendance)
- Course concepts and materials
- Weekly schedules and upcoming assignments
Smart Escalation
- Personal issues (e.g., "I'm sick, can I have an extension?") automatically create escalation tickets
- Students receive confirmation when their query has been escalated
- All sensitive queries are flagged for professor review
For Professors
Professor Dashboard
1. Announcement Drafts Widget
- View automatically generated weekly announcements
- Review and edit before publishing
- Approve announcements to publish them to students
2. Escalation Queue
- See all student queries that need personal attention
- View student name, email, query text, and timestamp
- Resolve escalations after addressing student concerns
3. Pulse Report
- 3-bullet summary of "Top Student Confusions"
- Based on analysis of chat logs
- Helps professors identify topics that need clarification
- Shows total queries and escalation counts
Manual Controls
- Trigger Sunday Night Conductor manually to generate announcements
- View and manage all course content
- Monitor system activity and student engagement
System Features
Intelligent Query Classification
The Agent Router uses AI to classify each student query:
-
POLICY: Questions about syllabus, deadlines, grading policies
- Example: "When is the midterm?"
- Routes to: Syllabus Agent (RAG over syllabus content)
-
CONCEPT: Questions about course material, lectures, concepts
- Example: "Can you explain recursion?"
- Routes to: Concept Agent (RAG over lecture notes/content)
-
ESCALATE: Personal, complex, or sensitive issues
- Example: "I'm having personal issues and need an extension"
- Routes to: Escalation Handler (creates ticket for professor)
Source Citations
Every AI response includes citations:
- "See Syllabus page 4, section 2.3"
- "See Lecture Week 5, slide 12"
- Helps students verify information and find original sources
Strict "I Don't Know" Policy
- If the AI can't find relevant information in the course materials
- If retrieval confidence is low (< 0.7)
- Automatically escalates to professor rather than hallucinating answers
π User Flows
Student Flow
- Login/Signup β Student creates account or logs in
- Onboarding (First-time only) β Professor uploads syllabus PDF and schedule CSV
- Chat Interface β Student asks questions in natural language
- Get Response β Receives answer with citations or escalation confirmation
- View Escalations β Can see status of escalated queries
Professor Flow
- Login/Signup β Professor creates account with professor role
- Course Setup β Upload syllabus PDF and schedule CSV
- Weekly Routine:
- Review and approve Sunday Night Conductor announcements
- Check Escalation Queue for student issues
- Review Pulse Report for insights
- Ongoing Management:
- Resolve escalations
- Edit and publish announcements
- Monitor student questions and confusion patterns
Sunday Night Conductor Flow
- Automated Trigger β Runs every Sunday night (or manually triggered)
- Schedule Analysis β Reads course schedule to determine current week
- Announcement Generation β AI generates week-specific announcement in professor's persona
- Draft Creation β Saves announcement as draft in professor dashboard
- Professor Review β Professor reviews, edits, and approves announcement
- Publication β Approved announcement is published to students
π§ Technical Implementation
Multi-Agent System
User Query
β
Agent Router (Classification)
β
ββββββββββββ¬βββββββββββ¬βββββββββββ
β POLICY β CONCEPT β ESCALATE β
β Agent β Agent β Handler β
β β β β
β RAG over β RAG over β Creates β
β Syllabus β Lectures β Ticket β
ββββββββββββ΄βββββββββββ΄βββββββββββ
β
Response with Citations
Database Schema
- profiles: User accounts (students/professors)
- courses: Course metadata
- course_content: Chunked syllabus/lecture content with vector embeddings
- schedules: Weekly schedule data (from CSV)
- escalations: Student escalation queue
- announcements: Weekly announcements (drafts + published)
- chat_logs: Chat history for analytics
API Endpoints
For Students
POST /api/chat- Send chat message, receive AI responseGET /api/announcements- Get published announcements
For Professors
GET /api/escalations- Get escalation queueGET /api/announcements- Get all announcements (drafts + published)POST /api/announcements- Create announcementPUT /api/announcements/:id- Update/publish announcementPOST /api/conductor- Trigger Sunday Night ConductorGET /api/pulse- Get pulse report data
Shared
POST /api/upload- Upload syllabus PDF and schedule CSV
π οΈ Development Setup
Prerequisites
- Node.js 18+ and npm
- Supabase account
- Google Cloud account (for Gemini API)
Installation
-
Clone the repository
git clone https://github.com/A5bhinav/SyllabusOS.git cd SyllabusOS -
Install dependencies
npm install -
Set up environment variables
Copy
.env.exampleto.envand fill in your credentials:# Supabase Configuration NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key # Google Gemini AI Configuration GOOGLE_GENAI_API_KEY=your_google_gemini_api_key # Application Configuration MOCK_MODE=false # Set to true for development (saves API costs) DEMO_MODE=false # Set to true to mock system time to Week 4 DEMO_WEEK=4 -
Set up Supabase
- Create a new Supabase project
- Run database migrations (see
supabase/migrations/) - Enable pgvector extension
-
Run development server
npm run devOpen http://localhost:3000 in your browser.
π§ͺ Development Modes
Mock Mode
Set MOCK_MODE=true in your .env file to:
- Skip actual API calls to Gemini
- Return mock responses for testing
- Save costs during development
- Test UI without API dependencies
Demo Mode
Set DEMO_MODE=true and DEMO_WEEK=4 to:
- Mock system time to a specific week
- Test Sunday Night Conductor logic
- Demo the app without waiting for real time
π Project Structure
ProfAI/
βββ app/ # Next.js App Router
β βββ api/ # API Routes
β β βββ chat/ # Chat endpoint
β β βββ upload/ # File upload handler
β β βββ conductor/ # Sunday Night Conductor trigger
β β βββ escalations/ # Escalation CRUD
β β βββ announcements/ # Announcement CRUD
β β βββ pulse/ # Pulse report data
β βββ (auth)/ # Auth routes
β βββ (dashboard)/ # Dashboard routes
β β βββ student/ # Student dashboard
β β βββ professor/ # Professor dashboard
β βββ layout.tsx # Root layout
βββ components/ # React components
β βββ ui/ # Shadcn/UI components
β βββ student/ # Student-specific components
β βββ professor/ # Professor-specific components
β βββ shared/ # Shared components
βββ lib/
β βββ agents/ # Multi-agent router
β β βββ router.ts # AgentRouter (classifies queries)
β β βββ syllabus-agent.ts # POLICY agent
β β βββ concept-agent.ts # CONCEPT agent
β β βββ escalation-handler.ts # ESCALATE handler
β βββ rag/ # RAG implementation
β β βββ vector-store.ts # Vector store client
β β βββ chunking.ts # Document chunking logic
β β βββ retrieval.ts # Retrieval logic
β βββ conductor/ # Sunday Night Conductor
β β βββ sunday-conductor.ts
β βββ ai/ # AI client abstraction
β β βββ client.ts # Gemini AI client
β β βββ langchain-setup.ts
β βββ supabase/ # Supabase client setup
β β βββ client.ts # Client-side client
β β βββ server.ts # Server-side client
β βββ utils/ # Utility functions
βββ supabase/
β βββ migrations/ # Database migrations
β βββ functions/ # Edge Functions
β βββ sunday-conductor/
βββ types/ # TypeScript types
βββ docs/ # Project documentation
π Use Cases
Example 1: Policy Question
Student asks: "When is the midterm exam?"
System response:
- Agent Router classifies as POLICY
- Routes to Syllabus Agent
- Retrieves relevant syllabus section via RAG
- Returns: "The midterm exam is scheduled for October 15th, 2024. See Syllabus page 8, section 4.2."
Example 2: Concept Question
Student asks: "Can you explain how binary search works?"
System response:
- Agent Router classifies as CONCEPT
- Routes to Concept Agent
- Retrieves relevant lecture content via RAG
- Returns: "Binary search is a divide-and-conquer algorithm... See Lecture Week 6, slide 15."
Example 3: Escalation
Student asks: "I'm experiencing a family emergency and won't be able to submit the assignment on time."
System response:
- Agent Router classifies as ESCALATE
- Routes to Escalation Handler
- Creates escalation ticket in database
- Returns: "I understand your situation. Your request has been escalated to the professor for review. You'll receive a response within 24-48 hours."
Example 4: Sunday Night Conductor
Every Sunday at 11 PM:
- System checks course schedule
- Determines it's Week 5
- Generates announcement: "Welcome to Week 5! This week we'll be covering recursion and data structures. Don't forget the assignment is due Friday at 11:59 PM..."
- Saves as draft for professor review
- Professor approves and publishes Monday morning
π€ Team Workflow
This project is designed for a 2-person team:
- Lead Architect (Backend): Multi-Agent Router, RAG implementation, Sunday Night Conductor logic
- UI/UX Specialist (Frontend): Student/Professor Dashboards, Escalation Queue UI, component design
The architecture allows parallel development with clear API contracts.
π License
ISC
π Acknowledgments
Built with Next.js, Supabase, Google Gemini, and LangChain.
Analysis
View
Metric
- 59
- 59
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- JavaScriptIn code
- LangChainIn code
- Next.jsIn code
- ReactIn code
- SQLIn code
- SupabaseIn code
- Tailwind CSSIn code
- TypeScriptIn code
- Google GeminiClaimed
9 of 10 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
967 KB
Source files
157
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
A5bhinav/SyllabusOS
168 files Β· 1.6 MB Β· @ 33d7fc4
Structure
Interface
53 files Β· 32%Screens, components and styles rendered to the user.
+1 moreAPI & routing
31 files Β· 18%Request entry points: routes, handlers and controllers.
Application logic
37 files Β· 22%Domain rules, services and shared utilities.
+4 moreData & schema
16 files Β· 10%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here β open the file browser to check anything the diagram implies.
Languages
- TypeScript83%
- Markdown13%
- SQL3%
- JavaScript1%
- CSS0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm Β· 41- @hookform/resolvers
- @langchain/google-genai
- @radix-ui/react-dialog
- @radix-ui/react-label
- @radix-ui/react-scroll-area
- @radix-ui/react-slot
- @radix-ui/react-switch
- @radix-ui/react-toast
- @supabase/ssr
- @supabase/supabase-js
- @types/cheerio
- @types/fluent-ffmpeg
- @types/node
- @types/react
- @types/react-dom
- axios
- cheerio
- class-variance-authority
- +23 more
Declared in the repositoryβs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This projectβs features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.