TypeScript

Articles about TypeScript on omid.dev — guides, topics, and notes from the field.

i18n, a11y, and Shareable Lab State in the Browser

Published: June 13, 2026 Reading Time: 3 min

Shipping an educational lab to a global audience means more than translation strings. Bio-Dynamics adds RTL layout for Persian, keyboard region shortcuts, ARIA live announcements, touch gesture hints, and URL-encoded lab checkpoints so teachers can share a mid-simulation state without a backend. Companion resource Bio-Dynamics: Microbiome Sandbox Try ?lang=fa or copy a lab link after running a scenario — source for i18n and labState.ts is on GitHub. github.com/omidfarhang/example-projects/labs/microbiome-sandbox Open live lab View source on GitHub Lightweight i18n without a framework Locales live in src/i18n/en.ts, de.ts, and fa.ts. A small t() helper resolves dot-path keys with parameter interpolation: ...

Continue Reading

Catalog-Driven Dashboard: Strains, Stressors, and Action Impact

Published: June 12, 2026 Reading Time: 3 min

The Bio-Dynamics dashboard exposes a lot of buttons: regional stressors, inoculations, environment sliders, and four catalog tabs for strains, prebiotics, postbiotics, and products. The trick is not rendering HTML — it is keeping the catalog honest as content grows. This post explains the data-first layout and the action impact preview panel. Companion resource Bio-Dynamics: Microbiome Sandbox Hover strains and products in the live lab to see impact preview, or browse the catalog TypeScript files on GitHub. github.com/omidfarhang/example-projects/labs/microbiome-sandbox Open live lab View source on GitHub Data catalogs, not hard-coded panels Almost every control maps to a typed catalog under src/data/: ...

Continue Reading

Macro/Micro 3D: One Scene Graph, Seven Tissue Builders

Published: June 11, 2026 Reading Time: 3 min

Most microbiome diagrams are flat. Bio-Dynamics tries the opposite: a single Three.js scene that starts as a rotatable body map, then animates into a tissue cross-section when you pick a region — with microbe meshes, SCFA particles, and fog density tied to live simulation state. This post covers the visualization layer. Companion source and the full architecture write-up are in the repository. Companion resource Bio-Dynamics: Microbiome Sandbox Open the live lab, zoom into gut or nasal tissue, then inspect the Three.js scene code on GitHub. github.com/omidfarhang/example-projects/labs/microbiome-sandbox Open live lab View source on GitHub One scene, two modes SceneManager owns a single WebGL scene with two interaction modes: ...

Continue Reading

Designing a Deterministic Microbiome Simulation Without Overclaiming Science

Published: June 10, 2026 Reading Time: 3 min

Bio-Dynamics is an educational 3D lab, not a clinical simulator. That constraint shaped every decision in the simulation layer: reproducible ticks, scalar tissue state, capped agent counts, and inflammation that emerges from pressure instead of jumping on every button press. This post walks through the engine design. Companion resource Bio-Dynamics: Microbiome Sandbox Run the live lab or inspect the simulation source — tick engine, golden tests, and full docs in the repository. github.com/omidfarhang/example-projects/labs/microbiome-sandbox Open live lab View source on GitHub Why deterministic? Interactive demos fail the educational test when the same button sequence produces different outcomes on refresh. Readers cannot build intuition from noise. ...

Continue Reading

Building Bio-Dynamics: An Educational 3D Microbiome Lab in the Browser

Published: June 9, 2026 Reading Time: 4 min

I write a lot about Angular platforms, monorepos, and production frontends. Bio-Dynamics is different: a browser-only educational lab where you rotate a 3D body map, zoom into tissue, and run deterministic probiotic scenarios tied to health articles on omid.dev. It started for three reasons — a human one, a developer-story one, and a career one. This post is the anchor for that project. Deeper technical posts follow in a short series linked at the end. ...

Continue Reading

How to Build a Frontend Testing Strategy That Actually Scales

Published: June 9, 2026 Reading Time: 11 min

Most frontend teams do not have a testing problem because they lack tests. They have a testing problem because nobody can explain why a specific test exists. The result is familiar: hundreds of unit tests that prove implementation details; a few end-to-end tests that fail whenever timing changes; component tests that duplicate what unit tests already cover; slow CI pipelines that people stop trusting; high coverage numbers with very little confidence. This is especially common in large Angular codebases. Angular gives teams a serious testing toolbox: TestBed, standalone components, dependency injection, router testing, HTTP testing utilities, harnesses, and good compatibility with tools like Jest, Vitest, Cypress, and Playwright. The tooling is not the hard part. ...

Continue Reading

Stop Modeling Angular Screens with Five Booleans

Published: June 2, 2026 Reading Time: 11 min

Open almost any mature Angular screen and you will find the same shape: 1 2 3 4 5 loading = false; error: string | null = null; data: Account[] | null = null; retrying = false; submitted = false; The template then becomes a negotiation: 1 2 3 4 5 6 7 8 9 @if (loading) { <app-spinner /> } @else if (error) { <app-error [message]="error" /> } @else if (!data?.length) { <app-empty-state /> } @else { <account-table [rows]="data!" /> } This looks fine. It ships. It passes review. And then production teaches you that the screen was never modeled as one thing. It was modeled as five independent switches that sometimes agree and sometimes do not. ...

Continue Reading

The Hidden Cost of Nice Syntax: When Angular's New Template Features Make Code Harder to Reason About

Published: May 26, 2026 Reading Time: 5 min

Every framework eventually discovers the same truth: developers love nice syntax until nice syntax becomes a hiding place. Angular’s recent template improvements are genuinely useful. Multiple consecutive @case blocks make some @switch statements cleaner. Spread and rest support in templates removes awkward helper code in small cases. Angular 21.2’s template additions, such as arrow functions and exhaustive @switch checks with @default never, continue the same direction: templates are becoming more expressive and more type-aware. ...

Continue Reading

Signal Forms Aren't Just a Forms API Update: They Change How You Model UI State

Published: May 25, 2026 Reading Time: 6 min

Most forms discussions start in the wrong place. They compare syntax. Reactive Forms gives us FormGroup, FormControl, validators, status flags, and a lot of well-known muscle memory. Signal Forms gives us fields, signal-shaped state, form-level submission, custom controls, and migration tools. It is tempting to treat this as a cleaner API for the same old job. But that misses the bigger shift. Signal Forms are not only about filling inputs and showing validation messages. They push forms into the same mental model as the rest of modern Angular state: explicit signals, derived values, and state transitions that can be composed instead of chased through subscriptions. ...

Continue Reading

Yet Another Frontend Framework? The Rise Of Svelte

Published: June 22, 2024 Reading Time: 6 min

As we advance into 2024, the landscape of frontend development continues to evolve at a rapid pace. Developers are always on the lookout for frameworks that offer more efficiency, better performance, and ease of use. Among the numerous frameworks making waves this year, a few stand out due to their unique offerings and growing adoption: React: A robust and flexible library maintained by Facebook, still reigning as the most popular framework for building user interfaces. Vue.js: Known for its simplicity and ease of integration, Vue.js is a favorite for many developers who need to quickly spin up a project. Angular: A powerful framework backed by Google, Angular is widely used for building large-scale enterprise applications. Svelte: A newer but rapidly growing framework that offers a unique approach to building web applications with a focus on performance and simplicity. While React, Vue, and Angular have been the go-to choices for many developers over the past few years, Svelte is increasingly capturing the attention of the development community. Let’s dive deeper into what makes Svelte stand out and why it’s becoming a preferred choice for many. ...

Continue Reading