About this documentation
This component (dialer-v2) is not a standalone Antora site. It is designed to be added as a
content source to a larger Antora playbook that aggregates documentation from several
Payability repositories.
Consuming this component
Add the repository as a content source and point start_path at docs:
content:
sources:
- url: https://github.com/<org>/dialer-v2.git
branches: [main]
start_path: docs
The component descriptor is docs/antora.yml. It declares:
-
name: dialer-v2,title: Dialer V2 -
version: ~— the component is unversioned, so its URLs carry no version segment. If the aggregating playbook needs branch-based versions, change this toversion: true(derive from the branch) or a literal such asversion: '1.0'. -
start_page: ROOT:index.adoc -
An explicit
navlist, one entry per module.
Module layout
One module per concern, so that cross-references read as xref:MODULE:PAGE.adoc[]:
| Module | Scope |
|---|---|
|
Landing page, stack, repository map, glossary, these conventions |
|
Structure, layering, tenancy, async runtime, cross-cutting concerns |
|
Business logic and rules, per capability |
|
Prisma models, enums, relations, indexes |
|
HTTP reference, grouped by resource |
|
Inbound webhooks and their handler registries |
|
Durable Inngest functions |
|
Third-party systems and how they are wired |
|
Authentication, authorization, secrets, webhook verification |
|
Dashboard routes, data layer, UI conventions |
|
Environment, local setup, deployment, scheduled jobs, troubleshooting |
Writing conventions
-
One
=level-0 title per page, plus a:description:attribute — the aggregating site uses it for search snippets and social previews. -
Code paths are written in monospace relative to the repository root, e.g.
lib/services/phone-number-calling-service.ts. Do not use absolute paths. -
API endpoints are written as
METHOD /api/pathwith{id}for path parameters. -
Field names use the casing of the layer being described: Prisma models are
camelCase, API request/response bodies aresnake_case. Say which layer you mean. -
Prefer tables for enumerations of fields, statuses and endpoints; prefer prose for rules and rationale.
-
Record why a rule exists when the reason is not obvious from the rule itself. That is the part the code cannot express.
Diagrams
Diagrams are written as Mermaid inside a literal block with a [mermaid] style:
[mermaid]
....
flowchart TD
A --> B
....
Without a diagram extension this renders as readable Mermaid source. To render it as an image, add asciidoctor-kroki to the playbook:
asciidoc:
extensions:
- asciidoctor-kroki
attributes:
kroki-fetch-diagram: true
Relationship to the in-app docs site
The repository also serves a Fumadocs site at /docs, built from the .mdx files that sit
directly under docs/. Those files are the origin of much of this component’s content.
Antora ignores them (it only reads docs/modules//pages), so the two can coexist, but they
are *two sources of truth. When the Fumadocs site is retired, delete the .mdx files,
source.config.ts, lib/source.ts and app/docs/, and this component becomes the only one.
Keeping it current
Update this component in the same change that alters behaviour:
-
schema change →
datamodule and the relevantdomainpage -
new or changed endpoint →
apimodule -
new webhook event type →
eventsmodule -
new Inngest function or step →
workflowsmodule -
new environment variable → Environment variables