CourseAI Engineering: The Complete Course · Module 10: Backend Engineering · part 76 of 105
Part 76 · Module 10: Backend Engineering

Lesson 2: The parts a real FastAPI service needs

18 min read·13 Oct 2026
Module 10 · Lesson 2 · About 50 minutes · Needs: Lesson 1 (routes, Pydantic models, TestClient); Module 1 (async and await)

The situation

Lesson 1 gave BrightCart's answer engine a front door. Dev now lists what the door still lacks. The chat widget wants the answer word by word, not after a pause. Support wants a request id on every error. The platform team wants health URLs. Priya wants customers to upload a photo of damaged goods. And one heavy client could flood the service.

This lesson adds each piece to one small app and tests it with TestClient, with no server. The running example is Aisha Rahman asking about order 5521: "Can I still return my robot vacuum?" A fake streaming model answers, so nothing here calls a hosted model.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.