Inspiration
What it does
π Portrait AI β Your AI-Powered Canvas Companion
π Track E Winner β HackTheCoast 2026 | 60+ participants
A smarter way to stay on top of your coursework.
Portrait AI connects directly to your Canvas LMS to give you a unified, intelligent dashboard for managing your academic life. Powered by Google Gemini 2.5 Flash and RAG (Retrieval-Augmented Generation), it turns your syllabi, assignments, and announcements into actionable insights β in real time.
β¨ Features
π Workflow Optimizer Dashboard
- AI-prioritized task list based on assignment weights, due dates, and your major focus
- Grade maintenance tracker with color-coded progress bars per course
- Live AI study suggestions generated from your upcoming deadline load
π Smart Calendar
- Monthly calendar view with all Canvas assignments synced automatically
- Toggle between Start Dates (blue) and Due Dates (red) to plan ahead
- Intelligent start-date estimation based on assignment point values
π Courses Overview
- All enrolled courses at a glance with next upcoming assignment surfaced
- One-click "Ask AI about this class" deep-links to the Portrait AI chatbot with course context pre-filled
- Live grade display pulled directly from Canvas
π’ Announcements Feed
- All course announcements in a single scrollable view
- AI Summarize button β distills any announcement into 2β3 bullet points via Gemini
π€ Portrait AI Chatbot
- Conversational AI with full RAG context over all your course syllabi
- Automatically extracts and indexes PDF syllabi linked within Canvas
- Ask questions like:
- "When is my Calc 2 final?"
- "Who is my English professor?"
- "What should I study tonight?"
ποΈ Architecture
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β React Frontend β
β (Vite + Tailwind CSS + React Router) β
β Dashboard β Calendar β Courses β Chat β Anncts β
ββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β REST API (localhost:8000)
ββββββββββββββββββββββΌββββββββββββββββββββββββββββββ
β FastAPI Backend β
β β
β βββββββββββββββ ββββββββββββββββββββββββββββ β
β β Canvas API β β SQLite Database β β
β β Sync Layer ββββΆβ (courses, assignments, β β
β β (sync.py) β β announcements, meta) β β
β βββββββββββββββ ββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β RAG Engine (rag.py) β β
β β LangChain + Gemini 2.5 Flash β β
β β Syllabus context from DB + PDF extract β β
β ββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
Tech Stack
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, Tailwind CSS, Lucide Icons |
| Backend | Python, FastAPI, Uvicorn |
| Database | SQLite via SQLAlchemy ORM |
| AI / LLM | Google Gemini 2.5 Flash via LangChain |
| Canvas | Canvas REST API (canvasapi) |
| PDF RAG | pypdf + BeautifulSoup for syllabus extraction |
π Project Structure
HackTheCoast/
βββ src/
β βββ pages/
β β βββ Dashboard.jsx # Workflow optimizer + AI suggestions
β β βββ CalendarView.jsx # Monthly assignment calendar
β β βββ CoursesView.jsx # Course cards + grade display
β β βββ AnnouncementsView.jsx# Announcements + AI summarize
β β βββ ChatView.jsx # Portrait AI chatbot
β βββ components/
β β βββ Navigation.jsx # Sidebar navigation
β βββ lib/
β βββ DataContext.jsx # Global state + API fetching
β βββ canvas.js # API client helper
βββ server/
β βββ main.py # FastAPI app + all API routes
β βββ sync.py # Canvas data sync (courses, assignments, announcements)
β βββ rag.py # RAG engine β syllabus Q&A via Gemini
β βββ canvas_api.py # Canvas API wrapper
β βββ database.py # SQLAlchemy models + DB init
β βββ requirements.txt
βββ .env # API keys (not committed)
π API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/courses |
All enrolled courses with next assignment |
| GET | /api/assignments |
Upcoming assignments with smart start dates |
| GET | /api/announcements |
All course announcements |
| GET | /api/suggestions |
AI-generated study suggestions (Gemini) |
| POST | /api/announcements/summarize |
Summarize an announcement with Gemini |
| POST | /api/chat |
RAG-powered Q&A over all syllabi |
| POST | /api/sync |
Manually trigger a Canvas data refresh |
| GET | /api/sync/status |
View last successful sync time |
π§ How the RAG Works
- On startup,
sync.pyfetches all courses from Canvas via the API - For each course, it downloads the syllabus body and follows any linked PDF or Google Docs files, extracting their full text using
pypdf - All syllabus content is stored in SQLite alongside assignments and announcements
- When you ask a question in the chatbot,
rag.pyassembles all course context into a single structured XML prompt and sends it to Gemini 2.5 Flash - Gemini answers with strict rules about not mixing up information between courses
π€ Team
Built at HackTheCoast 2026.
π License
MIT License β feel free to fork and adapt for your own school's Canvas instance.
Built With
- canvas-api
- langchain
- react
- sqlalchemy
- tailwind
Log in or sign up for Devpost to join the conversation.