Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
hardcount
command
|
|
|
hardcount-bench-seed
command
hardcount-bench-seed prepares a database for an ingest benchmark and prints the credentials the load generator needs.
|
hardcount-bench-seed prepares a database for an ingest benchmark and prints the credentials the load generator needs. |
|
hardcount-bootstrap
command
|
|
|
hardcount-docs-run
command
hardcount-docs-run runs the commands of a Markdown page, in order, in one bash shell, and checks that each prints what the page says it prints.
|
hardcount-docs-run runs the commands of a Markdown page, in order, in one bash shell, and checks that each prints what the page says it prints. |
|
hardcount-doctor
command
hardcount-doctor sweeps a Hardcount database for money-invariant violations — states no legal writer can produce.
|
hardcount-doctor sweeps a Hardcount database for money-invariant violations — states no legal writer can produce. |
|
internal
|
|
|
api
Package api provides the HTTP server and route wiring for Hardcount.
|
Package api provides the HTTP server and route wiring for Hardcount. |
|
api/generated
Package generated provides primitives to interact with the openapi HTTP API.
|
Package generated provides primitives to interact with the openapi HTTP API. |
|
api/middleware
Package middleware provides HTTP middleware for the Hardcount API server.
|
Package middleware provides HTTP middleware for the Hardcount API server. |
|
api/timefilter
Package timefilter is the shared parser for ?from / ?to (and named variants like ?date_from / ?date_to) query parameters across operator-facing list and export endpoints.
|
Package timefilter is the shared parser for ?from / ?to (and named variants like ?date_from / ?date_to) query parameters across operator-facing list and export endpoints. |
|
billing
Package billing contains the billing cycle engine, scheduler, and invoice preview.
|
Package billing contains the billing cycle engine, scheduler, and invoice preview. |
|
dashmembers
Package dashmembers implements the minimal team-membership surface (DP-readiness cut-reinstatement #2, 2026-07-06): invite by email, tokenized accept, member list, revoke, remove.
|
Package dashmembers implements the minimal team-membership surface (DP-readiness cut-reinstatement #2, 2026-07-06): invite by email, tokenized accept, member list, revoke, remove. |
|
doctor
Code-adjacent data: the doctor's invariant catalog.
|
Code-adjacent data: the doctor's invariant catalog. |
|
domain
Package domain contains pure data models shared across Hardcount.
|
Package domain contains pure data models shared across Hardcount. |
|
errs
Package errs provides structured domain errors with machine-readable codes.
|
Package errs provides structured domain errors with machine-readable codes. |
|
hostedinvoice
Package hostedinvoice serves the public /v1/public/invoices/* surface — Stripe's hosted_invoice_url equivalent.
|
Package hostedinvoice serves the public /v1/public/invoices/* surface — Stripe's hosted_invoice_url equivalent. |
|
integrations/litellm
Package litellm adapts LiteLLM Proxy's StandardLoggingPayload to Hardcount usage events.
|
Package litellm adapts LiteLLM Proxy's StandardLoggingPayload to Hardcount usage events. |
|
payment/breaker
Package breaker provides a global circuit breaker around Stripe API calls, built on sony/gobreaker/v2.
|
Package breaker provides a global circuit breaker around Stripe API calls, built on sony/gobreaker/v2. |
|
paymentmethods
Package paymentmethods is the customer-facing view of payment methods.
|
Package paymentmethods is the customer-facing view of payment methods. |
|
pdffonts
Package pdffonts embeds the TTF fonts used by Hardcount's PDF renderers (invoice, credit note).
|
Package pdffonts embeds the TTF fonts used by Hardcount's PDF renderers (invoice, credit note). |
|
platform/activity
Package activity holds the shape of an activity line and the words that more than one activity surface shares (ADR-128).
|
Package activity holds the shape of an activity line and the words that more than one activity surface shares (ADR-128). |
|
platform/leader
Package leader is singleton-role leadership as a ROW, not a Postgres session (ADR-114).
|
Package leader is singleton-role leadership as a ROW, not a Postgres session (ADR-114). |
|
platform/leader/leadertest
Package leadertest lets store tests call leader-only methods with a real, live lease token without running a heartbeat: one admin statement takes the role for an hour and the token rides the returned ctx.
|
Package leadertest lets store tests call leader-only methods with a real, live lease token without running a heartbeat: one admin statement takes the role for an hour and the token rides the returned ctx. |
|
platform/listorder
Package listorder is the one rule for a list's ?sort and ?dir: a closed set of sort keys, each naming the SQL column it orders by, and a direction of asc or desc.
|
Package listorder is the one rule for a list's ?sort and ?dir: a closed set of sort keys, each naming the SQL column it orders by, and a direction of asc or desc. |
|
platform/migrate
Package migrate applies Hardcount's database migrations with goose (ADR-125).
|
Package migrate applies Hardcount's database migrations with goose (ADR-125). |
|
platform/money
Package money holds small, dependency-free helpers for integer-cents math shared across billing, subscription proration, and tax.
|
Package money holds small, dependency-free helpers for integer-cents math shared across billing, subscription proration, and tax. |
|
platform/scheduler
Package scheduler hosts the standard tick-loop runner used by every ticker-driven singleton worker in Hardcount.
|
Package scheduler hosts the standard tick-loop runner used by every ticker-driven singleton worker in Hardcount. |
|
platform/telemetry
Package telemetry provides OpenTelemetry tracing initialization for Hardcount.
|
Package telemetry provides OpenTelemetry tracing initialization for Hardcount. |
|
platform/timeline
Package timeline carries the two ordering invariants every activity / timeline surface must satisfy, mechanized after the same two bugs shipped on three separate surfaces each (2026-07-19 audit):
|
Package timeline carries the two ordering invariants every activity / timeline surface must satisfy, mechanized after the same two bugs shipped on three separate surfaces each (2026-07-19 audit): |
|
recipe
Package recipe implements the pricing recipes feature: one-call instantiation of a ready-made catalog, meters and a plan with its prices, for AI-platform pricing patterns (ADR-085, ADR-130 §15).
|
Package recipe implements the pricing recipes feature: one-call instantiation of a ready-made catalog, meters and a plan with its prices, for AI-platform pricing patterns (ADR-085, ADR-130 §15). |
|
session
Package session implements dashboard sessions minted by the email+password login flow.
|
Package session implements dashboard sessions minted by the email+password login flow. |
|
subscription/subscriptiontest
Package subscriptiontest holds test-only fixtures for the subscription domain (the platform/leader/leadertest shape).
|
Package subscriptiontest holds test-only fixtures for the subscription domain (the platform/leader/leadertest shape). |
|
tax
Package tax defines the tenant-selectable tax calculation backend and three concrete implementations: NoneProvider (skip tax), ManualProvider (flat tenant-level rate), and StripeTaxProvider (Stripe Tax API; defers the invoice to tax_status=pending for retry on error).
|
Package tax defines the tenant-selectable tax calculation backend and three concrete implementations: NoneProvider (skip tax), ManualProvider (flat tenant-level rate), and StripeTaxProvider (Stripe Tax API; defers the invoice to tax_status=pending for retry on error). |
|
testclock
Package testclock owns the TestClock resource: a tenant-scoped frozen-time simulator used to walk test-mode subscriptions through full billing lifecycles (trials, cycles, dunning retries) in compressed wall-clock time.
|
Package testclock owns the TestClock resource: a tenant-scoped frozen-time simulator used to walk test-mode subscriptions through full billing lifecycles (trials, cycles, dunning retries) in compressed wall-clock time. |
|
testutil/pdftest
Package pdftest reads back what Hardcount's PDF renderers drew, for tests.
|
Package pdftest reads back what Hardcount's PDF renderers drew, for tests. |
|
usage
Provider cost rates + per-customer margin (ADR-079).
|
Provider cost rates + per-customer margin (ADR-079). |
|
user/breachedpw
Package breachedpw holds the breached-password list that user.ValidatePassword checks when a password is set or reset (ADR-095, "Offline breached-password").
|
Package breachedpw holds the breached-password list that user.ValidatePassword checks when a password is set or reset (ADR-095, "Offline breached-password"). |
|
user/breachedpw/gen
command
Command gen rebuilds internal/user/breachedpw/passwords.txt from a downloaded copy of the source list.
|
Command gen rebuilds internal/user/breachedpw/passwords.txt from a downloaded copy of the source list. |
|
version
Package version carries the build-time version stamp.
|
Package version carries the build-time version stamp. |
Click to show internal directories.
Click to hide internal directories.