- Define routes as files in the `routes/` directory — Dart Frog uses file-based routing like `routes/users/index.dart` for `/users`.
- Use middleware with `handler()` function wrapper for auth, logging, and CORS — apply per-route or globally in `_middleware.dart`.
- Return `Response.json()` for API responses — Dart Frog handles serialization and sets `Content-Type: application/json` automatically.
- Use `RequestContext` to access injected dependencies — register them in middleware via `context.provide<T>()`.
- Use middleware in `_middleware.dart` files for auth, logging, and dependency injection via `context.read<T>()`.
- Return `Response.json()` for JSON APIs. Use proper status codes with `Response(statusCode: 404)`.
- Use `RequestContext` to inject dependencies — register providers in middleware, consume in handlers.
- Organize shared logic in `lib/` and route-specific handlers in `routes/`.