Omid Farhang

@omid.dev

A Full Stack Developer, Husband, Fish Keeper as hubby, In Love with Linux Systems, Cannot live without Coffee | https://omid.dev | @omidfarhang@mastodon.social | امید فرهنگ

“Just add JWT” to localStorage ships. It demos well. And it trains teams to treat the browser as a safe vault. If JS can read your access token, so can XSS. OIDC + BFF / reverse proxy, short-lived server-side tokens, HttpOnly cookies: g.omid.dev/R3Guo03

Modern Auth Patterns for Angular Frontends (Beyond “Just Add JWT”)

Stop storing JWTs in localStorage. Use OIDC with a BFF or reverse proxy, short-lived server-side tokens, HttpOnly cookies, and Angular interceptors and guards that do not pretend to be your security b...

g.omid.dev

Angular PWAs make offline easy. Security doesn’t get the same one-liner. A long-lived cache can sit between an attacker and private data if you store everything. HTTPS + narrow SW scope, cache public shells not auth APIs, clear caches on logout: g.omid.dev/oWtGa46

Securing Angular PWAs in 2026

Security for Angular Progressive Web Apps: HTTPS and service worker scope, cache strategies that do not leak auth-dependent data, and offline sessions without raising XSS or CSRF risk.

g.omid.dev

Angular apps sit on CLI + a pile of third-party libs. Real risk often lives in a transitive package, not your component tree. Pipeline: SBOM every CI run → npm audit + ng update --dry-run → fail on high CVEs → notify Slack/Mastodon. g.omid.dev/RK3K05K

Dependency Risk, SBOMs, and Automated Security for Angular

Build an SBOM and CI security pipeline for Angular monorepos: npm audit, ng update --dry-run, fail on high-severity CVEs, Dependabot/Snyk, and post summaries to Slack or Mastodon.

g.omid.dev

Angular sanitizes. That’s necessary and still not enough. CSP is the browser seatbelt — but Angular injects styles at runtime, so you need per-request nonces, report-only first, then drop unsafe-*. Practical path + companion scanner: g.omid.dev/cr5Zz8o

Content Security Policy (CSP) and Angular: Practical Patterns

Ship CSP for Angular without breaking the build: report-only first, nonces via autoCsp or ngCspNonce, nginx/Apache/Cloudflare headers, and a small scanner for inline handlers, eval, and other footguns...

g.omid.dev

TypeScript 7 is here: big speed gains, but adoption won't be even. Angular template checking, Vue, Astro, Svelte, and editor plugins still depend on the older TypeScript API path. My read: trial TS 7 in CI first, then editors, then framework tooling. g.omid.dev/PcBczud

TypeScript 7 Is Here: Fast, Exciting, and Worth Watching

TypeScript 7's native port delivers dramatic build-time speedups, but editor plugins, framework tooling, and monorepo workflows are catching up at different speeds. A practical read for teams deciding...

g.omid.dev

Part 2 of my Split AI Workflow series: local AI on Manjaro. Ollama + Aider + Cline for scoped refactors and monorepo chores. Cursor cloud when 7B models get stuck. Install steps, CUDA, honest limits, troubleshooting — no subscription hype. g.omid.dev/d1OsiXZ

Local AI on Manjaro: Ollama, Aider, and Cline Without Another Subscription

A follow-up to the split Cursor workflow: install Ollama on Manjaro with CUDA, pull coding models, wire up Aider and Cline for scoped local work — with honest limits on tool reliability, privacy, and ...

g.omid.dev

Cursor Pro runs out fast if you treat it like ChatGPT. My split workflow: • ChatGPT → plan • Claude → review • Ollama → cheap tasks • Cursor → apply diffs New post: quota myths, local models on Linux, why RAM beats the NPU badge. g.omid.dev/CJUh3R5

How to Stretch Cursor Pro Further: A Split AI Workflow

Cursor Pro is best when it edits code, not when it thinks out loud. A practical split workflow — ChatGPT for planning, Claude for review, Ollama for cheap tasks, and Cursor for multi-file execution — ...

g.omid.dev

