Docup

Documentation written from the code, not about it

Docup reads your repository the way a new engineer would and writes the docs site they wish existed: overview, quickstart, guides and reference, hosted on your domain and rewritten on every push.

Public repositories work without connecting GitHub. No card required.

acme.docup.dev/relay/guides/retries

Guides / Retries and backoff

Retries and backoff

Relay retries failed deliveries with exponential backoff and jitter. Attempts, the backoff curve and the dead-letter policy are configured per client.

Configure the retry policy

Pass a retries object when constructing the client. Every field is optional and falls back to the defaults in src/client.ts.

client.tsTypeScript
import { RelayClient } from "@acme/relay" const client = new RelayClient({  retries: { attempts: 5, backoff: "exponential" },});

Attempts are counted per event, not per endpoint. See Delivering events for how fan-out interacts with retries.

How it works

Reads the repository before it writes a word

Most generators paste files into a prompt and hope. Docup builds a model of the codebase first, then writes from it, then checks its own work.

  • Every file is parsed into a symbol skeleton: exports, types, signatures and the import graph between them. That skeleton, not raw text, is what the writer reasons about.

    Structure · 412 files parsed

    src/client.ts

    RelayClientcreateClient

    src/retry/policy.ts

    RetryPolicybackoff()

    src/server/index.ts

    RelayServer

    src/signing.ts

    sign()verify()

    src/errors.ts

    RelayErrorDeliveryError

    Exports

    1,284

    Import edges

    3,902

    Entry points

    4

  • Files are summarised bottom-up into modules and packages. Summaries are cached by blob hash, so a push that touches three files re-reads three files.

    Summaries · 409 reused, 3 rewritten
    • src/retry

      cached

      Exponential backoff with full jitter; RetryPolicy is immutable and cloned per event. Dead-letter after attempts are exhausted.

    • src/signing

      cached

      HMAC-SHA256 payload signing with a rotating secret. verify() accepts the previous secret for one hour.

    • src/client.ts

      changed in a3f9c1e

      Public entry point. Composes retry, signing and transport; the only class users construct directly.

  • A planner drafts the site outline from the summaries: which guides the codebase actually needs, which references exist, and what each page should cite.

    Outline · 14 pages planned
    • OverviewREADME.md, package.json
    • Quickstartexamples/basic.ts
    • Guides
    • Delivering eventssrc/client.ts
    • Retries and backoffsrc/retry/*
    • Signing payloadssrc/signing.ts
    • Reference
    • RelayClientsrc/client.ts
    • Errorssrc/errors.ts
  • Each page is written with the relevant source pulled in on demand. Every claim carries the file and line it came from, so nothing is written from memory.

    Writing · guides/retries.md

    Retries and backoff

    Relay retries failed deliveries up to five times by default src/retry/policy.ts:12, waiting between attempts with exponential backoff and full jitter src/retry/policy.ts:41. Once attempts are exhausted the event is moved to the dead-letter queue src/client.ts:88 and a DeliveryError is raised src/errors.ts:27.

    retrieving src/retry/policy.ts · 2 of 4 sources
  • Before a page is published, every identifier is checked against the skeleton, every link against the outline, and unverifiable sentences are rewritten or dropped.

    Verification · guides/retries.md
    • Identifiers exist in source214 / 214
    • Internal links resolve38 / 38
    • Code samples parse12 / 12
    • Signatures match declarations61 / 61

    1 sentence rewritten

    Retries default to three attempts. Retries default to five attempts. src/retry/policy.ts:12

Read the full pipeline

Platform

Everything a docs site needs, nothing to maintain

Generation is the start. The site is hosted, searched, indexed, synced and measured for you, so the docs stay as alive as the code.

main · push eventswebhook
a3f9c1efix(retry): use full jitter2 pages rewritten
9d2b0f4docs: expand README1 page rewritten
c71e88afeat(signing): secret rotation3 pages, 1 new
5b0d19fchore: bump depsno changes

Follows your branch

A push to the tracked branch regenerates only the pages whose sources changed. Everything else stays byte-identical.

TypeNameStatusCNAMEdocs.acme.comTXT_docup.docs.acme.com
Certificate issued · renews automatically

Your domain, automatic TLS

Start on {you}.docup.dev. Point a CNAME whenever you like and a certificate is issued as soon as DNS resolves.

rotate secret
  • Signing payloads · Rotating the secret
  • RelayClient · rotateSecret()
  • Errors · SignatureMismatch

Full-text search

Instant search across every published page, on every plan.

# acme.docup.dev/relay/llms.txt
Relay
> Webhook delivery with retries and signing.

## Guides
- [Retries and backoff](/guides/retries.md)
- [Signing payloads](/guides/signing.md)

## Reference
- [RelayClient](/reference/client.md)

Readable by crawlers and assistants

Server-rendered HTML, sitemap, canonical URLs and llms.txt with a Markdown copy of every page.

  • v14Edited · Quickstartlive
  • v13Sync · a3f9c1erestore
  • v12Sync · 9d2b0f4restore

Edit, publish, roll back

Change any page in a Markdown editor before it goes live. Every publish is a version you can restore.

How do I rotate the signing secret without dropping in-flight events?

Call client.rotateSecret(next). Relay signs new events with the new secret and keeps verifying the previous one for an hour, so nothing already in flight fails.

src/signing.ts:52guides/signing

An assistant that cites the source

Readers ask questions in plain language and get answers grounded in the docs, with the file and line behind each claim.

  • Quickstart1,204
  • Retries and backoff863

Know what gets read

Page views, search queries with no results, and the questions readers ask the assistant.

acme/relay · mainincremental sync
  1. c71e88a

    feat(signing): secret rotation

    • ~ src/signing.ts
    • ~ src/client.ts

    Pages rewritten

    • Signing payloads
    • RelayClient
    • Rotating secrets (new)
  2. a3f9c1e

    fix(retry): use full jitter

    • ~ src/retry/policy.ts

    Pages rewritten

    • Retries and backoff
    • RelayClient
11 other pages unchanged · 0 tokens spent on them

Sync

Docs that stop drifting

Every push is diffed against the last generation. Only the pages whose sources changed are rewritten, and a rewrite that changes nothing is discarded. The docs stay current without anyone remembering to update them.

  • Pick the branch to follow. Usually main, but release branches work too.

  • Auto-publish or review first. Land changes as drafts and publish when you have read them.

  • Pay for what changed. Unchanged pages cost nothing to keep.

How sync works

Start now, read the docs before you decide

Connect a repository and the first generation is on us. No card, no configuration files, nothing to install.