FE-1500: Document Petrinaut website in architecture docs - #9470
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
e87e381 to
3de22fd
Compare
PR SummaryLow Risk Overview The arch-docs generator now scans the whole app root ( Layer annotations land on the site: README frontmatter for Separately, Reviewed by Cursor Bugbot for commit 779ffec. Bugbot is set up for automated code reviews on this repo. Configure here. |
3de22fd to
0373327
Compare
0373327 to
2e9e850
Compare
2e9e850 to
4992982
Compare
94a6fcf to
5e1917a
Compare
5e1917a to
98c9103
Compare
98c9103 to
24036b6
Compare
24036b6 to
f91b3a5
Compare
🌟 What is the purpose of this PR?
Brings
@apps/petrinaut-websiteinto the Petrinaut architecture docs, and documents the two things the import graph cannot explain: how the site drives Petrinaut's app location from the URL, and how a third-party site embeds an example through oEmbed. Stacked on #9363.🔗 Related links
🔍 What does this change?
src, because the Vercel functions inapi/are part of the architecture and deploy separately from the SPA.website(the app's README frontmatter),website.routes,website.examples,website.api, andwebsite.demo. Everything else in the app inherits from the nearest declaring ancestor, so 5 declarations cover the package.website.apireacheswebsite.routesthrough the embed URL it hands to consumers.content/website/router-integration.mdx(attached towebsite.routes): the router-neutralnavigationcontract,validateSearchas the single entry point for raw query input, why the location splits between the URL and page state, validation as normalization, what a URL carries, and hosting Petrinaut without a router at all.content/website/oembed.mdx(attached towebsite.api): the endpoint's contract and validation, the embed route and its HTTP framing policy, why bothsandboxtokens are required, and a copy-pasteable iframe for embedding an example.devDependencyof@local/petrinaut-arch-docs, soturbo prunekeeps its source in the pruned CI workspace.web-workerin@hashintel/petrinaut-core, with a patch changeset.elkjsimports it from the entry the graph-layout helper uses, and it resolved only becauseapps/hash-frontendhappened to install it; the pruned workspace this PR creates has no such neighbour, and neither would an external consumer of the published package.@apps/petrinaut-websitewas "not covered at all", the page said every route declaresvalidateSearch(three of six do), and it credited the embed with resolvingscenario=nonewhen the embed honours it and the oEmbed endpoint is what drops it. Moved@layerRoot website.routesfromsrc/router.tstosrc/routes/__root.tsx, since a declaration scopes to its own directory and this one was claiming all ofsrc/, and declared the three subtrees it had absorbed (website.brunch,website.optimization,website.telemetry); renamedwebsite.demotowebsite.local-storage-demo, as it is one of three demos. Excludedscripts/and root*.config.tsfrom scanning sosourceDirectory: "."buysapi/without the build tooling, and exempted private packages from the "no importable exports" warning, which this package triggered on every build. Added awebsiteclass to the generated-diagram palette so the hand-written diagrams match it, and fixed theonNavigatesignature in one diagram label.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🛡 What tests cover this?
yarn workspace @local/petrinaut-arch-docs lint:arch-docscovers the model: it fails on an unannotated file, an undeclared ancestor, a rule violation, and a@talksTotarget the imports already prove.❓ How to test this?
yarn workspace @local/petrinaut-arch-docs lint:arch-docs— expect no errors.mise x -- yarn exec turbo run dev --filter @apps/petrinaut-docs, then open the website section.