# Datamade Genomics landing site

Single-file static landing page deployed to Cloudflare Pages.

- **Source**: `index.html` (one self-contained file, Tailwind CDN, no build step)
- **Config**: `wrangler.toml` (Cloudflare Pages config)
- **Wrangler**: `npx wrangler` works without a global install

## Prerequisites (one-time, per machine)

```bash
# Cloudflare account auth
npx wrangler login                # opens browser; pick the right account
```

## Deploy

```bash
cd /home/datamade/datamade-ai/genomics/site
npx wrangler pages deploy . --project-name=datamade-genomics --commit-message="$(git log -1 --pretty=%B | head -1)"
```

First deploy creates the project + a `*.pages.dev` preview URL. Re-running
re-deploys the same project. Every deploy is an immutable preview that
points at the latest production assets when promoted.

## Wire a custom domain

### Option A — `genomics.datamade.ai` (recommended)

1. Cloudflare Dashboard → **Pages** → `datamade-genomics` → **Custom domains** → **Set up a custom domain**
2. Enter: `genomics.datamade.ai`
3. Cloudflare auto-creates the CNAME against the `datamade.ai` zone (the zone must already be on Cloudflare). HTTPS provisions automatically within minutes.
4. Verify: `curl -I https://genomics.datamade.ai/` returns `HTTP/2 200`.

This is the cleanest path. No worker needed, no path-rewriting logic.

### Option B — `datamade.ai/genomics` (path-based)

Needs a Cloudflare Worker on the `datamade.ai` apex that path-routes to this Pages project. Sketch:

```js
// worker.js — apex router
export default {
  async fetch(req) {
    const url = new URL(req.url);
    if (url.pathname === "/genomics" || url.pathname.startsWith("/genomics/")) {
      const rewritten = new URL(req.url);
      rewritten.host = "datamade-genomics.pages.dev";  // or the custom-domain hostname
      rewritten.pathname = url.pathname.replace(/^\/genomics/, "") || "/";
      return fetch(rewritten.toString(), req);
    }
    // fall through to the existing apex behavior
    return fetch(req);
  }
}
```

Trade-offs:

- **Subdomain (A)**: 1 DNS record, HTTPS auto, no worker. Independent rollout from the apex.
- **Path (B)**: shared root path; SEO sometimes prefers this; needs worker + extra runtime cost.

The first paid pilot won't care about which one. Pick subdomain unless there's a marketing-stack reason to do path-based.

## Content guardrails

Every claim in `index.html` is restricted to language approved under
`genomics-analysis/docs/clinical-readiness/intended-use/QUALITY_CLAIMS.md`:

- ✅ In-scope SNP F1 0.9993 / Indel F1 0.9959 paired with the exclusion-BED SHA reference (C-005, ADR-0006).
- ✅ "Within ±0.0005 of top short-read submissions in the PrecisionFDA Truth Challenge V2" (C-005 named third-party comparison).
- ✅ "MHC / HLA region in scope" (per ADR-0006).
- ❌ No "industry leading", no "clinical-grade", no "beats DRAGEN" anywhere.
- ❌ No clinical-interpretation / diagnosis / report sign-out language.
- ✅ Intended-use boundary block ("Lab is the lab of record") is prominent.
- ✅ Footer disclaimer present.

If you change copy, run a quick `grep -iE "industry leading|clinical-grade|exceeds industry|beats DRAGEN"` against `index.html` before deploying — none of those phrases should ever match.

## Updating

```bash
# Edit index.html
# Locally preview
python3 -m http.server 8000   # then open http://localhost:8000

# Deploy a preview
npx wrangler pages deploy . --project-name=datamade-genomics --branch=staging

# Promote to production
npx wrangler pages deploy . --project-name=datamade-genomics
```
