All projects
2026Live
Pheno logo

Pheno

A genetics co-pilot for Horse Reality — built as a browser extension and a companion web app.

Developed by Engine Room

The short version

Overview

Pheno reads the genetics a player already has access to inside Horse Reality — a long-running online horse-breeding simulator — and turns raw allele strings into decisions a breeder can actually act on: what colour a foal will be and at what odds, whether a planned cross carries a lethal gene, how a horse will perform across seven competition disciplines, and what a horse is worth on the market.

It runs in two places. A Chrome extension overlays the game itself, so the analysis appears in-context on the pages players are already looking at. A Next.js web app handles accounts, saved collections, breeding goals, and the cross-device sync the extension reads from.

Why it exists

The problem it solves

Horse Reality exposes a horse's genotype as a compact string — something like EE aa gg CRn. Experienced breeders learn to read these by hand, but the real work is combinatorics: cross two horses and you're mentally multiplying two sets of alleles across fifteen-odd colour loci, weighing dilutions and modifiers, and remembering which gene pairings are lethal. Doing that reliably, for every prospective pairing, is exactly the kind of bookkeeping a computer should be doing.

Pheno does that bookkeeping. For a single horse it names the exact coat colour, lists what each gene will pass to a foal and at what probability, and flags carried lethal alleles. For a pairing it cross-multiplies both parents into the full distribution of possible foals with probabilities, computes the coefficient of inbreeding from the pedigree, estimates covering-success and fertility, and warns before a lethal cross.

Beyond colour, it grades conformation and genetic potential into projected ability across dressage, driving, endurance, eventing, flat racing, show jumping and western reining — and on the market it surfaces that same analysis inline on listings, so a buyer can judge a horse without ever opening it. Every number a serious breeder would otherwise compute on paper, computed instantly and in-place.

Under the hood

How it works

A pure genetics engine at the core

The heart of Pheno is a dependency-free genetics engine — no DOM, no network, no I/O. It parses Horse Reality's genotype strings into typed genotypes, then resolves them across all ~15 coat-colour loci (extension, agouti, grey, cream, dun, champagne, silver, mushroom, the white-spotting family, tobiano, sabino, splashed white, frame overo, roan, leopard complex) to derive canonical colour names — matched against 200+ named colours from the game's own wiki — pass-on odds, full foal distributions, Wright's coefficient of inbreeding, and lethal-gene alerts. Keeping this layer pure is what makes it trustworthy: it's covered by an extensive Node test suite and powers both surfaces from a single source of truth.

Conformation, potential & market analysis

On top of genetics, Pheno reads a horse's 10 genetic-potential stats and 12 conformation areas (plus breed-specific gaits like tölt and flying pace), refines them with the game's own Breeder's Advice, and blends potential and conformation into a projected discipline rating — lazy-loaded into market listing rows as they scroll into view, exactly where a buying decision is made.

Image-based coat detection

Some modifiers aren't in the genotype string — they're only visible on the horse. Pheno samples the passport image pixel-by-pixel to auto-detect sooty and flag flaxen and pangaré as possible, while suppressing false reads when roan, grey or heavy white spotting would confound the brightness signal.

Privacy-first analytics

Anonymous by default — no personal profile, no horse IDs, no PII unless a user signs in and opts in. The extension skips bundling the full PostHog SDK entirely, posting events to the capture endpoint directly to keep the payload tiny.

The stack

Engineering choices — and why

Extension architectureContent scripts + MAIN-world inject script + background service workerThe inject script reaches the game's own page-level state; content scripts render the overlay UI; a service worker coordinates. esbuild bundles eight entry points to IIFEs.
Shared logicOne typed genetics engineThe same engine powers the extension and the web app — no drift between the two surfaces.
StylingHand-rolled CSS design tokens (no Tailwind)A bespoke light/dark theme driven by CSS custom properties — a deliberate choice for a distinctive, non-generic look and full theme control.
AuthClerk (@clerk/nextjs + @clerk/chrome-extension)The web app is the source of truth for sessions; the extension syncs them across to gate signed-in features — auth that spans both surfaces without a custom backend.
DatabaseNeon serverless Postgres (no ORM)Scales to zero, queried directly from serverless functions.
HostingVercelPush-to-deploy, scheduled cron for market-stats rebuilds, and serverless functions in one platform.
AnalyticsPostHog (extension + web)Product analytics with a consent-first, anonymous-by-default model.
TestingNode's native test runner (--experimental-strip-types)Runs the TypeScript test suite with no compile step; the pure engine is exhaustively unit-tested.
Outcomes

Results

Engineering & delivery

  • Production builds land consistently in ~27–34s.
  • Exhaustive automated test suite — the test directory is the single largest area of the codebase.
  • Shipped and live: web app on Vercel, extension published to the Chrome Web Store.

Adoption

  • 30 extension installs to date, 20–30 monthly active breeders, 19 daily active users.
  • 58 visitors on launch day.
  • 100% retention across the first two weeks live — every breeder who tried it kept using it.
Pheno turns Horse Reality's raw genotype strings into instant, in-context breeding decisions — a pure, exhaustively-tested genetics engine shared across a Manifest V3 Chrome extension and a Next.js web app, shipped continuously on Vercel.

Want something like this built?

Start a project