Most teams have load tests + monitoring. Fewer break one dependency on purpose and ask: does checkout still complete? Or does the browser silently confirm $0?

Checkout passes every test. Payment API returns empty body after 30s → UI confirms $0. Chaos engineering: when this fails, does the system absorb it? 3-part series (frontend + backend) + live checkout lab: g.omid.dev/qxPpL9v

Chaos Engineering: Principles and Practice

What chaos engineering is, how it differs from load testing and disaster recovery, the experiment loop, blast-radius controls, and game days — before you fault-inject backend services or browser apps.

omid.dev

A scalable frontend testing strategy starts with risk, not test types. What mistake are you trying to catch? That question tells you whether the test belongs in unit, component, integration, or E2E coverage. New: How to build a frontend testing strategy that actually scales. g.omid.dev/PUSlWc0

How to Build a Frontend Testing Strategy That Actually Scales

A practical frontend testing strategy for large teams: how to choose between unit, integration, component, and end-to-end tests in a real Angular codebase without creating slow, fragile coverage.

g.omid.dev

Flaky frontend tests are usually not random. They are tests depending on something they do not control: time, network, shared state, changing data, animations, or CI performance. New post: why frontend tests flake and how to fix them for good. g.omid.dev/8ECJvZO

Why Your Frontend Tests Flake and How to Fix Them for Good

A practical guide to reducing flaky frontend tests by improving isolation, waiting strategies, deterministic fixtures, test data, clocks, network control, and CI diagnostics.

g.omid.dev

TIL: not all “CLI bugs” are bugs. Spent hours chasing weird behavior in a tool running inside Cursor. The issue wasn’t the tool, it was a Snap-installed version introducing a wrapper layer that behaved differently in subprocess environments. Did a native install. Everything became predictable again.

Building a tiny Linux app to explain desktop stutter. A hands-on Rust/Linux walkthrough: read /proc + /sys, parse Pressure Stall Information, build a small TUI, and turn kernel signals into something a desktop user can understand. g.omid.dev/uJPPO8M #Linux #Rust #DesktopLinux #Performance #Kernel

Building a Tiny Linux App to Explain Desktop Stutter

A hands-on Rust/Linux app walkthrough: build a small TUI that reads /proc and /sys, parses Pressure Stall Information, and turns kernel signals into an explanation for desktop stutter.

g.omid.dev

Stop modeling screens with five booleans. If your UI has separate flags for loading, error, empty, retrying, and submitted, your template can render impossible states. The fix is not a clever @if chain. It is one honest screen model. g.omid.dev/fv90jQT #Angular #TypeScript #Frontend

Stop Modeling Angular Screens with Five Booleans

Most Angular UI bugs come from screens modeled as scattered flags. Replace loading, error, empty, and ready booleans with one explicit state model your templates and reviewers can trust.

g.omid.dev

I wrote a small post about example-projects, the companion repo I’m using for suitable technical articles. When a full example teaches better than isolated snippets, the source code should be available to inspect, run, and adapt. g.omid.dev/uqqWXYO #WebDev #OpenSource

Why I Started Adding Full Source Code to My Blog Posts

A short note about the companion example-projects repository for omid.dev, where suitable technical posts now include runnable examples or complete focused snippets.

g.omid.dev

I made a repo for the code examples behind my omid.dev articles. It includes focused, runnable projects for Angular, GraphQL, Web Workers, Web Audio, micro frontends, Rust/WASM, TypeScript, real-time frontend patterns, and... Each one has its own README and setup notes. github.com/omidfarhang/...

GitHub - omidfarhang/example-projects: This repository contains sample projects used in my blog

This repository contains sample projects used in my blog - omidfarhang/example-projects

github.com

How I install Cursor IDE on Manjaro with the official AppImage. AUR was not stable enough for me, and there is no official Snap or pacman package yet. Launcher, desktop entry, and a safe one-command update script included. g.omid.dev/yAXBVd2 #Manjaro #Linux #Cursor

How to Install Cursor IDE on Manjaro Linux

A practical AppImage-based Cursor IDE installation guide for Manjaro Linux, including launcher setup, desktop integration, icon extraction, and a one-command update script.

g.omid.dev