Tag: Backend
44 posts
-
REST at the Protocol Level: Method Semantics, Idempotency, HATEOAS, Content Negotiation and Versioning
REST on HTTP: method semantics, idempotency, Richardson maturity, HATEOAS, negotiation, API versioning, and production patterns—internals-focused.
-
Real-Time Apps with WebSocket and Socket.io: RFC 6455 Frames, Rooms and Redis Scale-Out
Build real-time features with WebSocket: native API, Socket.io, chat patterns, Redis scaling, plus RFC 6455 handshake, frames, text vs binary.
-
How CPython Runs Your Code: Bytecode, the GIL, Reference Counting and the Import System
CPython architecture from AST to ceval, the GIL and concurrency trade-offs, refcount and generational GC, importlib and package rules, plus logging.
-
Logging in Node.js with Winston: Levels, Transports, Formats, Structured Logs and Child Loggers
Logging in Node.js with Winston: log levels, transports, formats, structured logging, error logging, child loggers, and a production setup.
-
Prisma vs Drizzle vs TypeORM vs Kysely: Type Safety, Performance and Migrations Compared
A comparison of TypeScript ORMs like Prisma, Drizzle, and TypeORM covering type safety, performance, and migrations.
-
File Uploads in Express with Multer: Storage Engines, Filters, Limits and Sharp Thumbnails
Handling file uploads in Express with Multer: storage engines, file metadata, type filtering, size limits, error handling, and resizing images into thumbnails with Sharp.
-
Redis Caching Patterns in Node.js: Cache-Aside, Write-Through, Refresh-Ahead and Stampedes
Redis caching in Node.js with working code: cache-aside, write-through, write-behind and refresh-ahead compared, stampede locks, pub/sub invalidation, eviction policy, and what happens when Redis is down.
-
Sending Email from Node.js with Nodemailer: SMTP Services, HTML Templates, Attachments and Pooling
Complete Nodemailer guide for sending emails in Node.js. Learn SMTP, attachments, HTML emails, templates, and building transactional email systems.
-
Hono on the Edge: Routing, Middleware, JWT and Cloudflare Workers Setup
One Hono API for Cloudflare Workers, Deno, Bun and Node.js: routing, middleware and context, JWT auth, request validation, streaming and error handling.
-
Validating Data with Joi: Schemas, Conditional and Async Rules, abortEarly and stripUnknown
Complete Joi guide for data validation in Node.js: schema design, async validation, abortEarly/stripUnknown security tradeoffs.
-
Koa.js APIs: Context, Onion-Model Middleware, Routing, Auth and File Uploads
Building Node.js APIs with Koa: the context object, async onion-model middleware, routing, a REST API example, authentication, file uploads, database access and validation.
-
Running Node.js Projects on Deno 2: npm Compatibility, What Works, and What Breaks
How Deno 2 runs npm packages and Node.js code: npm: specifiers vs package.json, node_modules modes, CommonJS vs ESM rules, lifecycle scripts, native addons, and how the permission model interacts with npm dependencies during a migration.
-
Drizzle ORM in Production: Transactions, Relational Queries vs Joins, Migrations and Pooling
Drizzle ORM in production: transaction isolation levels, relational query vs. join trade-offs, safe migrations, and connection pooling.
-
Elysia on Bun: Type-Safe Routes, Validation, Plugins and End-to-End Types with Eden
Build APIs with Elysia on Bun: routing, TypeBox validation that types your handlers, hooks, plugins, JWT, WebSocket, and Eden Treaty for client-side types.
-
CORS in Express: Allowed Origins, Credentials, Preflight Requests and Dynamic Origins
Configuring CORS in Node.js and Express: why browsers block requests, allowing specific or dynamic origins, cookies and credentials, preflight requests, and per-route settings.
-
TypeScript Error Handling: unknown in catch, Error Subclasses, cause, Result Types and Exhaustive Checks
How to handle errors in TypeScript: narrow unknown catch variables, write Error subclasses that survive instanceof, chain with cause, return Results and prove exhaustiveness.
-
WebSocket vs SSE vs Long Polling
WebSocket, SSE or long polling? Node.js examples of each, SSE for AI streaming, reconnect logic, the WebSocket handshake and frames, and scaling concerns.
-
PocketBase: SQLite Backend with Auth, Realtime Subscriptions, File Uploads and Production Setup
PocketBase in practice: API rules, the JS SDK for CRUD, auth and realtime, file uploads, SQLite limits, and deploying the binary with persistent data.
-
PostgreSQL Query Optimization: pg_stat_statements, EXPLAIN ANALYZE, Indexes and VACUUM
Find slow PostgreSQL queries with pg_stat_statements and EXPLAIN ANALYZE, then fix them with the right indexes, VACUUM, PgBouncer and postgresql.conf tuning.
-
RabbitMQ in Production: Acks, Prefetch, Durability, Quorum Queues and Dead-Lettering
Why RabbitMQ loses or duplicates messages: manual acks, prefetch, durable queues plus persistent messages, publisher confirms, quorum queues and DLX retries.
-
Socket.IO v4 in Production: Rooms, Acks, Missed Events and Redis Scale-Out
How Socket.IO v4 really works: why a raw WebSocket client can't connect, CORS, acks with timeouts, volatile emits, connection state recovery, sticky sessions and Redis.
-
Stripe Payments in Production: Checkout, PaymentIntents, 3DS, Idempotency and Webhooks
Stripe payments that never double-charge or miss orders: Checkout vs PaymentIntents, 3D Secure, idempotency keys, raw-body webhook checks and event ordering.
-
Supabase as a Postgres Backend: Auth, Row Level Security, Realtime, Storage and Edge Functions
Supabase as a Postgres backend: email and OAuth auth, queries with filters and joins, Row Level Security, realtime, storage, Edge Functions and Next.js.
-
Building APIs with NestJS: Modules, DI, DTO Validation, Guards, Interceptors and TypeORM
Build production-grade APIs with NestJS. Covers modules, controllers, services, guards with proper DI, TypeORM (and why synchronize:true is dangerous in production), interceptors, exception filters, and testing.
-
Event Streaming with Kafka: Partitions, Consumer Groups, Dead Letter Queues and Production Config
Build Kafka producers and consumers in TypeScript with kafkajs: partition keys, consumer groups, manual offset commits, dead letter queues and production settings.
-
Microservices Architecture: Service Boundaries, Messaging, Sagas, and Resilience
The honest trade-off between microservices and a monolith, then service decomposition, communication patterns, API gateways, sagas, resilience patterns, tracing and database-per-service.
-
Go Web APIs with net/http: Routing, Middleware, Context, JSON and Database Access
Build production-ready web APIs with Go. Covers net/http, routing, middleware, database access, JSON handling, and deployment best practices.
-
Building a GraphQL API with Apollo: Schema, Resolvers, Mutations, Subscriptions and React Client
Build efficient APIs with GraphQL: schema design, resolvers, queries, mutations, subscriptions, and Apollo Server/Client—with practical TypeScript.
-
HTMX: Server-Rendered Interactivity with hx-get, hx-swap, Triggers and Out-of-Band Swaps
Build modern web apps with HTMX — no JavaScript framework required. Covers hx-get, hx-post, hx-swap, infinite scroll, WebSockets, and server integration.
-
Elasticsearch in Practice: Mapping Design, Analyzers, Shard Sizing and Relevance Tuning
Elasticsearch mapping design, analyzer pitfalls, shard sizing trade-offs, and relevance tuning for production search.
-
MongoDB Schema Design: Embed vs Reference and the Patterns That Follow
MongoDB schema design around access patterns: when to embed vs reference, one-to-few vs one-to-many, bucket, outlier, computed and versioning patterns, indexes, validation, and the trade-offs in write contention and consistency.
-
Deno 2.0: TypeScript Without Config, Permission Flags, npm Compatibility and Built-in Tooling
Run TypeScript on Deno 2.0 without a build step: permission flags, npm packages, deno.json, built-in test and lint tools, a Hono server and Deno Deploy.
-
PostgreSQL vs MySQL: Data Types, JSON, Locking, Replication and When to Use Each
PostgreSQL or MySQL? Compare data types, JSON, full-text search, locking, indexes, replication and extensions to decide which one fits your workload.
-
FastAPI in Production: Pydantic v2, async vs sync Endpoints, Dependency Injection and JWT
A practical FastAPI guide covering Pydantic v2 validation, async vs sync endpoint choice, dependency injection for testability, JWT auth, and the production gotchas each pattern glosses over.
-
Edge Functions with Cloudflare Workers: KV, D1, Caching and Wrangler Deploys
Building Cloudflare Workers that hold up in production: the isolate model, routing, KV consistency, D1 migrations, the Cache API's limits, and Wrangler deploys.
-
Realtime Backends with Convex: Schemas, Queries vs Mutations, Actions and React Hooks
How Convex works: reactive queries, transactional mutations, why actions exist, indexes vs filter, auth checks, file uploads, and scheduling side effects.
-
Adding Auth to Next.js with Clerk: clerkMiddleware, Protected Routes, Webhooks and Orgs
Clerk auth in a Next.js App Router app with @clerk/nextjs v7: clerkMiddleware, auth.protect(), the Show component, verified webhooks for user sync and org roles.
-
Getting Started with Node.js: Install, Setup, and Hello World
Node.js tutorial for beginners: install Node and npm on Windows, macOS, and Linux, run Hello World, use npm scripts, and understand modules, fs and HTTP.
-
TypeScript REST API Project | Express & Layered Architecture
A TypeScript REST API tutorial covering Express, tsconfig, DTOs with Omit/Partial, a router/controller/service/database layering pattern, a consistent ApiResponse envelope, and curl examples for user CRUD.
-
Flask Basics | Get Started with the Python Web Framework
Start with Flask: routes, Jinja2 templates, forms, JSON APIs, sessions, SQLAlchemy and Blueprints, then deploy with Gunicorn and Docker and compare with FastAPI.
-
Django from Scratch: Models, Migrations, Views, URLs, Templates and the Admin
Learn Django from scratch: project layout, models, migrations, function and class-based views, URLs, templates, and the admin site—with runnable examples.
-
Python REST APIs | Build API Servers with Flask and Django
Design RESTful APIs in Python: HTTP verbs, resource URLs, Flask CRUD examples, Django REST Framework, JWT auth, error handling, and production-minded tips.
-
REST vs GraphQL vs gRPC: Picking an API Style by Client, Payload and Latency
How REST, GraphQL and gRPC differ in schema, transport and tooling, with example code, a comparison table and when a hybrid of the three makes sense.
-
API Rate Limiting: Fixed Window, Sliding Log and Token Bucket, and Making Them Atomic in Redis
How fixed window, sliding log, and token bucket rate limiters actually behave, how to make them atomic in Redis, and the proxy, clock, and retry pitfalls that break them in production.