Search
Lessons (30)
- Authentication, Authorization & API Security
… user.role }, process.env.JWT SECRET, { expiresIn: "15m" }); function authenticate(req, res, next) { const token = req.headers.authorization …
- API Contracts, Gateways and Security
Make APIs evolvable and safe with explicit formats, versioning, idempotency, gateway policy, authentication and authorization. ![API boundary: a …
- API Gateway, BFF & Service Discovery
… http://users-svc:8080 plugins: [jwt-auth, rate-limit: { minute: 100 }] - path: /api/orders service: http://orders-svc …
- Premiere-Night Video Streaming
… l6/premiere-streaming.svg) Plane Handles Goal --- --- --- Control Auth, entitlement, manifest, progress Small, stateless, scalable APIs Data Video …
- MVC, MVP & MVVM
… LoginView, private auth: AuthService) {} async onLoginClicked(email: string, password: string) { if (!email.includes("@")) return this.view.showError("Please …
- DBMS Foundations, Keys & Normalization
… What is normalization and why use it? Normalization organizes facts so each fact has one authoritative home. It …
- How a Web Request Works
… The server proves its identity with a certificate signed by a trusted authority, which is the padlock 🔒 in …
- Helm, kubectl Cheat Sheet & Best Practices
… rbac.authorization.k8s.io/v1 kind: Role metadata: { name: read-pods, namespace: team-shop } rules: - apiGroups: [""] resources: ["pods …
- Design a File Storage Service
Upload bytes directly to object storage while the API owns durable metadata, authorization, sharing and synchronization. ![File storage …
- Design a Logging and Monitoring Platform
… and compress logs, metrics and traces to an authenticated ingestion gateway. A durable stream absorbs bursts; processors index …
- System Design Interview Framework
… 5. Define APIs with authorization and idempotency. 6. Deep dive into the hard invariant/bottleneck. 7. Close with …
- Behavioral Patterns II: Chain, Template, Iterator, Mediator, Memento, Visitor
… 2500 }); // "👔 manager approved" mermaid flowchart LR R[Request] -- H1[Logger] -- H2[Rate limiter] -- H3[Auth] -- H4[Route handler …
- Data Structures for Scale
… Never use a Bloom-filter positive as proof of authorization or inventory ownership.
- REST API Design
… critical POSTs - [ ] Versioning strategy decided - [ ] Authentication on every non-public route (see Authentication & Security ) - [ ] Rate limiting (see Scaling …
- Serverless Architecture
… static frontend"] U -- APIG[API Gateway] APIG -- Auth["🔐 Cognito / Auth0"] APIG -- L1["λ orders API"] L1 -- DDB[(DynamoDB …
- Flash Sale: 10 Million Buyers, No Oversell
… reservation returned. No Safe reservation At the inventory authority, decrement only when stock is positive and create an …
- Finding Service Boundaries with DDD
… auth, email, payments"] -- GenHow["Buy / use SaaS"] Put your best engineers and cleanest design into the core ; buy …
- Frontend Security
… The backend must validate and authorise everything again. And never put secrets (API keys with write access, database …
- What Are Design Patterns?
… explaining 50 lines of code. 📘 In 1994, four authors (Gamma, Helm, Johnson, Vlissides, the "Gang of Four" / GoF …
- Domain-Driven Design: Strategic Design
… solved already Buy or use SaaS/open source Auth, payments, email, accounting mermaid quadrantChart title Where to invest …
- Which Pattern Do I Need?
… 🗺️ Strategy — pluggable algorithms (payments, pricing, auth) 7. 🚦 State — order and payment workflows 8. 📞 Chain of Responsibility — request …
- DRY: Don't Repeat Yourself
… piece of knowledge must have a single, unambiguous, authoritative representation within a system." Note the word knowledge . DRY …
- KISS: Keep It Simple, Stupid
… LR GW[API Gateway] -- MS1[User service] & MS2[Auth service] & MS3[Profile service] MS1 -- K[(Kafka)] -- MS2 MS3 …
- Monolith vs Microservices
… becomes a network call needs timeouts, retries, idempotency, authentication, monitoring and versioning. The middle path: the modular monolith …
- REST vs GraphQL vs gRPC
… Fix it with DataLoader , which batches those 50 calls into one WHERE author id IN (...) . GraphQL challenges: HTTP …
- Backend Languages: Node.js, Go, Python & Rust
… included" alternative, with an ORM, admin panel and auth built in. Rust: Axum rust use axum::{extract::Path …
- Behavioral Patterns I: Observer, Strategy, Command, State
… b.age); // sorting strategy passport.use(new GoogleStrategy(...)); // auth strategy (literally named!) Strategy vs Open/Closed: Strategy is …
- Onion Architecture & Clean vs Hexagonal vs Onion
… one emphasises Hexagonal (2005) Onion (2008) Clean (2012) --- --- --- --- Author Alistair Cockburn Jeffrey Palermo Robert C. Martin Main picture …
- Normalization & Denormalization
… Metric for stale/failed projections. Interview-ready answer I normalize to ensure one fact has one authoritative home …
- Vertical Slice Architecture & the Modular Monolith
… Share deliberately Put truly common code (domain entities, auth, logging) in a shared/ or domain/ folder, only once …