File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file.
8282## Employer Quick Links
8383- Project brief: ` docs/PROJECT_BRIEF.md `
8484- Resume bullets: ` docs/RESUME_BULLETS.md `
85+ - Web app guide: ` docs/WEB_APP_GUIDE.md `
8586- Security policy: ` SECURITY.md `
8687- Contribution guide: ` CONTRIBUTING.md `
8788- Code of conduct: ` CODE_OF_CONDUCT.md `
Original file line number Diff line number Diff line change 1+ # Web App Guide
2+
3+ ## Overview
4+ ` web_app.py ` provides a beginner-friendly Flask interface for Code Quest.
5+ It teaches Python concepts with:
6+ - One concept per lesson
7+ - Immediate feedback
8+ - Hints and gentle explanations
9+ - Score and progress tracking in session
10+
11+ ## Run locally
12+ ``` bash
13+ cd " /Users/kyleparker/Documents/code game"
14+ pip3 install -r requirements.txt
15+ python3 web_app.py
16+ ```
17+
18+ Open ` http://127.0.0.1:5000 ` .
19+
20+ ## Routes
21+ - ` GET / ` dashboard and progress summary
22+ - ` GET /python ` active lesson page
23+ - ` POST /python ` answer submission + feedback
24+ - ` POST /python/continue ` continue after review-mode
25+ - ` POST /reset ` reset score/progress
26+
27+ ## Where lessons live
28+ Lesson definitions are in ` _python_lessons() ` inside ` web_app.py ` .
29+ Each lesson includes:
30+ - ` title ` , ` concept ` , ` prompt `
31+ - ` checker ` function
32+ - ` hint `
33+ - explanation blocks (` explanation ` , ` gentle_explanation ` , ` solution_breakdown ` )
34+ - ` example ` and ` model_answer `
35+
36+ ## How to add a new lesson
37+ 1 . Add a new ` PythonChallenge ` in ` default_python_challenges() ` in ` game.py ` .
38+ 2 . Add a matching lesson object in ` _python_lessons() ` in ` web_app.py ` .
39+ 3 . Keep explanations beginner-safe and concrete.
40+ 4 . Run tests:
41+ ``` bash
42+ python3 -m unittest discover -s tests -p " test_*.py" -v
43+ ```
You can’t perform that action at this time.
0 commit comments