|
Download replit.md from Mr-67/MathQ: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/spaces/Mr-67/MathQ/resolve/main/replit.md
- Command line
-
hf download hf://spaces/Mr-67/MathQ/replit.md
-
curl -L -o replit.md https://huggingface.co/spaces/Mr-67/MathQ/resolve/main/replit.md
1.57 kB
| # Math Quiz App | |
| A multiplication quiz web application built with Python Flask. | |
| ## Overview | |
| Users configure a quiz (number range, question count, difficulty), answer timed multiplication questions, and view results on a leaderboard. | |
| ## Architecture | |
| - **Backend**: Python 3.12 + Flask | |
| - **Frontend**: Jinja2 HTML templates (server-side rendered) | |
| - **Storage**: `leaderboard.json` file (local JSON file for scores) | |
| ## Project Structure | |
| ``` | |
| main.py # Flask app with all routes | |
| templates/ | |
| configure_quiz.html # Quiz setup form | |
| quiz.html # Question page with countdown timer | |
| summary.html # End-of-quiz results | |
| submit_score.html # Score submission form | |
| leaderboard.html # Leaderboard display | |
| index.html # (unused) | |
| leaderboard.json # Persisted leaderboard data (auto-created) | |
| ``` | |
| ## Routes | |
| - `GET/POST /` β Configure quiz (number range, difficulty, question count) | |
| - `GET/POST /quiz` β Active quiz with per-question countdown timer | |
| - `GET/POST /summary` β Quiz results summary | |
| - `POST /submit_score` β Save score to leaderboard | |
| - `GET /leaderboard` β View all scores | |
| ## Running | |
| **Development:** `python main.py` (Flask dev server on port 5000) | |
| **Production:** `gunicorn --bind=0.0.0.0:5000 --reuse-port main:app` | |
| ## Dependencies | |
| - `flask` β Web framework | |
| - `gunicorn` β Production WSGI server | |
| ## Workflow | |
| - Workflow: `Start application` β `python main.py` on port 5000 (webview) | |
| ## Deployment | |
| - Target: autoscale | |
| - Run: `gunicorn --bind=0.0.0.0:5000 --reuse-port main:app` | |