Flask backend for the ASL webapp. It currently provides a health check route and a placeholder question endpoint that returns an empty question payload for a given level, ready to be filled with real quiz data.
| Method | Route | Description |
|---|---|---|
| GET | / |
Returns a hello world message |
| GET | /index |
Same handler as / |
| GET | /question/<level> |
Returns the question for a level as JSON. Placeholder for now: all fields are null |
The question response has this shape:
{
"question": null,
"options": null,
"optionCount": null,
"xpOnSuccess": null
}Requires Python 3.
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS and Linux
pip install -r requirements.txt
flask --app app run --debugThe server listens on http://127.0.0.1:5000.
app/
├── __init__.py # Creates the Flask app instance
└── routes.py # All route definitions
requirements.txt # Pinned dependencies (Flask 3.x)
This repository uses gitleaks for automatic secret scanning on every commit.
A pre-commit hook is configured to scan for secrets before each commit. This helps prevent accidentally committing sensitive information like:
- API keys
- Passwords
- Tokens
- Private keys
To enable the pre-commit hook locally:
pip install pre-commit
pre-commit installIn case of emergency, you can bypass the hook:
git commit --no-verify -m "emergency commit"Only use
--no-verifyin emergency situations. Regular commits should always be scanned.