ClassLensPortal / README.md
Yu Chen
docs: document development deployment flow
2b22f0f
|
Raw
History Blame Contribute Delete
3.83 kB
---
title: ClassLens
emoji: ๐Ÿ“Š
colorFrom: green
colorTo: pink
sdk: docker
license: mit
---
# ๐Ÿ“Š ClassLens
**AI-powered exam analysis that transforms Google Form quiz responses into beautiful, actionable reports for teachers.**
## โœจ Features
- ๐Ÿ”— **Google Forms Integration**: Paste your Google Form response sheet URL
- ๐Ÿ“ˆ **Automatic Grading**: Compare student answers to your answer key
- ๐Ÿ“Š **Visual Statistics**: Interactive charts showing score distribution and per-question accuracy
- ๐ŸŽฏ **Detailed Explanations**: Bilingual (English + ไธญๆ–‡) explanations for each question
- ๐Ÿ‘ฅ **Peer Learning Groups**: AI-suggested groupings for collaborative learning
- ๐Ÿ“ง **Email Reports**: Send beautiful HTML reports directly to your inbox
- ๐ŸŽจ **Beautiful Reports**: Dark theme with Chart.js visualizations
## ๐Ÿš€ How to Use
1. **Paste your Google Form URL** (the response spreadsheet, not the form itself)
2. **Provide your email** (for receiving the report)
3. **Optionally add answer key** if not embedded in the form
4. **Click analyze** and watch the AI work!
## ๐ŸŒฟ Development and Deployment Workflow
GitHub is the source of truth for development. The two long-lived branches have separate deployment targets:
| GitHub branch | Automation | Destination | Purpose |
|---|---|---|---|
| `staging` | GitHub Action `deploy-hf-staging.yml` | [Hugging Face Space](https://huggingface.co/spaces/taboola-cz/ClassLensPortal) | Preview and acceptance testing |
| `main` | GCP Cloud Build trigger `class-lens-portal-main` | [Cloud Run production](https://class-lens-portal-370359340770.asia-east1.run.app) | Production |
```text
feature branch โ†’ staging โ†’ Hugging Face preview
โ†“ approve
main โ†’ GCP Cloud Run production
```
### Standard change flow
1. Update local `staging`, then create a feature branch:
```bash
git switch staging
git pull origin staging
git switch -c feature/<short-name>
```
2. Commit and push the feature branch, then open a pull request into `staging`.
3. After merge, GitHub automatically pushes `staging` to the HF Space for review.
4. Once the HF preview is approved, open and merge a pull request from `staging` into `main`.
5. The GCP trigger builds the root `Dockerfile`, stores the image in Artifact Registry, and updates only the Cloud Run service `class-lens-portal`.
### Deployment boundaries
- Only `staging` updates the HF Space; pushes to `main` do not run the HF workflow.
- Only `main` updates GCP production; feature and `staging` pushes do not deploy to Cloud Run.
- `class-lens-portal` has its own Cloud Run service, trigger, image path, and Secret Manager resources. It does not update `sel-chat-coach`.
- GitHub stores the HF write credential as the `HF_TOKEN` Actions secret. Runtime credentials remain in GCP Secret Manager and must never be committed.
## ๐Ÿ” Privacy
- Student names are displayed in full in reports for internal teacher use
- No data is stored permanently
- OAuth tokens are encrypted
## ๐Ÿ› ๏ธ Tech Stack
- **Frontend**: React + Vite + TailwindCSS
- **Backend**: FastAPI + OpenAI ChatKit
- **Charts**: Chart.js
- **AI**: GPT-4.1-mini
## ๐Ÿ“ Example Report Sections
### ๐Ÿ“ Q&A Analysis (้กŒ็›ฎ่ฉณ่งฃ)
- Reading passages with highlighted key terms
- Per-question explanations with concept tags
- Common mistakes and solving strategies
### ๐Ÿ“Š Statistics (ๆˆ็ธพ็ตฑ่จˆ)
- Score distribution bar chart
- Question accuracy doughnut chart
- Individual student performance table
### ๐Ÿ‘ฉโ€๐Ÿซ Teacher Insights (ๆ•™ๅธซๅปบ่ญฐ)
- Overall performance analysis
- Teaching recommendations
- AI prompt for next quiz generation
- Individual student support suggestions
---
Built with โค๏ธ by [taboola-cz](https://huggingface.co/taboola-cz) for educators