Backend engine for generating Reviewers & Flashcards from study files
This API powers QuickRev, an AI-assisted study tool that converts uploaded learning materials into:
- 📘 Structured reviewers
- 🧠 Flashcards
It handles file management, content processing, and AI-based generation.
🔗 Frontend App: https://github.com/ibayjimwell/quickrev-app 🌐 Live App: https://quickrev-app.vercel.app/
- FastAPI — High-performance Python API framework
- Gemini AI — Content generation (reviewers & flashcards)
- Cloud Storage (Appwrite) — File storage and management
- Python Controllers — Business logic layer
✔ Upload and manage student files ✔ Extract learning content ✔ Generate structured reviewer notes ✔ Generate flashcards in multiple formats ✔ Convert reviewers into downloadable DOCX files ✔ Associate generated files with original uploads
/ (root)
POST /generate/reviewer
Form Data
| Field | Type | Description |
|---|---|---|
| file_id | string | ID of uploaded lesson file |
| user_id | string | User identifier |
POST /generate/flashcards
Form Data
| Field | Type | Default | Description |
|---|---|---|---|
| file_id | string | — | Source file |
| user_id | string | — | User identifier |
| multiple_choice | int | 10 | Number of MC questions |
| identification | int | 10 | Identification items |
| true_or_false | int | 10 | T/F questions |
| enumeration | int | 10 | Enumeration items |
POST /download/reviewer/docx
| Field | Type | Description |
|---|---|---|
| reviewer_file_id | string | Generated reviewer file ID |
POST /cloud/file/upload
| Field | Type |
|---|---|
| file | file upload |
| user_id | string |
GET /cloud/file/list
Query Params:
| Param | Description |
|---|---|
| user_id | Owner of files |
| type | File type filter (default: original) |
GET /cloud/file/view?file_id=...
GET /cloud/file/associate?source_file_id=...
Returns generated files related to an original upload.
DELETE /cloud/file/delete?file_id=...&user_id=...
- User uploads a study file
- File is stored in cloud storage
- User requests reviewer or flashcards
- Backend extracts content
- Gemini AI generates structured study material
- Files are saved and linked to the original upload
- User can download or study online
git clone <repo-url>
cd quickrev-apipython -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activatepip install -r requirements.txtCreate a .env file:
GEMINI_API_KEY=your_api_key
APPWRITE_ENDPOINT=your_endpoint
APPWRITE_PROJECT_ID=your_project
APPWRITE_API_KEY=your_key
uvicorn main:app --reloadServer runs at:
http://127.0.0.1:8000
- Students
- EdTech platforms
- Learning productivity tools
- Quiz mode generation
- Difficulty-level control
- Multi-language support
- User study history
- PDF export for flashcards
Jimwell Ibay Creator & Maintainer