Skip to content

docs: reshuffle README around tasks; split quickstart into deployment + ops#9

Merged
aaronbrethorst merged 1 commit into
mainfrom
user-instructions
May 10, 2026
Merged

docs: reshuffle README around tasks; split quickstart into deployment + ops#9
aaronbrethorst merged 1 commit into
mainfrom
user-instructions

Conversation

@aaronbrethorst
Copy link
Copy Markdown
Member

@aaronbrethorst aaronbrethorst commented May 10, 2026

Reorient the project's front door around the four tasks a new reader actually has: understand what hooks is, deploy the server, use hooksctl, contribute (including adding new providers). Lead the deploy section with the Docker path, since that's the supported shape.

Split the single quickstart into two reference docs:

  • docs/quickstart.md → docs/deployment.md (env vars, hooks init flags, container internals, Render Blueprint specifics, skew-window semantics). One-time setup reference.
  • docs/operations.md → docs/running-in-production.md (backups, retention, observability, push-subscription health, restarts and signing-secret state, graceful shutdown). Day-2 ops.

The split is clean — the two docs cover disjoint topics, and the README cross-references each at the right seam.

Specifics worth calling out, accumulated across two review rounds:

  • "Try it locally first" exports RENDER_WEBHOOK_SECRET (without it ./bin/hooks fails immediately with "empty secret") and points the reader at hooksctl tail and the inspector URL so they can verify the setup is working. Notes the password policy (≥ 12 chars, no email substring) so signup doesn't bounce them to accounts.md.
  • make dev is described accurately: it uses the configured listen addr (default :8080), not a random free port, and does not run init.
  • Section 2 leads with a pointer to docs/accounts.md as the full developer-onboarding walkthrough, not the admin-ops afterthought.
  • The "admin token" is described as a system-level credential that predates the user-account system, not a "legacy" credential.
  • Option B opens with "export RENDER_WEBHOOK_SECRET first" so the -e passthrough has a value. TLS-terminator reminders consolidated to the canonical mention at the top of the page.
  • hooksctl replay example takes the positional and --to URL.
  • rotate-secret callout distinguishes me sub (self) from push (admin-wide) for restart recovery.
  • Provider section collapsed to a teaser + pointer to docs/sources.md, with Stripe/GitHub/Vercel as illustrative examples and the --profile flag mentioned inline.
  • accounts.md cross-references repointed; example hostnames aligned on webhooks.example.com; password-policy wording tightened to match the ≥ 3-char local-part gate in internal/users/policy.go.
  • running-in-production.md explains the me sub * vs push * split and shows hooksctl push test for smoke-testing a consumer. Clarifies that /push is an inspector page.
  • deployment.md: admin token's plaintext is unrecoverable (the Argon2id hash lives in the DB); --token-name added to the init-flags list; "Useful flags" renamed to "Notable flags" so the list isn't misread as exhaustive.
  • render.yaml header comment repointed at the README's Option A.

Summary by CodeRabbit

  • Documentation
    • Restructured README with improved deployment guidance including Render Blueprint (one-click), manual container deployment, and bare binary options
    • Added comprehensive deployment documentation covering TLS termination, health checks, bootstrap behavior, and environment variables
    • Updated accounts documentation with domain reference updates and clearer bootstrap requirements
    • Streamlined and reorganized quickstart content into core guides for improved discoverability

Review Change Stack

… + ops

Reorient the project's front door around the four tasks a new reader
actually has: understand what hooks is, deploy the server, use
hooksctl, contribute (including adding new providers). Lead the deploy
section with the Docker path, since that's the supported shape.

Split the single quickstart into two reference docs:

- docs/quickstart.md → docs/deployment.md (env vars, `hooks init` flags,
  container internals, Render Blueprint specifics, skew-window
  semantics). One-time setup reference.
- docs/operations.md → docs/running-in-production.md (backups,
  retention, observability, push-subscription health, restarts and
  signing-secret state, graceful shutdown). Day-2 ops.

The split is clean — the two docs cover disjoint topics, and the
README cross-references each at the right seam.

Specifics worth calling out, accumulated across two review rounds:

- "Try it locally first" exports RENDER_WEBHOOK_SECRET (without it
  `./bin/hooks` fails immediately with "empty secret") and points the
  reader at `hooksctl tail` and the inspector URL so they can verify
  the setup is working. Notes the password policy (≥ 12 chars, no
  email substring) so signup doesn't bounce them to accounts.md.
- `make dev` is described accurately: it uses the configured listen
  addr (default :8080), not a random free port, and does not run init.
- Section 2 leads with a pointer to docs/accounts.md as the full
  developer-onboarding walkthrough, not the admin-ops afterthought.
- The "admin token" is described as a system-level credential that
  predates the user-account system, not a "legacy" credential.
- Option B opens with "export RENDER_WEBHOOK_SECRET first" so the
  `-e` passthrough has a value. TLS-terminator reminders consolidated
  to the canonical mention at the top of the page.
- `hooksctl replay` example takes the positional <seq> and --to URL.
- rotate-secret callout distinguishes `me sub` (self) from `push`
  (admin-wide) for restart recovery.
- Provider section collapsed to a teaser + pointer to docs/sources.md,
  with Stripe/GitHub/Vercel as illustrative examples and the
  --profile flag mentioned inline.
- accounts.md cross-references repointed; example hostnames aligned
  on webhooks.example.com; password-policy wording tightened to match
  the ≥ 3-char local-part gate in internal/users/policy.go.
- running-in-production.md explains the `me sub *` vs `push *` split
  and shows `hooksctl push test` for smoke-testing a consumer.
  Clarifies that `/push` is an inspector page.
- deployment.md: admin token's *plaintext* is unrecoverable (the
  Argon2id hash lives in the DB); --token-name added to the
  init-flags list; "Useful flags" renamed to "Notable flags" so the
  list isn't misread as exhaustive.
- render.yaml header comment repointed at the README's Option A.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

📝 Walkthrough

Walkthrough

The PR restructures user-facing documentation by removing the standalone quickstart guide, consolidating its content into a redesigned README with new "Try it locally first" and "Deploy the server" sections, introducing a comprehensive docs/deployment.md reference, updating cross-document URLs and examples for consistency, and expanding production operations and architecture guidance.

Changes

Documentation Reorganization and Deployment Reference

Layer / File(s) Summary
Documentation Structure
docs/quickstart.md, docs/deployment.md
Quickstart document removed entirely; new deployment.md introduced to provide comprehensive deployment reference.
README Core Redesign
README.md
README restructured with new top-level description, Status section, "How it fits together" Mermaid diagram, and consolidated "More docs" navigation linking to updated documentation.
Getting Started Flows
README.md
Added "Try it locally first" workflow (make build, hooks init, hooksctl forward) and "Deploy the server" section with three deployment options (Render Blueprint one-click, container manual, bare binary).
Deployment Configuration
docs/deployment.md
TLS termination guidance, hooks init bootstrap (admin token, signup URL, flags), environment variable and YAML configuration precedence, container image auto-init behavior, Render Blueprint specifics, SQLite single-process limitation, and skew_window backfill semantics.
CLI Operations and Usage
README.md
New "Use hooksctl against a deployed relay" section covering device-pairing login, SSE forwarding with replay/cursor, HTTP push subscription registration with signature format and verification windows, common subcommands, and admin operations locations.
Contributing and Architecture
README.md
Updated "Contributing" section with developer setup checklist, pinned Go toolchain note, architecture section detailing security invariants (body-bytes handling, constant-time checks, secret-safe logging, ingest HTTP status discipline), and Verifier interface guidance for webhook providers.
Account Setup and URL Unification
docs/accounts.md
URLs changed from https://hooks.example.com to https://webhooks.example.com throughout; updated bootstrap password rules (full email exclusion), CLI login examples, invite/ownership-transfer API endpoints, and deployment setup references.
Production Operations
docs/running-in-production.md
Clarified pruning loop behavior (ephemeral tokens, device_pairings cleanup, audit log never pruned), expanded push-subscription health monitoring with hooksctl command distinctions (me sub vs push), failure logging, and synthetic smoke-test flow (hooksctl push test) with signature validation.
Configuration Updates
render.yaml
Updated leading comment to point to README "Option A — Render Blueprint (one-click)" instead of old quickstart section reference.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • OneBusAway/hooks#2: Both PRs modify README, render.yaml, and deployment documentation for Render Blueprint and Docker deployment flows.
  • OneBusAway/hooks#1: The earlier PR rewrites quickstart.md; this PR removes quickstart entirely and reorganizes its content into README and new deployment.md.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main changes: documentation restructuring around tasks and splitting quickstart into deployment and operations docs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch user-instructions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/accounts.md`:
- Around line 15-19: The fenced code block in docs/accounts.md is missing a
language specifier which prevents proper rendering; update the triple-backtick
opening fence for the block that starts with "admin token (shown ONCE): <legacy
system token, copy if you want one>" to include a language identifier (e.g., use
```text or ```console) so the snippet renders correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ac69f183-73a2-4328-8e72-cba4d42e2fa5

📥 Commits

Reviewing files that changed from the base of the PR and between 6ac0a17 and 492b405.

📒 Files selected for processing (6)
  • README.md
  • docs/accounts.md
  • docs/deployment.md
  • docs/quickstart.md
  • docs/running-in-production.md
  • render.yaml
💤 Files with no reviewable changes (1)
  • docs/quickstart.md

Comment thread docs/accounts.md
Comment on lines 15 to 19
```
admin token (shown ONCE): <legacy system token, copy if you want one>
signup: https://hooks.example.com/signup?code=ABCDEFGH...
signup: https://webhooks.example.com/signup?code=ABCDEFGH...
(single-use; expires in 24h; auto-disables once any account exists)
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add language specifier to fenced code block.

The code block should specify a language identifier for proper rendering. Since this is output text from the hooks init command, text or console would be appropriate.

📝 Proposed fix
-```
+```text
 admin token (shown ONCE): <legacy system token, copy if you want one>
 signup: https://webhooks.example.com/signup?code=ABCDEFGH...
         (single-use; expires in 24h; auto-disables once any account exists)
</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>

[warning] 15-15: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/accounts.md around lines 15 - 19, The fenced code block in
docs/accounts.md is missing a language specifier which prevents proper
rendering; update the triple-backtick opening fence for the block that starts
with "admin token (shown ONCE): <legacy system token, copy if you want one>" to
include a language identifier (e.g., use text or console) so the snippet
renders correctly.


</details>

<!-- fingerprinting:phantom:triton:puma -->

<!-- d98c2f50 -->

<!-- This is an auto-generated comment by CodeRabbit -->

@aaronbrethorst aaronbrethorst merged commit fff195b into main May 10, 2026
7 checks passed
@aaronbrethorst aaronbrethorst deleted the user-instructions branch May 10, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant