The engineering notebook
RSS feed#api
Articles, practical guides, and engineering notes on api.
By Ashish Bhakhand 108 published articles
Explore the articles
10 articles
Reset filtersFrom API Response to Flutter Screen: A Complete Feature Pipeline
Follow one Flutter feature through service, model, repository, entity, use case, BLoC, and UI, with a reason for every boundary.
Building Admin APIs with Organization-Scoped RBAC
Design administrative endpoints around explicit permissions, tenant scope, audit trails, and safe response models.
Zod Beyond Basic Parsing: Strict Objects, Defaults, Coercion, and Inferred Types
Practical Zod patterns for safer query strings, configuration, discriminated inputs, and TypeScript contracts without duplicate types.
Multi-Tenant Authorization Requires More Than Checking a JWT
Authentication proves identity. Safe multi-tenant APIs must also scope every resource query and action to the caller's organization.
Designing API Errors: Public Messages, Internal Causes, and Stable Codes
Give clients predictable errors while preserving the technical evidence operators need to diagnose failures.
Practical Pydantic Validation Beyond Basic Field Types
Use strict objects, constrained fields, normalization, literals, and model validators without moving business logic into schemas.
A Production Swift Networking Layer with URLSession
Centralize authentication, envelopes, correlation IDs, decoding, safe diagnostics, and transport error mapping.
Thin FastAPI Routers: What Belongs in an Endpoint?
Use routes as typed HTTP adapters while services own decisions, transactions, and orchestration.
The Lambda Middleware Every Function Should Have
Standardize correlation IDs, safe logs, error responses, and timing once so every Lambda handler starts with reliable operational behavior.