The engineering notebook
RSS feedGood software.
Lessons from building it.
Deep dives into Flutter and Dart, with notes from across the stack. Architecture, backend systems, cloud, and AI - from the work behind the code.
By Ashish Bhakhand 108 published articles
All articles
108 articles
FastAPI Lifespan: Managing Databases, Schedulers, and Shared Clients
Give long-lived resources clear startup and shutdown ownership instead of constructing them inside requests.
MongoDB Behind a Repository Boundary
Keep ObjectIds, query documents, and persistence models out of business logic while preserving the capabilities MongoDB is good at.
Consuming Server-Sent Events in Swift Without Breaking Cancellation
Parse typed SSE frames, expose AsyncSequence events, and stop network and reducer work when the user leaves.
Why I Use Freezed and json_serializable for Different Jobs
Separate API payloads from domain objects in Flutter while using json_serializable for wire data and Freezed for immutable application models.
Room Versus DataStore: Choose Storage by Data Shape
Use DataStore for preferences and Room for relational, queryable, migratable application data.
Fail Fast with Pydantic Settings
Validate environment variables, production transport security, and operational limits once during startup.
Designing API Errors: Public Messages, Internal Causes, and Stable Codes
Give clients predictable errors while preserving the technical evidence operators need to diagnose failures.
Hilt Versus Koin: Why Compile-Time Dependency Validation Matters
Choose dependency injection by failure mode, graph visibility, startup cost, and the team's need for Android integration.
Why Automatic Retries Are Dangerous for Swift API Clients
Retry transient reads with bounded jitter while protecting writes from duplicate business effects.