This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend.
What I Built
College students often have information scattered across attendance, assignments, exams, notes, and to-do lists. A generic chatbot can give advice, but it does not necessarily understand the student's actual academic situation.
I built Campus Copilot, an AI-powered academic assistant designed around that problem.
It combines deterministic academic logic with an open-weight AI workflow to turn campus context into concrete actions.
What it does
- Dashboard — attendance ring, warnings, deadlines, and today's recommended actions
- Attendance — subject-level attendance, 75% warnings, and skip/attend simulation
- Academics — assignments, exams, and notes CRUD
- Productivity — tasks and study plans ranked by risk and due dates
-
Assistant — contextual chat with structured actions such as:
create_taskstart_study_blockflag_attendance
- Daily Priorities — personalised academic priority planning
- Summarize — converts study material into concise bullet points
- Quiz Generator — generates interactive MCQs with explanations
- Flashcards — generates tap-to-flip Q&A cards
- AI Study Plan — enhances the deterministic study plan with AI recommendations
The key idea is simple: instead of saying "study DSA today", the assistant can use actual attendance risk, deadlines, tasks, and academic context to recommend what the student should do next.
All AI features have graceful rule-based fallbacks when Ollama is unavailable, so the core application remains functional without a GPU.
Demo
Live Demo
Frontend:
https://campus-chatbot-kbkdt49ms-ritikahirwar8168-dev.vercel.app
Backend API:
https://campus-chatbot-bzk0.onrender.com
Demo Login
| Field | Value |
|---|---|
| Username | demo |
| Password | campus |
The seeded demo student is Ritik, a B.Tech CSE semester 5 student with subjects, assignments, exams, notes, and tasks.
Code
GitHub Repository:
https://github.com/ritikahirwar8168-dev/campus-chatbot
The repository contains both the FastAPI backend and React/Vite frontend:
campus-chatbot/
├── backend/
└── frontend/
How I Built It
Campus Copilot is built around Gemma 3 4B, Google's open-weight model, served locally through Ollama during development.
AI stack
- Model: Gemma 3 4B
- Inference: Ollama
- Backend: FastAPI + SQLAlchemy + SQLite
- Frontend: React 18 + Vite 6 + Tailwind CSS 3
- Authentication: JWT + bcrypt
- Deployment: Render + Vercel
The backend keeps the AI integration in a dedicated service:
backend/app/services/ollama_service.py
Prompt templates are separated into:
backend/app/services/prompts.py
The assistant and AI endpoints then use the shared AI service rather than exposing model calls directly to the browser.
Deterministic + AI architecture
I deliberately kept academic calculations deterministic.
For example:
- attendance calculations are handled by application logic
- deadlines and risk ranking are handled by application logic
- study-plan structure is generated deterministically
- AI is used for contextual language generation, summaries, quizzes, flashcards, priorities, and enhanced recommendations
This prevents an LLM from becoming the source of truth for calculations that should be exact.
Graceful fallback
The project is designed to work even when the local model is unavailable.
If Ollama is offline:
- the assistant can fall back to rule-based responses
- AI tools can return fallback behavior
- attendance, academics, productivity, and other core workflows continue to work
This also makes the application practical to demo without requiring a GPU.
Why Does Open Innovation Matter?
Using an open-weight model made the AI layer more transparent and controllable during development.
With Gemma + Ollama, I could:
- run the model locally
- keep the inference architecture under my control
- develop without requiring a hosted proprietary AI endpoint
- isolate the model behind my own FastAPI service
- design deterministic fallbacks instead of making the entire application dependent on an external model API
For an academic assistant, this architecture is particularly useful because the application works with structured student context. The AI is an enhancement on top of the application logic rather than the entire application itself.
The result is a hybrid design:
Student Context
↓
Deterministic Academic Logic
↓
AI Context + Prompts
↓
Gemma via Ollama
↓
Personalised Assistance
My Agent Session
Optional: Add your DevRelay / agent session link here if you have one.
The project was developed with an AI-assisted coding workflow, while keeping the application architecture, deterministic logic, deployment setup, and integration under project control.
Deployment
Frontend — Vercel
The React/Vite frontend is deployed on Vercel.
- Root directory:
frontend - Framework: Vite
- Environment variable:
VITE_API_URL=https://campus-chatbot-bzk0.onrender.com
Live frontend:
https://campus-chatbot-kbkdt49ms-ritikahirwar8168-dev.vercel.app
Backend — Render
The FastAPI backend is deployed on Render.
- Root directory:
backend - Build command:
pip install -r requirements.txt
- Start command:
uvicorn app.main:app --host 0.0.0.0 --port $PORT
Production configuration includes:
OLLAMA_ENABLED=false
CORS_ORIGINS=https://campus-chatbot-kbkdt49ms-ritikahirwar8168-dev.vercel.app
Backend:
https://campus-chatbot-bzk0.onrender.com
Production AI note
The production Render deployment currently has:
OLLAMA_ENABLED=false
because the deployed Render service does not run a local Ollama/Gemma instance.
The application therefore uses its graceful fallback behavior in production. Gemma + Ollama is fully supported for local development and is the open-weight AI technology used to build the AI layer.
Prize Categories
🏆 Best Use of Render — $200
Why this project fits:
Campus Copilot uses Render to host the production FastAPI backend.
The backend is responsible for:
- authentication
- student context
- attendance logic
- academic data
- productivity workflows
- assistant actions
- AI endpoints
- fallback behavior
Render deployment:
Repository: ritikahirwar8168-dev/campus-chatbot
Root Directory: backend
Build: pip install -r requirements.txt
Start: uvicorn app.main:app --host 0.0.0.0 --port $PORT
Live backend:
https://campus-chatbot-bzk0.onrender.com
🏆 Best Use of Gemma — $200
Why this project fits:
Campus Copilot uses Gemma 3 4B, Google's open-weight model, as its primary AI model during local development.
Gemma powers the project's AI-oriented features, including:
- contextual academic assistance
- daily priorities
- summarization
- quiz generation
- flashcard generation
- AI-enhanced study plans
The model is served through Ollama, with the AI integration isolated in:
backend/app/services/ollama_service.py
This keeps the model layer replaceable and prevents direct AI calls from the frontend.
Local setup:
ollama pull gemma3:4b
ollama serve
Architecture
Local / AI-enabled
┌─────────────────────┐ ┌──────────────────────┐
│ React Frontend │ │ Ollama Server │
│ Vite + Tailwind │ │ gemma3:4b │
└────────┬────────────┘ └──────────┬───────────┘
│ │
│ HTTP │ HTTP
▼ │
┌────────────────────────────────────────────────────┐
│ FastAPI Backend │
│ │
│ Routers → Services → ollama_service.py │
│ │ │ │
│ ▼ ▼ │
│ Models Prompts │
│ │ │
│ ▼ │
│ SQLite │
└────────────────────────────────────────────────────┘
Production
┌──────────────────────────┐
│ Vercel Frontend │
│ React + Vite │
└────────────┬─────────────┘
│ HTTPS
▼
┌──────────────────────────┐
│ Render Backend │
│ FastAPI + SQLite │
│ │
│ Deterministic logic │
│ + AI fallback logic │
└──────────────────────────┘
│
└── OLLAMA_ENABLED=false
Key Design Decisions
- AI calls are never exposed directly to the frontend — they go through the backend.
- Ollama configuration lives in environment variables, not hard-coded application logic.
- The AI provider is isolated in
ollama_service.py. - Deterministic logic such as attendance calculations and deadlines is never delegated to AI.
- Every AI endpoint has a graceful fallback when Ollama is offline.
- The application remains usable for core academic workflows without a GPU.
- Frontend and backend are deployed separately using Vercel and Render.
API Highlights
| Area | Endpoint | Purpose |
|---|---|---|
| Auth | POST /api/auth/login |
Login and JWT |
| Attendance | GET /api/attendance |
Subject attendance |
| Attendance | POST /api/attendance/simulate |
What-if simulator |
| Dashboard | GET /api/dashboard |
Academic dashboard |
| Academics | GET /api/academics/assignments |
Assignments |
| Productivity | GET /api/productivity/study-plan |
Study plan |
| Assistant | POST /api/assistant/chat |
Contextual chat |
| Assistant | POST /api/assistant/apply |
Apply recommended action |
| AI | POST /api/ai/summarize |
Summarization |
| AI | POST /api/ai/quiz |
Quiz generation |
| AI | POST /api/ai/flashcards |
Flashcard generation |
| AI | GET /api/ai/daily-priorities |
Daily priorities |
What I Learned
Building Campus Copilot reinforced an important lesson about AI applications:
The best AI feature is not always the part that generates the answer. It is the system that gives the model the right context and knows when not to use the model.
For this project, deterministic academic logic provides the reliable foundation, while Gemma adds natural-language reasoning and personalised assistance on top.
That combination made it possible to build an academic assistant that is useful, explainable, and still functional when the model is unavailable.
Future Improvements
If I continue developing Campus Copilot, I would like to add:
- persistent production database storage
- hosted Gemma inference for production AI features
- richer student-context retrieval
- calendar integration
- notifications for attendance and deadlines
- more personalised study analytics
- stronger evaluation of AI-generated quizzes and study plans
Top comments (0)