Skip to content

Add interactive Advanced Forms documentation site - #68

Open
konowrockis wants to merge 7 commits into
mainfrom
docs
Open

Add interactive Advanced Forms documentation site#68
konowrockis wants to merge 7 commits into
mainfrom
docs

Conversation

@konowrockis

Copy link
Copy Markdown
Member

Summary

  • add a Fumadocs-based Next.js documentation site with restructured Advanced Forms guides
  • compile runnable Flutter examples from MDX and embed them as interactive web previews
  • add docs validation/build automation and configure the site for Vercel deployment

Test plan

  • Run cd docs_app && npm run build
  • Build the Vercel artifact locally
  • Verify the deployed site and Flutter bundle return HTTP 200

Made with Cursor

konowrockis and others added 7 commits August 19, 2026 18:52
…late.

Replace the copied Patrol docs with a nested Next app and README-based MDX, keeping notebook navigation from `/` without Patrol branding.

Co-authored-by: Cursor <cursoragent@cursor.com>
Dart written inline in MDX inside `<AdvancedFormsExample>` is extracted at build
time into one Flutter web bundle, which renders each snippet as an auto-sized
island above the code that produced it. Flutter's multi-view embedding gives one
engine many host elements, so this needs no iframes and one download for the
whole site.

The demo is the visible half; the guarantee is the point. Every snippet is now
compiled, analyzed, format-checked and laid out in a widget test, so a page can
no longer document an API that has moved on. `docs/first-form.mdx` and
`docs/validation.mdx` are the first two to use it — the latter demonstrates
`subscribeToFields` clearing an error rather than only describing it.

Building the site now needs the Flutter SDK, which Vercel's build container has
not got, so `vercel.json` turns its Git integration off and the new docs
workflow builds and deploys with `vercel deploy --prebuilt`. That needs
`VERCEL_TOKEN`, `VERCEL_ORG_ID` and `VERCEL_PROJECT_ID` as repository secrets;
without them the deploy job no-ops and the build job still guards every PR.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Compiling the Flutter bundle is too slow to sit in front of every change to the
package, and it has no business holding up work on the library. A pull request
now builds only when docs/ or docs_app/ change.

A push to main keeps `lib/` in the filter, because the bundle embeds the
package's own compiled source: without it the deployed examples would go on
running the library from whenever the docs last changed, and a snippet the API
has outgrown would surface later on an unrelated docs pull request. That is one
build per merge rather than one per push.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread docs_app/.gitignore
.env
.env*.local
.vercel
next-env.d.ts No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No newline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants