Skip to content

docs: migrate from spectaql to Magidoc - #4

Merged
islandbitcoin merged 3 commits into
mainfrom
docs/magidoc-migration
Jul 13, 2026
Merged

docs: migrate from spectaql to Magidoc#4
islandbitcoin merged 3 commits into
mainfrom
docs/magidoc-migration

Conversation

@islandbitcoin

Copy link
Copy Markdown
Contributor

Replaces the spectaql + hand-built landing setup with Magidoc (carbon-multi-page) — a modern, GraphQL-native static docs generator. Big visual + usability upgrade, still fully static (deploys unchanged).

Why Magidoc

Evaluated Magidoc vs Astro Starlight against the real Flash schema. Magidoc won on the reference — the thing that's hardest to do well: a page per operation and type, each with the description, cross-linked argument/response types, and an auto-generated example query (Query/Variables/Response tabs). Starlight's GraphQL reference is a bolt-on (one giant table page). Magidoc is a near drop-in for the spectaql half.

What changed

  • magidoc.mjs — SDL introspection from ./schema.graphql; Flash branding (logo, favicon, "Flash API"); header links (Interactive Explorer, getflash.io); queryGenerationFactories covering the schema's ~40 custom scalars so every operation renders a realistic sample.
  • guides/ — the landing content ported to Markdown: introduction, getting-started, authentication, api-keys (new, FIP-07), examples, errors. These appear as a "Guides" section alongside the generated Queries/Mutations/Subscriptions/Types.
  • Buildnpm run build is now fetch-schema (prod) → rm -rf publicmagidoc generate. Output still lands in public/ for the existing DigitalOcean deploy; public/ and docs/ are now build artifacts (gitignored), which is why this diff shows large deletions of previously-committed build output.
  • Removed the dead spectaql pipeline: spectaql-config.yml, src/ (old landing + version-selector UI), build-versions.js, VERSION.md. The multi-version scaffolding was cosmetic (every version pointed at the same prod schema) and is superseded — flag if you want real per-version docs and I'll wire Magidoc per-version.

Notes

  • The reference is generated from the production API, so the apiKey* operations show up automatically once FIP-07 ships to prod. The API Keys narrative guide is live immediately.
  • Verified: builds cleanly against the current prod schema (CI-safe) and against the TEST schema (renders the apiKey reference pages); Flash-branded, all six guides + full reference present.
  • This supersedes the docs/fill-landing-examples effort (the landing is now Markdown guides).

🤖 Generated with Claude Code

Replace the spectaql + hand-built landing setup with Magidoc
(carbon-multi-page), a modern GraphQL-native static docs generator. It
produces a page-per-operation/type reference with auto-generated example
queries and cross-linked types, alongside the narrative guides — a big
visual and usability upgrade, still fully static.

- magidoc.mjs: SDL introspection from ./schema.graphql, Flash branding
  (logo, favicon, 'Flash API' title), header links, and
  queryGenerationFactories covering the schema's ~40 custom scalars so
  each operation renders a realistic sample query.
- guides/: the landing content ported to Markdown guide pages
  (introduction, getting-started, authentication, api-keys, examples,
  errors). The API Keys guide is new (FIP-07).
- build: 'npm run build' now fetch-schema (prod) -> rm -rf public ->
  magidoc generate. Output still lands in public/ for the existing
  DigitalOcean deploy; public/ and docs/ are now build artifacts (gitignored).
- Removes the dead spectaql pipeline: spectaql-config.yml, src/ (old
  landing + version-selector UI), build-versions.js, VERSION.md, and the
  committed spectaql build output. The multi-version scaffolding was
  cosmetic (all versions pointed at the same prod schema) and is superseded.

The schema reference is generated from the production API, so the apiKey*
operations appear once the FIP-07 feature ships to prod; the API Keys
narrative guide is available immediately.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dread added 2 commits July 12, 2026 21:20
npm ci was out of sync (lock still carried the removed doc-generator
dependency trees), which would fail the CI deploy build. Regenerated.
@magidoc/plugin-starter-variables imports lodash but was resolving it
transitively via the (now-removed) spectaql/@2fd/graphdoc trees. Declare
it explicitly so a clean 'npm ci' (as CI runs) resolves it. Verified:
clean npm ci + magidoc generate builds all 6 guides + reference.
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.

1 participant