Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASL backend

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.

API endpoints

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
}

Run locally

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 --debug

The server listens on http://127.0.0.1:5000.

Project structure

app/
├── __init__.py    # Creates the Flask app instance
└── routes.py      # All route definitions
requirements.txt   # Pinned dependencies (Flask 3.x)

Security

This repository uses gitleaks for automatic secret scanning on every commit.

Pre-commit hook

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

Setup

To enable the pre-commit hook locally:

pip install pre-commit
pre-commit install

Bypass (emergency only)

In case of emergency, you can bypass the hook:

git commit --no-verify -m "emergency commit"

Only use --no-verify in emergency situations. Regular commits should always be scanned.

About

🔧 ASL Backend - Flask API for the ASL learning platform

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages