This commit is contained in:
Timothy Jaeryang Baek
2025-09-18 23:23:09 -05:00
parent 024c0beda4
commit 36eb2b9ed3
8 changed files with 47 additions and 14 deletions
+47
View File
@@ -0,0 +1,47 @@
# 🃏 Simple Flashcard Display API
A lightweight FastAPI service to display interactive flashcards in the browser.
## 🚀 Quickstart
```bash
# Clone the repo
git clone https://github.com/open-webui/openapi-severs
cd openapi-servers/servers/flashcards
# Install dependencies
pip install -r requirements.txt
# Run the server
uvicorn main:app --host 0.0.0.0 --reload
```
Your API is now live at:
👉 `http://localhost:8000`
## 📚 Usage
Send a POST request to `/display` with JSON payload:
```json
{
"title": "My Flashcards",
"description": "Practice questions",
"cards": [
{ "front": "What is 2 + 2?", "back": "4" },
{ "front": "Capital of France?", "back": "Paris" }
]
}
```
The server will return a clean, interactive HTML page where you can:
- Flip cards to reveal answers
- Navigate with Previous/Next buttons
- View progress with a counter
## 🌐 Endpoints
- `GET /` → Home page with instructions
- `POST /display` → Display your flashcards
---
Perfect for AI-generated learning tools, quizzes, or study helpers. 🎓✨