Skip to content

Commit c38172a

Browse files
authored
Merge pull request #50 from ryanbas21/docs/update-to-current
docs: update documentation to match current codebase
2 parents 15d9454 + 456072f commit c38172a

14 files changed

Lines changed: 681 additions & 72 deletions

File tree

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ Analyze and enforce tree-shakeability across your packages — catch bundle-bloa
2828
| [`treeshake-check`](packages/treeshake-check) | CLI & library — checks whether a package can be fully tree-shaken by Rollup | [![npm](https://img.shields.io/npm/v/@wolfcola/treeshake-check)](https://www.npmjs.com/package/@wolfcola/treeshake-check) |
2929
| [`eslint-plugin-treeshake`](packages/eslint-plugin-treeshake) | ESLint plugin that flags code patterns known to break tree-shaking | [![npm](https://img.shields.io/npm/v/@wolfcola/eslint-plugin-treeshake)](https://www.npmjs.com/package/@wolfcola/eslint-plugin-treeshake) |
3030

31+
### Utilities
32+
33+
| Package | Description | npm |
34+
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
35+
| [`dead-export-finder`](packages/dead-export-finder) | CLI to find unused exports across monorepo package boundaries | [![npm](https://img.shields.io/npm/v/@wolfcola/dead-export-finder)](https://www.npmjs.com/package/@wolfcola/dead-export-finder) |
36+
| [`changeset-sync-manifest`](packages/changeset-sync-manifest) | Syncs package version from changesets to manifest files | private |
37+
3138
---
3239

3340
## Quick start
@@ -104,10 +111,13 @@ pnpm add @wolfcola/devtools-bridge
104111

105112
```ts
106113
import { davinci } from '@forgerock/davinci-client';
107-
import { attachDevToolsBridge } from '@wolfcola/devtools-bridge';
114+
import { attachDaVinciBridge } from '@wolfcola/devtools-bridge';
108115

109116
const client = await davinci({ config });
110-
attachDevToolsBridge(client, config);
117+
const handle = attachDaVinciBridge(client, config);
118+
119+
// When done:
120+
handle.detach();
111121
```
112122

113123
The bridge is a no-op when the extension is not installed.

apps/docs/README.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,60 @@
1-
# README
1+
# @wolfcola/docs-site
2+
3+
The documentation site for wolfcola devtools, built with [elm-pages](https://elm-pages.com/).
4+
5+
## Development
6+
7+
```bash
8+
pnpm --filter @wolfcola/docs-site dev
9+
```
10+
11+
Opens a local dev server with hot reload.
12+
13+
## Build
14+
15+
```bash
16+
pnpm --filter @wolfcola/docs-site build
17+
```
18+
19+
Generates a static site in `dist/` using the Netlify adapter. The site is served under the `/devtools/` base path.
20+
21+
## Content
22+
23+
Documentation is authored as Markdown files in the `content/` directory:
24+
25+
| Directory | Section | Description |
26+
| ----------------------- | ------------ | ---------------------------------------------------- |
27+
| `content/docs/` | Guides | Getting started, extension usage, integration guides |
28+
| `content/packages/` | Packages | API reference for each published package |
29+
| `content/contributing/` | Contributing | Development setup, code style, release process |
30+
31+
Each Markdown file has YAML frontmatter with `title`, `description`, `section`, and `order` fields used for navigation and search indexing.
32+
33+
## Architecture
34+
35+
- **elm-pages** — static site generator with file-based routing
36+
- **Elm** — all page logic, layout, search, and theme toggle
37+
- **Vite** — bundler (configured via `elm-pages.config.mjs`)
38+
- **Netlify** — deployment adapter
39+
- **Prism.js** — syntax highlighting for code blocks
40+
41+
### Adding a new page
42+
43+
1. Create a Markdown file in the appropriate `content/` subdirectory
44+
2. Add frontmatter with `title`, `description`, `section`, and `order`
45+
3. Add a sidebar link in `app/Shared.elm` under the matching section
46+
4. The route is automatically generated from the directory and filename
47+
48+
### Key files
49+
50+
| File | Purpose |
51+
| ---------------------------------- | ------------------------------------------------- |
52+
| `app/Shared.elm` | Layout, header, sidebar, search, theme toggle |
53+
| `app/Route/Index.elm` | Home page with package grid |
54+
| `app/Route/Architecture.elm` | Architecture diagram (SVG) |
55+
| `app/Route/Docs/Slug_.elm` | Dynamic guide page renderer |
56+
| `app/Route/Packages/Slug_.elm` | Dynamic package page renderer |
57+
| `app/Route/Contributing/Slug_.elm` | Dynamic contributing page renderer |
58+
| `src/MarkdownRenderer.elm` | Custom Markdown renderer with callout support |
59+
| `src/Search.elm` | Full-text search index and matching |
60+
| `style.css` | Stylesheet with CSS custom properties for theming |

apps/docs/app/Route/Architecture.elm

Lines changed: 61 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,44 @@ view app _ =
8686
]
8787
, Html.div [ Attr.class "architecture-diagram" ]
8888
[ viewDiagram ]
89-
, Html.h2 [] [ Html.text "Package Relationships" ]
89+
, Html.h2 [] [ Html.text "OIDC DevTools" ]
9090
, Html.dl []
9191
[ Html.dt [] [ Html.text "@wolfcola/devtools-types" ]
9292
, Html.dd []
93-
[ Html.text "Effect Schema definitions for AuthEvent and FlowState. Shared foundation used by devtools-bridge." ]
93+
[ Html.text "Effect Schema definitions for AuthEvent and FlowState. The shared foundation that all other OIDC packages depend on." ]
94+
, Html.dt [] [ Html.text "@wolfcola/devtools-core" ]
95+
, Html.dd []
96+
[ Html.text "Shared annotators (OIDC phase detection, CORS, DPoP, PAR), diagnosis engine, event store, and export/redaction logic. Used by both the browser extension and VS Code extension." ]
9497
, Html.dt [] [ Html.text "@wolfcola/devtools-bridge" ]
9598
, Html.dd []
9699
[ Html.text "SDK adapter for emitting events from DaVinci, Journey, and OIDC clients. Depends on devtools-types." ]
97-
, Html.dt [] [ Html.text "@wolfcola/treeshake-check" ]
100+
, Html.dt [] [ Html.text "@wolfcola/devtools-ui" ]
101+
, Html.dd []
102+
[ Html.text "Elm UI components for Timeline, Flow, and Learn views. Provides the panel interface with inspector tabs, playback controls, and diagnosis display." ]
103+
, Html.dt [] [ Html.text "@wolfcola/devtools-extension" ]
104+
, Html.dd []
105+
[ Html.text "Chrome and Firefox browser extension. Bundles devtools-core and devtools-ui into a DevTools panel with network-first OIDC detection." ]
106+
, Html.dt [] [ Html.text "oidc-devtools (VS Code)" ]
107+
, Html.dd []
108+
[ Html.text "VS Code extension that connects via Chrome DevTools Protocol (CDP) for live auth traffic capture and flow visualization." ]
109+
]
110+
, Html.h2 [] [ Html.text "Tree-Shake Tools" ]
111+
, Html.dl []
112+
[ Html.dt [] [ Html.text "@wolfcola/treeshake-check" ]
98113
, Html.dd []
99114
[ Html.text "CLI & library to verify packages are tree-shakeable by Rollup. Standalone package." ]
100115
, Html.dt [] [ Html.text "@wolfcola/eslint-plugin-treeshake" ]
101116
, Html.dd []
102-
[ Html.text "ESLint plugin that flags tree-breaking patterns. Can use treeshake-check for verification." ]
117+
[ Html.text "ESLint plugin that flags tree-breaking patterns. Can use treeshake-check for bundle-level verification." ]
118+
]
119+
, Html.h2 [] [ Html.text "Utilities" ]
120+
, Html.dl []
121+
[ Html.dt [] [ Html.text "@wolfcola/dead-export-finder" ]
122+
, Html.dd []
123+
[ Html.text "CLI to find unused exports across monorepo package boundaries. Uses oxc-parser for fast AST analysis." ]
124+
, Html.dt [] [ Html.text "@wolfcola/changeset-sync-manifest" ]
125+
, Html.dd []
126+
[ Html.text "Internal CI tool that syncs package version from changesets to manifest files. Not documented on the docs site." ]
103127
]
104128
]
105129
}
@@ -108,28 +132,47 @@ view app _ =
108132
viewDiagram : Html.Html (PagesMsg Msg)
109133
viewDiagram =
110134
Svg.svg
111-
[ SvgAttr.viewBox "0 0 700 360"
112-
, SvgAttr.width "700"
113-
, SvgAttr.height "360"
135+
[ SvgAttr.viewBox "0 0 900 480"
136+
, SvgAttr.width "900"
137+
, SvgAttr.height "480"
114138
, SvgAttr.style "max-width: 100%; height: auto;"
115139
]
116140
[ -- OIDC DevTools group
117-
svgGroup 20 20 320 300 "OIDC DevTools"
118-
, svgBox 60 80 240 60 "devtools-types"
119-
, svgBox 60 200 240 60 "devtools-bridge"
141+
svgGroup 20 20 520 440 "OIDC DevTools"
142+
, svgBox 180 60 200 50 "devtools-types"
143+
, svgBox 40 160 200 50 "devtools-core"
144+
, svgBox 300 160 200 50 "devtools-bridge"
145+
, svgBox 40 270 200 50 "devtools-ui"
146+
, svgBox 40 370 200 50 "devtools-extension"
147+
, svgBox 300 370 200 50 "vscode-extension"
120148

121149
-- Tree-Shake Tools group
122-
, svgGroup 370 20 310 300 "Tree-Shake Tools"
123-
, svgBox 400 80 240 60 "treeshake-check"
124-
, svgBox 400 200 240 60 "eslint-plugin-treeshake"
150+
, svgGroup 570 20 310 200 "Tree-Shake Tools"
151+
, svgBox 600 60 240 50 "treeshake-check"
152+
, svgBox 600 160 240 50 "eslint-plugin-treeshake"
153+
154+
-- Utilities group
155+
, svgGroup 570 250 310 210 "Utilities"
156+
, svgBox 600 290 240 50 "dead-export-finder"
157+
, svgBox 600 390 240 50 "changeset-sync-manifest"
158+
159+
-- Arrows: devtools-types -> devtools-core
160+
, svgArrow 230 110 180 160
161+
162+
-- Arrows: devtools-types -> devtools-bridge
163+
, svgArrow 330 110 370 160
164+
165+
-- Arrows: devtools-core -> devtools-extension
166+
, svgArrow 140 210 140 270
125167

126-
-- Arrows
127-
, svgArrow 180 140 180 200
168+
-- Arrows: devtools-ui -> devtools-extension
169+
, svgArrow 140 320 140 370
128170

129-
-- devtools-types -> devtools-bridge
130-
, svgArrow 520 160 520 200
171+
-- Arrows: devtools-core -> vscode-extension
172+
, svgArrow 200 210 380 370
131173

132-
-- treeshake-check -> eslint-plugin-treeshake (optional dependency)
174+
-- Arrows: treeshake-check -> eslint-plugin-treeshake
175+
, svgArrow 720 110 720 160
133176
]
134177

135178

apps/docs/app/Route/Index.elm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ viewPackageGrid =
119119
, route = Route.Packages__Slug_ { slug = "devtools-types" }
120120
, tag = "Published"
121121
}
122+
, viewPackageCard
123+
{ name = "@wolfcola/dead-export-finder"
124+
, description = "CLI to find unused exports across monorepo package boundaries"
125+
, route = Route.Packages__Slug_ { slug = "dead-export-finder" }
126+
, tag = "Published"
127+
}
122128
]
123129

124130

apps/docs/app/Shared.elm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ viewSidebar model toMsg =
296296
, ( Route.Packages__Slug_ { slug = "eslint-plugin-treeshake" }, "eslint-plugin-treeshake" )
297297
, ( Route.Packages__Slug_ { slug = "devtools-bridge" }, "devtools-bridge" )
298298
, ( Route.Packages__Slug_ { slug = "devtools-types" }, "devtools-types" )
299+
, ( Route.Packages__Slug_ { slug = "dead-export-finder" }, "dead-export-finder" )
299300
]
300301
, viewSidebarSection "Guides"
301302
[ ( Route.Docs__Slug_ { slug = "getting-started" }, "Getting Started" )

apps/docs/content/contributing/code-style.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ order: 3
77

88
# Code Style
99

10-
This repository uses two primary languages: Effect TypeScript for all runtime packages and Elm for the documentation site. Each has its own conventions.
10+
This repository uses two primary languages: Effect TypeScript for all runtime packages and Elm for both the DevTools panel UI (`devtools-ui`) and the documentation site. Each has its own conventions.
1111

1212
## Effect TypeScript Conventions
1313

apps/docs/content/contributing/repository-structure.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ The wolfcola-devtools repository is a pnpm workspace monorepo. All publishable p
2121
| `@wolfcola/devtools-ui` | `packages/devtools-ui` | Elm UI components for Timeline, Flow, and Learn views |
2222
| `@wolfcola/devtools-extension` | `packages/devtools-extension` | Browser extension for Chrome and Firefox |
2323
| `oidc-devtools` | `packages/vscode-extension` | VS Code extension with CDP connection |
24+
| `@wolfcola/dead-export-finder` | `packages/dead-export-finder` | CLI to find unused exports across monorepo boundaries |
25+
| `@wolfcola/changeset-sync-manifest` | `packages/changeset-sync-manifest` | Syncs package version from changesets to manifest files |
2426
| `@wolfcola/docs-site` | `apps/docs` | This documentation site (elm-pages) |
2527

2628
## Root Files
@@ -72,6 +74,12 @@ treeshake-check
7274
7375
eslint-plugin-treeshake
7476
(standalone, optional dep on treeshake-check)
77+
78+
dead-export-finder
79+
(standalone)
80+
81+
changeset-sync-manifest
82+
(standalone)
7583
```
7684

7785
The `devtools-types` package is the shared foundation. It defines the `AuthEvent` and `FlowState` schemas that the bridge, browser extension, and VS Code extension all depend on.

0 commit comments

Comments
 (0)