ADR-0001: Hosted Documentation Platform
Status and date
Accepted — 2026-08-02.
Context
ViewCompose needs one public documentation system for framework principles, tutorials, Compose migration, Android Studio tooling, and generated Kotlin/Java API reference. Public Maven artifacts own independent versions, so module manuals and API reference cannot assume a single repository release train.
Documentation changes must stay in the same pull request as the code they describe. Generated HTML must not be committed, and the hosting layer must remain replaceable without changing public URLs. The initial project should have no recurring infrastructure cost beyond the existing domain.
Decision
- Handwritten source remains under the repository's
docs/tree. - Docusaurus 3 builds the public site from that source and provides navigation, internationalized content, version-aware documentation, and extensible UI components.
- Dokka 2 generates Kotlin/Java API reference per Maven artifact and version. Dokka HTML is the hosted format; generated output is not checked in.
- GitHub Actions verifies pull requests and assembles production output. Only
maincan deploy. - GitHub Pages hosts the static result at
docs.viewcompose.com. - The site source lives under
website/; generated API output lives under ignored build or generated directories. - Published artifact metadata and
docs/modules/README.mddrive module navigation so site configuration does not duplicate the module registry. - Public routes follow the generator-neutral contract in the documentation governance rules.
- Search starts with a local/static-capable fallback and may switch to the free Algolia DocSearch program after the production domain is available.
Alternatives considered
VitePress
VitePress offers a smaller build, built-in local search, and good internationalization. It was not selected because independent documentation versioning would require a larger custom subsystem.
Material for MkDocs
Material for MkDocs offers an excellent writing experience and browser search. Its versioning and multi-language model rely on additional projects and tools, which increases coordination cost for independently versioned modules.
Dedicated hosted documentation service
A hosted service could reduce initial setup, but would separate documentation changes from code review, introduce service-specific storage and billing, and make the module version model less controllable.
Consequences and trade-offs
- The repository gains a Node-based website toolchain in addition to Gradle.
- Site builds must remain below GitHub Pages deployment and size limits.
- Dokka output is cached or generated incrementally so ordinary documentation changes do not rebuild every historical API version.
- Docusaurus module configuration must be generated from the canonical catalog rather than copied by hand.
- A custom domain keeps future hosting migration transparent to readers.
- Dynamic server-side features are out of scope; the deployed product remains static.
Affected modules and contracts
All artifacts registered in gradle/viewcompose-publishing.properties participate in generated API
reference. Documentation structure, release workflows, and source-comment quality gates are also
affected.
Validation and rollout
- Build the Docusaurus site locally and on pull requests.
- Generate Dokka HTML for a selected artifact set, then for the complete published catalog.
- Verify routes, links, module catalog parity, and site size.
- Enable Pages deployment from
mainonly. - Configure and verify
docs.viewcompose.comafter the first successful Pages deployment. - Add per-module release snapshots and API retention after the current documentation site is stable.