User Story
As a learner developer I want a minimal “Feedback Wall” so that I can practise:
- FastAPI
- StaticFiles
- JavaScript
fetch()
- JSON handling
- Basic debugging (browser & VS Code)
Technologies in Scope
| Layer |
Stack / Tooling |
| Back-end |
FastAPI, uvicorn, PEP 8 |
| Front-end |
Vanilla HTML + JS (fetch, DOM API) |
| Debugging |
Browser DevTools, VS Code breakpoints |
Acceptance Criteria
| # |
Area |
Requirement |
| 1 |
Back-end |
A GET endpoint /feedbacks returns the complete in-memory feedback dictionary (key = username, value = list[str]) by calling feedback_service.get_allfeedback(). |
| 2 |
Code Style |
Entire codebase conforms to PEP 8 (e.g., two blank lines before top-level functions). Server restarts cleanly without port conflicts. |
| 3 |
Front-end |
index.html is served via FastAPI StaticFiles at root /. On page load it: • calls fetch('/feedbacks') • iterates over Object.keys(result) • builds an unordered list (<ul>) per user, dynamically creating <li> items (no hard-coded <li> in the HTML template). |
| 4 |
Seed Data |
Dummy feedback for users A, B, C is pre-populated. Opening http://localhost:8000/ shows three user sections with the correct messages. |
| 5 |
Debugging |
- Using DevTools, learner can set a breakpoint and inspect result before rendering. - Using VS Code, learner can set a breakpoint inside get_allfeedback() while the virtual environment is active. |
| 6 |
Definition of Done |
PO pulls the branch, runs python main.py, opens the root URL, and sees a dynamically generated feedback wall that exactly matches the dummy data without any console or server errors. |
Suggested Folder Structure (optional)
project/
├── main.py
├── feedback_service.py
├── data_seed.py
├── static/
│ └── index.html
└── requirements.txt
Example JSON Response from /feedbacks
{
"A": ["Great job!", "Consider edge cases."],
"B": ["Refactor variable names.", "Add docstrings."],
"C": ["Excellent tests.", "Optimize query."]
}
Happy coding!
User Story
Technologies in Scope
uvicorn, PEP 8fetch, DOM API)Acceptance Criteria
/feedbacksreturns the complete in-memory feedback dictionary (key = username, value = list[str]) by callingfeedback_service.get_allfeedback().index.htmlis served via FastAPI StaticFiles at root/. On page load it:• calls
fetch('/feedbacks')• iterates over
Object.keys(result)• builds an unordered list (
<ul>) per user, dynamically creating<li>items (no hard-coded<li>in the HTML template).http://localhost:8000/shows three user sections with the correct messages.resultbefore rendering.- Using VS Code, learner can set a breakpoint inside
get_allfeedback()while the virtual environment is active.python main.py, opens the root URL, and sees a dynamically generated feedback wall that exactly matches the dummy data without any console or server errors.Suggested Folder Structure (optional)
Example JSON Response from
/feedbacks{ "A": ["Great job!", "Consider edge cases."], "B": ["Refactor variable names.", "Add docstrings."], "C": ["Excellent tests.", "Optimize query."] }Happy coding!