Skip to content

Docs Repo

concept
2 min readUpdated

Docs Repo manages the per-project docs git substrate through DocsRepoService, transactional outbox work in OutboxService, and the gated CommitterWorker queue consumer. It serializes commits with CommitLockService, failing closed when Redis is unreachable or retrying when another committer holds the lock. It also rebuilds disposable repositories from the database via ReconcilerService, maintains stable page identities and slug registries, and creates disaster-recovery bundles with BundleService.

43 entities in atloria-monorepo/apps/api/src/docs-repo. 9 other subsystems depend on it, which makes it the 4th most depended-upon part of this codebase.

What it is made of

Its 43 entities sit in 10 files under atloria-monorepo/apps/api/src/docs-repo: 15 interfaces, 10 constants, 6 services, 6 functions and 6 more. sidecar.ts holds 13 of them — more than any other file here. DocsRepoService declares 20 methods, the widest surface here.

Where work enters

  • DocsRepoModuleatloria-monorepo/apps/api/src/docs-repo/docs-repo.module.ts:25

How it refuses and fails

8 of its components record a refusal or a failure handler. All 8 of them refuse work outright, under a condition written into the component itself. Their catch blocks handle a failure that already happened in 24 places. Of those 24, 11 turn it into a return value, 8 log it and continue and 5 let it reach the caller.

Boundaries

9 other subsystems depend on this oneApi, Change Request, Collaboration, Document, Documentation, Git Sync, L10n, Project, Snippets. Changing what it exposes changes them.

Those 9 hold 18 edges between them, unevenly: Snippets reaches in across 3 edges, while another holds one. 18 edges arrive against 2 leaving — more of this repository reaches into it than it reaches out to. What they reach is narrower than the folder: 4 of its 43 members carry every inbound edge — DocsRepoModule (9), OutboxService (5) and DocsRepoService (3), plus 1 more.

It depends on Database, and on nothing else in this repository.

How this code is named

These conventions cover most of the codebase. Learning them is faster than reading an index — each one lets you find any member of its family without looking it up.

PatternWhereCountExamples
*.service.tsapi/src/docs-repo/6bundle.service.ts, outbox.service.ts, docs-repo.service.ts, reconciler.service.ts

Was this page helpful?

Download as PDF
Docs Repo — Atloria (self dogfood)