This repo owns the current docs v2 / Fumadocs site for public Affitor documentation.
It is a derived docs repo:
- it documents canonical behavior owned by runtime repos
- it does not define CMS/dashboard tracking or payment behavior by itself
Before editing docs content about product behavior, read in this order:
../affitor-context.md../docs/AGENT-SOURCE-OF-TRUTH.mddocs/AGENT-SOURCE-OF-TRUTH.md- canonical runtime/source repos for the affected domain
When docs conflict with runtime repos, trust:
- runtime code / executed config
- schema / contract definitions
- repo-level source-of-truth docs in the runtime repo
- public docs in this repo
For tracking / attribution / billing docs, the primary sources are usually:
../affiliate-cms/src/api/affiliate-tracking/*../affiliate-cms/src/api/webhook-distributor/*../affiliate-dashboard/src/containers/AffiliateManagement/Advertiser/*
- content lives in
content/docs/ - docs app routes are served under
/docs/... - app/router code lives in
src/app/ - Fumadocs config lives in
source.config.ts - workflow sync guidance lives in
docs/workflow-sync-map.md
- Runtime-first docs — never invent behavior to fill gaps
- Prefer public supported paths — mention legacy aliases only as compatibility notes when runtime still accepts them
- Keep pathing correct — internal docs links should resolve under
/docs/... - Do not revive removed features — Affitor Pay is removed unless explicitly reintroduced in canonical runtime/docs
- Avoid unsupported certainty — if payout timing or business wording is ambiguous across canonicals, use conservative wording and note the dependency
- Keep docs self-serve — optimize for advertisers and agents implementing integrations without support calls
- Build after meaningful docs changes — run
npm run build
Treat these topics as high-risk even in docs-only changes:
- tracking / attribution
- sale and lead API contracts
- Stripe metadata requirements
- invoice / billing wording
- commissions / payout lifecycle
- auth / API keys
For these, read runtime code first and capture the source files used.
At minimum for meaningful docs changes:
cd /Users/sonpiaz/Affitor-main/affiliate-docs-port
npm run buildAlso manually inspect:
- internal link correctness
- naming consistency (
customerKey,customer_key,affitor_customer_key) - supported integration paths
- whether adjacent workflows in
docs/workflow-sync-map.mdalso need syncing