- Use `gin.Context` methods: `c.JSON()` for responses, `c.Bind()` for request parsing, `c.Param()` for URL params.
- Group related routes with `router.Group()` and apply middleware per group — e.g., auth middleware on `/api` group.
- Use `gin.H{}` (alias for `map[string]any`) for ad-hoc JSON responses; use struct types with `json` tags for structured APIs.
- Set `gin.SetMode(gin.ReleaseMode)` in production — debug mode logs every request and disables optimizations.
- Write thin handlers that delegate to services — pass dependencies via constructor injection from main.
- Use `c.ShouldBindJSON(&req)` for request binding with validation tags. Return `c.JSON(status, body)` for responses.
- Organize routes hierarchically with `r.Group()` for API versioning: `/api/v1/users`.
- Apply middleware to specific route groups: `auth := r.Group("/", authMiddleware)` for protected endpoints.
- Test handlers with `gin.SetMode(gin.TestMode)`, `httptest.NewRecorder()`, and `router.ServeHTTP`.