docs: the documentation site — vitepress + typedoc, on the entity template - #3
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a full documentation website for @btravstack/di, implemented as a private docs/ workspace package that generates API markdown via TypeDoc and publishes a VitePress site to GitHub Pages.
Changes:
- Introduces a new
docs/workspace package (@btravstack/di-docs) with TypeDoc → VitePress build scripts and a VitePress site config/theme. - Adds a structured Diátaxis-style documentation set (tutorial/how-to/reference/explanation) plus curated pages for the runnable examples and an API overview.
- Wires docs build caching into Turbo and adds a GitHub Actions workflow to deploy the site after CI succeeds on
main.
Reviewed changes
Copilot reviewed 32 out of 34 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
turbo.json |
Adds a cached Turbo build task for the docs package, including packages/di/src/** as an input and VitePress/TypeDoc outputs. |
pnpm-workspace.yaml |
Adds the docs workspace and catalogs/overrides needed for VitePress + TypeDoc. |
knip.jsonc |
Ignores docs-related config dependencies knip can’t trace. |
docs/package.json |
Introduces the private docs package and its typedoc && vitepress scripts. |
docs/typedoc.json |
Configures TypeDoc generation of markdown API docs into docs/api/di. |
docs/index.md |
Adds the VitePress homepage content and “at a glance” example. |
docs/tutorial/getting-started.md |
Adds the end-to-end tutorial showing ports → providers/modules → build vs scoped. |
docs/how-to/swap-an-adapter.md |
Adds a how-to guide for composing an app module against different adapters. |
docs/how-to/request-scope.md |
Adds a how-to guide for per-request scope via Module.forkScope. |
docs/how-to/private-ports.md |
Adds a how-to guide explaining export-based privacy boundaries. |
docs/how-to/plugin-registry.md |
Adds a how-to guide for set ports and Provider.member registries. |
docs/how-to/manage-a-resource.md |
Adds a how-to guide for acquire/release and lifecycle hooks. |
docs/reference/ports.md |
Adds reference documentation for ports, set ports, ServiceOf, and type-only Scope. |
docs/reference/providers.md |
Adds reference documentation for provider arms, hooks, and channels. |
docs/reference/modules.md |
Adds reference documentation for module composition and phantom channels/variance. |
docs/reference/entry-points.md |
Adds reference documentation for build/scoped/forkScope, gating, and Context. |
docs/reference/wiring-defects.md |
Adds reference documentation for pre-construction defect checks and messages. |
docs/explanation/why-di.md |
Adds explanation of the overall design goals and what the library refuses to do. |
docs/explanation/compile-time-wiring.md |
Adds explanation of Needs propagation and the UNSATISFIED DEPENDENCIES gate. |
docs/explanation/modules-and-privacy.md |
Adds explanation of the runtime flat map and type-level privacy. |
docs/explanation/scopes-and-resources.md |
Adds explanation of phantom Scope and scope guarantees. |
docs/explanation/failures-vs-defects.md |
Adds explanation of unthrown failure vs defect channel separation. |
docs/explanation/peer-dependencies.md |
Adds explanation of why unthrown must be a peer dependency. |
docs/examples/index.md |
Adds an examples overview page tying examples to guide concepts. |
docs/examples/hexagonal-order-api.md |
Adds example write-up for the hexagonal slice package. |
docs/examples/request-scope.md |
Adds example write-up for the request-scope package. |
docs/examples/plugin-registry.md |
Adds example write-up for the plugin-registry package. |
docs/api/index.md |
Adds a hand-written API overview entry page for the generated TypeDoc section. |
docs/.vitepress/config.ts |
Adds VitePress site configuration (base path, sidebar/nav, canonical/OG meta, SSR bundling for theme). |
docs/.vitepress/theme/index.ts |
Wires the shared @btravstack/theme into the docs site. |
docs/.vitepress/theme/custom.css |
Sets the site accent and hero styling tokens for the package. |
.gitignore |
Ignores VitePress cache, generated TypeDoc pages, and local design scratch directory. |
.github/workflows/deploy-docs.yml |
Adds a Pages deployment workflow chained off successful CI on main. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The project documentation site, mirroring
@btravstack/entity's arrangement: a privatedocs/workspace package whosebuildruns TypeDoc (markdown intodocs/api/di, git-ignored) and thenvitepress build, published tobtravstack.github.io/di/by adeploy-docs.ymlthat chains off a green CI run on main.Structure
The guide follows the four Diátaxis modes, one shared sidebar across all of them:
getting-started: ports →ServiceOf→ providers/modules →Module.build→ a real resource → the compiler forcingModule.scoped.ScopedOptions,Context), wiring defects (the five checks with their exact messages), plus the TypeDoc-generated API with a hand-written overview.examples/*package, describing what each spec actually asserts (verified against the spec files, not paraphrased from memory).Infrastructure ported from entity
docs/added to the workspace; catalog entries for vitepress/typedoc/@btravstack/theme/@btravstack/typedoc, the namedtypedoccatalog (TypeDoc needs the JS compiler API that the native 7.0.2 port does not ship), thevite@<6.4.3security override, and thesearch-insightspeer exception.turbo.jsondocs-build task withpackages/di/srcas an input; knip entries for the two configs it cannot trace;.gitignoreentries for the VitePress cache and generated API pages.@btravstack/themewith di's accent set to the logo's blue (#2a62b8).typedoc.jsonsuppresses warnings only for the 17 deliberately-internal type names.docs/public/og-di.png, 1280×640 on the family template (dark canvas, name in the package accent, tagline, URL, the syringe artwork), wired into the OG/Twitter meta tags withsummary_large_image.Verification
pnpm --filter ./docs exec turbo build— TypeDoc zero warnings, VitePress build + sitemap clean.