Skip to content

ubclaunchpad/Piazza-AI-Plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Piazza AI Plugin 🧠

AI-powered browser extension that enhances the Piazza experience with intelligent features for students and instructors.

πŸ—οΈ Rough High-Level Architecture

Architecture Diagram

πŸ“ Project Structure

Piazza-AI-Plugin/
β”œβ”€β”€ 🌐 frontend/              # Chrome Extension
β”‚   β”œβ”€β”€ manifest.json         # Extension configuration
β”‚   β”œβ”€β”€ content/              # Content scripts (Piazza integration)
β”‚   β”œβ”€β”€ popup/                # Extension popup UI
β”‚   └── background/           # Service worker
β”œβ”€β”€ βš™οΈ backend/               # FastAPI Backend
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/              # API endpoints
β”‚   β”‚   β”œβ”€β”€ core/             # Core functionality (config, database)
β”‚   β”‚   └── models/           # Data models
β”‚   β”œβ”€β”€ main.py               # FastAPI application
β”‚   └── requirements.txt      # Python dependencies
β”œβ”€β”€ πŸ—„οΈ supabase/             # Database & Auth
β”‚   β”œβ”€β”€ migrations/           # Database schema changes
β”‚   β”œβ”€β”€ functions/            # Edge functions
β”‚   └── config.toml           # Supabase configuration
└── πŸ”§ .github/workflows/     # CI/CD pipelines

πŸ”„ Data Flow

  1. User Interaction: User interacts with enhanced Piazza interface through the Chrome extension
  2. Content Processing: Extension captures and processes Piazza content
  3. API Communication: Extension sends requests to FastAPI backend via CORS-enabled endpoints
  4. Knowledge Retrieval: RAG engine searches vector database for relevant context and documents
  5. AI Processing: Backend combines retrieved context with user queries for enhanced AI responses
  6. Embedding Generation: New content is processed into embeddings and stored for future retrieval
  7. Database Operations: User data, analytics, embeddings, and AI responses stored in Supabase
  8. Real-time Updates: Live updates pushed back to extension via WebSocket/polling

πŸš€ Key Features

  • πŸ€– AI-Powered Assistance: Intelligent responses and content analysis
  • πŸ“Š Analytics Dashboard: Usage patterns and learning insights
  • πŸ” Secure Authentication: Supabase-based user management
  • 🌐 Real-time Sync: Live updates across devices and sessions
  • 🎨 Enhanced UI/UX: Seamless integration with Piazza's interface
  • πŸ“± Cross-Platform: Works across different browsers and devices

πŸ› οΈ Technology Stack

Component Technology Purpose
Frontend Chrome Extension APIs Browser integration & UI
Backend FastAPI + Python REST API & business logic
Database Supabase (PostgreSQL) Data persistence & auth
AI Services OpenAI + Anthropic Natural language processing
DevOps GitHub Actions CI/CD & automated testing
Monitoring Supabase Analytics Usage tracking & insights

🎯 Team Structure

  • πŸ‘¨β€πŸ’» 10 Developers: Full-stack development (frontend + backend)
  • πŸ”§ 2 Technical Leads: Architecture oversight & code review
  • 🎨 2 Designers: UI/UX design & user experience

⚑ Quick Start

Prerequisites

πŸš€ Setup Instructions

Follow these guides in order for complete setup:

  1. πŸ“ Backend Setup Guide
cd backend
python -m venv ../venv
source ../venv/bin/activate  # On Windows: ..\venv\Scripts\activate
pip install -r requirements.txt
touch .env
# Edit .env with your configuration

3. Database Setup

cd supabase
supabase start
supabase status  # Copy the keys to backend/.env
  • Local database setup
  • Schema initialization
  • CLI configuration
cd frontend
npm install
npm run dev

⚑ Quick Development Start

# 1. Clone repository
git clone https://github.com/ubclaunchpad/Piazza-AI-Plugin.git
cd Piazza-AI-Plugin

# 2. Setup backend (see backend/README.md for details)
cd backend && pip install -r requirements.txt
touch .env  # Add your environment variables
python main.py

# 3. Setup database (see supabase/README.md for details)
cd ../supabase && supabase start

# 4. Setup frontend (see frontend/README.md for details)
cd ../frontend && ./build.sh
# Load build/ folder in Chrome Developer Mode

πŸ“š Documentation

Setup Guides

Development Resources

πŸ”§ Development Workflow

  1. Create Feature Branch: git checkout -b feature/your-feature-name
  2. Make Changes: Implement your feature with proper testing
  3. Run Tests: npm test (frontend) + pytest (backend)
  4. Commit: Follow conventional commit format
  5. Push & PR: Create pull request for review
  6. Code Review: Requires approval from technical leads
  7. Merge: Squash and merge to main branch

πŸš€ Deployment

  • Backend: Automatic deployment via GitHub Actions
  • Database: Migrations applied via Supabase CLI
  • Extension: Built and packaged for Chrome Web Store

🀝 Contributing

  1. Check Issues for available tasks
  2. Follow the development workflow above
  3. Ensure code follows project style guidelines
  4. Add tests for new functionality
  5. Update documentation as needed

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Built by UBC Launch Pad

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 8