Skip to content

ibayjimwell/quickrev-file-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  QuickRev AI Generation API

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/


๐Ÿš€ Tech Stack

Python FastAPI Google Gemini

  • FastAPI โ€” High-performance Python API framework
  • Gemini AI โ€” Content generation (reviewers & flashcards)
  • Cloud Storage (Appwrite) โ€” File storage and management
  • Python Controllers โ€” Business logic layer

๐Ÿ“– What This API Does

โœ” 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


๐ŸŒ Base URL

/ (root)

๐Ÿ“š API Endpoints


๐Ÿงพ Generation Endpoints

๐Ÿ“˜ Generate Reviewer

POST /generate/reviewer

Form Data

Field Type Description
file_id string ID of uploaded lesson file
user_id string User identifier

๐Ÿง  Generate Flashcards

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

๐Ÿ“„ Download Reviewer as DOCX

POST /download/reviewer/docx
Field Type Description
reviewer_file_id string Generated reviewer file ID

โ˜๏ธ File Management (Cloud)

๐Ÿ“ค Upload File

POST /cloud/file/upload
Field Type
file file upload
user_id string

๐Ÿ“‚ List Files

GET /cloud/file/list

Query Params:

Param Description
user_id Owner of files
type File type filter (default: original)

๐Ÿ‘ View File

GET /cloud/file/view?file_id=...

๐Ÿ”— File Association

GET /cloud/file/associate?source_file_id=...

Returns generated files related to an original upload.


โŒ Delete File

DELETE /cloud/file/delete?file_id=...&user_id=...

๐Ÿง  How the System Works

  1. User uploads a study file
  2. File is stored in cloud storage
  3. User requests reviewer or flashcards
  4. Backend extracts content
  5. Gemini AI generates structured study material
  6. Files are saved and linked to the original upload
  7. User can download or study online

๐Ÿ›  Running Locally

1๏ธโƒฃ Clone the repository

git clone <repo-url>
cd quickrev-api

2๏ธโƒฃ Create virtual environment

python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

3๏ธโƒฃ Install dependencies

pip install -r requirements.txt

4๏ธโƒฃ Setup Environment Variables

Create a .env file:

GEMINI_API_KEY=your_api_key
APPWRITE_ENDPOINT=your_endpoint
APPWRITE_PROJECT_ID=your_project
APPWRITE_API_KEY=your_key

5๏ธโƒฃ Start server

uvicorn main:app --reload

Server runs at:

http://127.0.0.1:8000

๐ŸŽฏ Who This Is For

  • Students
  • EdTech platforms
  • Learning productivity tools

๐Ÿ”ฎ Future Improvements

  • Quiz mode generation
  • Difficulty-level control
  • Multi-language support
  • User study history
  • PDF export for flashcards

๐Ÿ‘จโ€๐Ÿ’ป Author

Jimwell Ibay Creator & Maintainer

About

Backend engine for generating Reviewers & Flashcards from study files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors