Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .claude/rules/docs-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ else — not in the router, not in a test, not in a template's nav.
`home.html` is the company page at `/`, served by `Handler.Home`. **It is not a row in
`docsPages`.** It is the front door: same design language as the docs, different page.

- **Shared:** `docs_styles.css` for the tokens, typefaces, page background, code blocks,
tags and theme toggle; `docs.js` for the toggle and the copy buttons; `htmlPageCSP`; and
the template data, so its price and payment link come from the same config keys.
- **Shared:** `docs_styles.css` for the tokens, typefaces, page background, inline code
and theme toggle; `docs.js` for the toggle; `htmlPageCSP`; and the template data, so its
price and payment link come from the same config keys.
- **Its own:** the header, the hero and its fan-out diagram, the plan panels, the contact
panel — all in the page's inline `<style>`, under `home-` class names, built from the
shared tokens. **Do not reuse the docs page shell there** (`.topbar`, `.topbar-nav`,
Expand All @@ -48,10 +48,15 @@ Use the tokens, never a new colour or typeface: a version with its own palette a
was rejected as too far the other way. Its plan limits repeat the Plans table on `/docs`;
change both together.

The fan-out diagram is a **sample that ends in "and more"**, on purpose, so a new lookup
does not mean redrawing it. Do not make it exhaustive. The Product section's two lists
are the full set and do gain a line with each new lookup. The grid-track and injected-control rules below apply to it; the
docs-nav and table rules do not.
**It says what the product is; the docs say how to use it.** The page has no lookup list,
no request or response sample, no code block. It had all three, and they were removed as
a second copy of the docs that a new lookup would have to update. A new lookup changes
nothing on this page. The fan-out diagram is the one place lookups are named, and it is a
**sample that ends in "and more"**, on purpose, so a new lookup does not mean redrawing
it. Do not make it exhaustive, and do not add reference material back.

The grid-track and injected-control rules below apply to the page; the docs-nav and table
rules do not.

## Layout rules — pinned by `docs_layout_test.go`

Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/adding-features/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ surfaces late — usually as a drift test failing in CI or a stale docs surface.
8. Add the column to `usage.LookupColumns` and a migration for `request_log` (the drift test will fail until you do)
9. Add a setter method for tests (`SetThingLookup`)
10. Update all test files that call `New()` or `SetLookups()`
11. Update `docs/api-reference.md` (lookup table, response field section, caching TTL table) and `docs/operations.md` (the `cache.ttl.<name>` config row), docs HTML (request table, valid-lookups table, response field section with its `cache_hit` row, caching TTL table), the Product list on the home page (`home.html`; not its diagram, which is a sample), api.http, smoke test, integration tests, changelog.yaml
11. Update `docs/api-reference.md` (lookup table, response field section, caching TTL table) and `docs/operations.md` (the `cache.ttl.<name>` config row), docs HTML (request table, valid-lookups table, response field section with its `cache_hit` row, caching TTL table), api.http, smoke test, integration tests, changelog.yaml

## Adding a New Endpoint

Expand Down
10 changes: 7 additions & 3 deletions docs/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,19 @@ example gets it compiled without anyone remembering.

**Decision.** `/` renders `home.html`, the Security Accelerated company page, from the same
binary as the docs. It stays out of the `docsPages` table. It uses the docs' design
language (the shared stylesheet's tokens, typefaces, code blocks and theme toggle) with a
layout of its own.
language (the shared stylesheet's tokens, typefaces and theme toggle) with a layout of
its own. It says what the product is and carries no reference material: no lookup list,
no request or response sample.

**Why.** The root used to be a 301 to `/docs`, which left the company with no page of its
own. Serving it here means no second host, deploy or toolchain, and the price it shows
comes from the same config keys as the Plans table on `/docs`. The split between shared
language and own layout was arrived at by getting it wrong in both directions: the first
version reused the docs page shell and looked like a copy of the docs overview; the second
had its own typeface and palette and no longer looked like the same company.
had its own typeface and palette and no longer looked like the same company. Through
v1.1.1 the page also listed every lookup and showed a request and its response. That was
a second copy of the docs, one link away from the first, and a list every new lookup had
to remember to update; it was replaced with a short description of what the API is for.

**Instead of.** A separate static site, which would need its own hosting and would quote
plan limits and a price that nothing ties to this service's config. And instead of a sixth
Expand Down
8 changes: 8 additions & 0 deletions internal/handler/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
# terms (#91). An entry a later release reversed keeps its text and gains a
# "superseded in vX" note, rather than being hidden or rewritten.

- version: v1.1.2
date: 2026-11-12
changes:
- text: "The home page describes what the Intelligence API is for and leaves the detail to the docs: the list of every lookup and the sample request and response are gone from it"
audience: public
- text: "With the list gone, a new lookup no longer touches `home.html`; the `adding-features` checklist and the docs-pages rule say so. The page's fan-out diagram is still a sample ending in \"and more\""
audience: internal

- version: v1.1.1
date: 2026-11-12
changes:
Expand Down
11 changes: 6 additions & 5 deletions internal/handler/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ var homeTmpl = template.Must(template.New("home").Parse(homeHTML))
// The page is deliberately not a row in docsPages. That table is the
// documentation set, whose pages share one shell (topbar nav, sidebar,
// reference tables); this is the front door. It uses the docs' design language
// — the shared stylesheet's tokens, typefaces, code blocks and theme toggle —
// with a layout of its own, so it reads as the same company without being a
// copy of the docs overview. It also shares the CSP and the template data, so
// the price and payment link shown here come from the same config keys as the
// Plans table on /docs.
// — the shared stylesheet's tokens, typefaces and theme toggle — with a layout
// of its own, so it reads as the same company without being a copy of the docs
// overview. It says what the product is and leaves how to use it to the docs:
// no lookup list, no request or response sample. It also shares the CSP and
// the template data, so the price and payment link shown here come from the
// same config keys as the Plans table on /docs.
func (h *Handler) Home(c *gin.Context) {
if !h.servesHomeOn(c.Request.Host) {
c.Redirect(http.StatusFound, "/docs")
Expand Down
129 changes: 26 additions & 103 deletions internal/handler/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,42 +291,13 @@
align-items: start;
}

.home-covers { margin-top: 34px; }
.home-covers + .home-covers { margin-top: 26px; }

.home-covers h3 {
margin: 0;
padding-bottom: 8px;
border-bottom: 1px solid var(--accent-line);
font-size: 15px;
}

.home-covers ul { columns: 2; column-gap: 28px; color: var(--ink); }

.home-covers li {
padding: 8px 0;
border-bottom: 1px solid var(--divider);
font-size: 15px;
line-height: 1.45;
break-inside: avoid;
}

.home-covers small {
display: block;
color: var(--ink-soft);
font-size: 13px;
}

.home-covers p { margin: 12px 0 0; font-weight: 700; }

.home-code h3 {
margin: 0;
color: var(--ink-soft);
font-size: 13px;
letter-spacing: 0.02em;
}

.home-code pre { margin: 8px 0 22px; }
/* The pitch on the left, three reasons on the right. No lookup list and no
code here: that is what the docs are for. */
.home-points { margin: 0; }
.home-points div { padding: 18px 0 22px; border-top: 1px solid var(--divider); }
.home-points div:first-child { border-top-color: var(--accent-line); }
.home-points dt { color: var(--ink); font-size: 17px; font-weight: 700; }
.home-points dd { max-width: 46ch; margin: 6px 0 0; }

/* ----- Plans ----- */
.home-plans {
Expand Down Expand Up @@ -460,7 +431,6 @@
.home-fan-lookups li { gap: 6px; min-height: 27px; }
.home-fan-lookups li::before,
.home-fan-lookups li::after { flex-basis: 6px; min-width: 4px; }
.home-covers ul { columns: 1; }
}
</style>
</head>
Expand Down Expand Up @@ -502,7 +472,7 @@ <h1>Domain and IP intelligence for security teams.</h1>
<div class="home-fan-card">
<!-- A sample, not the full list: eight lookups and "and more", so a new
lookup does not mean redrawing this. The full list is in the
Product section below. If the number of rows ever changes, the
docs, not on this page. If the number of rows ever changes, the
viewBox height is 10 per row and the middle is half of it. -->
<div class="home-fan" role="img" aria-label="One request for example.com fans out into lookups that run at the same time, such as WHOIS, DNS, TLS and reputation, and comes back as one JSON document.">
<div class="home-fan-node">example.com</div>
Expand Down Expand Up @@ -552,74 +522,27 @@ <h1>Domain and IP intelligence for security teams.</h1>
<section class="home-section home-split" id="product">
<div>
<h2>Intelligence API</h2>
<p class="home-intro">One REST API for domains and IP addresses. You name the lookups you want, and the answer to &ldquo;what is this thing?&rdquo; comes back as a single document your tooling can read.</p>
<p class="home-intro">Built for the moment a domain or an IP address turns up in an alert, a log line or an inbox, and someone has to decide whether it matters. The Intelligence API collects the public record on it and returns a single answer your tools can read.</p>
<p class="home-links">
<a href="{{.DocsBase}}/docs/domain">Domain reference</a>
<a href="{{.DocsBase}}/docs/ip">IP reference</a>
</p>
</div>

<div class="home-covers">
<h3>For a domain</h3>
<ul>
<li>WHOIS registration</li>
<li>DNS records</li>
<li>TLS certificate</li>
<li>HTTP headers</li>
<li>Email security <small>SPF, DKIM, DMARC, MTA-STS, TLS-RPT, BIMI</small></li>
<li>DNSSEC and CAA</li>
<li>Subdomains</li>
<li>Certificate transparency</li>
<li>BGP and ASN</li>
<li>Technology fingerprinting</li>
<li>Reputation <span class="tag tag-pro">Pro</span></li>
<li>Threat intelligence <span class="tag tag-pro">Pro</span></li>
<li>Aggregate risk score</li>
</ul>
<p><a href="{{.DocsBase}}/docs/domain">Domain reference</a></p>
<dl class="home-points">
<div>
<dt>One place to ask</dt>
<dd>Registration, DNS, certificates, mail setup and reputation each come from a different tool with a different output. Here they sit behind one API and come back in one shape.</dd>
</div>

<div class="home-covers">
<h3>For an IP address</h3>
<ul>
<li>GeoIP</li>
<li>ASN</li>
<li>Reverse DNS</li>
<li>Abuse contact</li>
<li>Threat intelligence <span class="tag tag-pro">Pro</span></li>
</ul>
<p><a href="{{.DocsBase}}/docs/ip">IP reference</a></p>
<div>
<dt>Made for automation</dt>
<dd>A plain REST API with JSON in and out. It fits alert enrichment, triage playbooks and your own scripts.</dd>
</div>
</div>

<div class="home-code">
<h3>Request</h3>
<pre><code>curl <span class="flag">-s</span> <span class="url">https://api.securityaccelerated.com/v1/domain/lookup</span> \
<span class="flag">-H</span> <span class="str">'X-API-Key: YOUR_KEY'</span> \
<span class="flag">-H</span> <span class="str">'Content-Type: application/json'</span> \
<span class="flag">-d</span> <span class="str">'{"domains": ["example.com"],
"lookups": ["dns", "ssl", "email_security", "risk"]}'</span></code></pre>
<h3>Response, trimmed</h3>
<pre><code>{
<span class="hdr">"results"</span>: [
{
<span class="hdr">"domain"</span>: <span class="str">"example.com"</span>,
<span class="hdr">"dns"</span>: {
<span class="hdr">"cache_hit"</span>: <span class="kw">false</span>,
<span class="hdr">"a"</span>: [<span class="str">"23.192.228.80"</span>],
<span class="hdr">"ns"</span>: [<span class="str">"a.iana-servers.net"</span>, <span class="str">"b.iana-servers.net"</span>]
},
<span class="hdr">"ssl"</span>: {
<span class="hdr">"cache_hit"</span>: <span class="kw">true</span>,
<span class="hdr">"issuer"</span>: <span class="str">"DigiCert Global G3 TLS ECC SHA384 2020 CA1"</span>,
<span class="hdr">"not_after"</span>: <span class="str">"2027-01-15T23:59:59Z"</span>,
<span class="hdr">"days_until_expiry"</span>: <span class="num">91</span>
},
<span class="hdr">"email_security"</span>: {
<span class="hdr">"cache_hit"</span>: <span class="kw">false</span>,
<span class="hdr">"spf"</span>: { <span class="hdr">"raw"</span>: <span class="str">"v=spf1 -all"</span>, <span class="hdr">"all"</span>: <span class="str">"-all"</span> },
<span class="hdr">"dmarc"</span>: { <span class="hdr">"raw"</span>: <span class="str">"v=DMARC1; p=reject"</span>, <span class="hdr">"policy"</span>: <span class="str">"reject"</span> }
},
<span class="hdr">"risk"</span>: { <span class="hdr">"cache_hit"</span>: <span class="kw">false</span>, <span class="hdr">"score"</span>: <span class="num">12</span>, <span class="hdr">"risk_level"</span>: <span class="str">"low"</span> }
}
]
}</code></pre>
</div>
<div>
<dt>Clear about freshness</dt>
<dd>Results are cached so a repeat question comes back fast, and every one says whether it came from the cache.</dd>
</div>
</dl>
</section>

<section class="home-section" id="plans">
Expand Down
Loading