Skip to content

[Syed.Atyab@Codeline.rihal.om] Build a One-Page Feedback Wall (GET-only) #14

Description

@CodelineAtyab

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions