/ Go Engineering / Phase 7 Phase 7 Days 31-35
HTTP APIs with the Standard Library net/http, middleware, JSON contracts, validation, shutdown, and observability
Phase Goal Build production-shaped APIs using net/http before adopting frameworks.
Day 31: HTTP Mental Model & net/http
Request-response lifecycle and HTTP semantics
ServeMux patterns and method-aware routes
Handlers, ResponseWriter commit behavior, and headers
Server timeouts and explicit configuration
Day 32: JSON APIs, Validation & Errors
Decode limits and unknown-field rejection
Transport/domain separation and validation
Consistent problem response envelopes
Status-code decisions and idempotent semantics
Day 33: Middleware, Logging & Request IDs
Middleware as handler composition
Panic recovery boundaries
Structured logging, request IDs, and redaction
CORS, rate-limit placement, and trust proxies
Day 34: Clients, Context & Graceful Shutdown
Configured http.Client and connection reuse
Context propagation through outbound calls
Signals, Server.Shutdown, and draining work
Health, readiness, and dependency checks
Day 35: Mini Project — Community Tool Library API
Tool, member, loan, and maintenance state contracts Define Tool, member, loan, and maintenance state contracts in plain language and explain the problem it solves Trace what the Go compiler or runtime does when Tool, member, loan, and maintenance state contracts is used Write a tiny example, then apply it to a realistic backend task Diagnose the beginner failure mode for Tool, member, loan, and maintenance state contracts and fix it deliberately
Validated JSON, middleware, logs, and request IDs Define Validated JSON, middleware, logs, and request IDs in plain language and explain the problem it solves Trace what the Go compiler or runtime does when Validated JSON, middleware, logs, and request IDs is used Write a tiny example, then apply it to a realistic backend task Diagnose the beginner failure mode for Validated JSON, middleware, logs, and request IDs and fix it deliberately
Graceful shutdown and httptest coverage
Project requirements, constraints & review Define Project requirements, OpenAPI, and operator README in plain language and explain the problem it solves Trace what the Go compiler or runtime does when Project requirements, OpenAPI, and operator README is used Write a tiny example, then apply it to a realistic backend task Diagnose the beginner failure mode for Project requirements, OpenAPI, and operator README and fix it deliberately
Community Tool Library API Build an in-memory standard-library API for librarians to register tools, issue and return loans, quarantine damaged equipment, and expose a privacy-safe public catalog.
net/http only with explicit server limits Illegal loan and maintenance transitions rejected httptest coverage, request tracing, and graceful shutdownAfter this phase, you'll be able to:
Request-response lifecycle and HTTP semantics ServeMux patterns and method-aware routes Handlers, ResponseWriter commit behavior, and headers Server timeouts and explicit configuration Decode limits and unknown-field rejection Transport/domain separation and validation Consistent problem response envelopes Status-code decisions and idempotent semantics You can apply Phase 7 skills in a finished, explainable Go project.