A small Python problem-solving platform built with FastAPI. It serves a browser interface for coding challenges, executes submitted code through the project runner, and stores anonymous progress in JSON files under user_progress/.
The application provides challenge listing, individual challenge pages, profile/progress views, code submission handling, session-based user identification, and a challenge catalog loaded from challenges.py and challenges.json.
Python 3.9 or newer is recommended.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtuvicorn main:app --reloadOpen the local URL printed by Uvicorn. FastAPI's interactive API documentation is available at /docs.
| Route | Purpose |
|---|---|
/ |
Main application page |
/challenges |
Challenge list page |
/challenge |
Challenge page |
/profile |
User progress page |
/api/challenges |
Challenge summaries and completion state |
/static/ |
Browser assets |
Set SESSION_SECRET to a strong random value in production. The code runner executes submitted code, so it must be isolated before the service is exposed to untrusted users. Use process, filesystem, network, time, and memory limits and consider a separate sandbox or container.
main.py contains the API and page routes, challenges.py loads challenge definitions, code_runner.py executes submissions, static/ contains the frontend, and user_progress/ stores local progress files.