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

  1. On startup, sync.py fetches all courses from Canvas via the API
  2. For each course, it downloads the syllabus body and follows any linked PDF or Google Docs files, extracting their full text using pypdf
  3. All syllabus content is stored in SQLite alongside assignments and announcements
  4. When you ask a question in the chatbot, rag.py assembles all course context into a single structured XML prompt and sends it to Gemini 2.5 Flash
  5. 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

Share this project:

Updates