Documentation
¶
Overview ¶
Package gofastrplugins embeds the plugin source tree that cmd/gofastr-plugin vendors into a consumer's repo, so the eject CLI is hermetic: no network, no module-cache archaeology, no `go` subprocess at eject time. The CLI reads every byte it writes from this package.
It lives at the REPO ROOT for one reason: `//go:embed` can only reach paths inside the directory of the .go file that carries the directive (or below it), never a sibling or a parent. The repo root is the only directory that contains every plugin package, so it is the only place a single embed can reach richtext/, mermaid/, monaco/, pdf/, tour/, and geomap/ at once.
Nothing else should import this package. It is roughly ten megabytes of embedded bundles and exists for the eject CLI alone; pulling it into a binary that does not eject would bloat that binary for nothing.
Index ¶
Constants ¶
const ModulePath = "github.com/DonaldMurillo/gofastr-plugins"
ModulePath is this repo's own Go module path — the import-prefix every ejected file rewrites away. It is a const (not parsed from go.mod at runtime) because it is structural: the embed patterns below are written against it, the lock file records it as "source", and the import rewriter anchors on it. If the module were ever renamed, every one of those would need to change in the same commit, so a literal that fails to compile-check is the wrong shape.
Variables ¶
var GoFastrVersion = parseGoFastrVersion(goMod)
GoFastrVersion is the published gofastr release this repo pins in go.mod — the version a consumer must `go get` to compile an ejected plugin, since the rewrite points every pluginhost import at it. Parsed once from the embedded go.mod at package init. Empty means the embedded go.mod did not match (a malformed module file); the CLI treats empty as "could not determine" and says so rather than guessing a version.
var GoVersion = parseGoVersion(goMod)
GoVersion is the Go language version the embedded sources require, read from the same go.mod. A consumer whose own `go` directive is older than this gets a genuinely confusing failure — the build stops on a TOOLCHAIN resolution error naming a transitive gofastr package ("toolchain upgrade needed to resolve .../core-ui/style"), which reads as a broken dependency rather than as "raise your go directive". Go will not auto-upgrade the toolchain for a module that asks for less than it needs, so nothing self-corrects.
Surfacing the floor next to the `go get` is the cheap fix: the operator owns the go.mod edit, and this is the number they need to make it.
Functions ¶
func RegistryJSON ¶
func RegistryJSON() []byte
RegistryJSON is the embedded curated index (plugins.json). It is the same bytes a host would fetch from the release asset — eject reuses it rather than re-deriving plugin metadata, so the registry the CLI sees and the registry a consumer vendors are always byte-identical.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package calendar is the GoFastr calendar plugin: a month/week/day calendar written from scratch — no FullCalendar, no upstream JS library at all — where the parts everyone gets wrong live in Go, not in the frame.
|
Package calendar is the GoFastr calendar plugin: a month/week/day calendar written from scratch — no FullCalendar, no upstream JS library at all — where the parts everyone gets wrong live in Go, not in the frame. |
|
Package chart is the chart plugin: one canonical chart-v1 spec, two renderers that must agree.
|
Package chart is the chart plugin: one canonical chart-v1 spec, two renderers that must agree. |
|
ssr
Package ssr renders a chart-v1 spec to a standalone SVG in pure Go.
|
Package ssr renders a chart-v1 spec to a standalone SVG in pure Go. |
|
cmd
|
|
|
gofastr-plugin
command
Command gofastr-plugin vendors a GoFastr plugin into a consumer's own repo, shadcn-style: it copies the plugin's source so the consumer owns and can edit it, with no dependency on gofastr-plugins left behind.
|
Command gofastr-plugin vendors a GoFastr plugin into a consumer's own repo, shadcn-style: it copies the plugin's source so the consumer owns and can edit it, with no dependency on gofastr-plugins left behind. |
|
Package datagrid is the GoFastr data-grid plugin: AG Grid Community's infinite row model inside an opaque-origin sandboxed iframe, with sort, filter and paging executed by the HOST's Go rows source instead of the frame.
|
Package datagrid is the GoFastr data-grid plugin: AG Grid Community's infinite row model inside an opaque-origin sandboxed iframe, with sort, filter and paging executed by the HOST's Go rows source instead of the frame. |
|
Command example is the single GoFastr app that imports and mounts every plugin in this repo.
|
Command example is the single GoFastr app that imports and mounts every plugin in this repo. |
|
Package formbuilder is the GoFastr form-builder plugin: an authoring tool for the framework itself, not another content editor.
|
Package formbuilder is the GoFastr form-builder plugin: an authoring tool for the framework itself, not another content editor. |
|
Package genui is the GoFastr generative-UI plugin: a model composes a view out of a FIXED registry of React components, and nothing else.
|
Package genui is the GoFastr generative-UI plugin: a model composes a view out of a FIXED registry of React components, and nothing else. |
|
Package geomap is a GoFastr plugin that ships a TRUSTED host-page interactive vector map built on MapLibre GL + OpenFreeMap tiles.
|
Package geomap is a GoFastr plugin that ships a TRUSTED host-page interactive vector map built on MapLibre GL + OpenFreeMap tiles. |
|
Package imageedit is the GoFastr image crop / annotate / redact plugin.
|
Package imageedit is the GoFastr image crop / annotate / redact plugin. |
|
internal
|
|
|
registry
Package registry defines the schema of the curated plugin index and keeps it honest.
|
Package registry defines the schema of the curated plugin index and keeps it honest. |
|
Package logstream is the GoFastr log-tail plugin: xterm.js inside an opaque-origin sandboxed iframe, fed by a line source the HOST pushes across the postMessage bridge without ever being asked.
|
Package logstream is the GoFastr log-tail plugin: xterm.js inside an opaque-origin sandboxed iframe, fed by a line source the HOST pushes across the postMessage bridge without ever being asked. |
|
Package pdf is the GoFastr PDF viewer / editor / redactor plugin.
|
Package pdf is the GoFastr PDF viewer / editor / redactor plugin. |
|
cmd/spike
command
Command spike serves ONLY the pdf plugin (with its demo page) for the throwaway WebKit probe at pdf/js/spike-webkit.mjs.
|
Command spike serves ONLY the pdf plugin (with its demo page) for the throwaway WebKit probe at pdf/js/spike-webkit.mjs. |
|
Package pluginhost re-exports the GoFastr heavy-JS plugin platform.
|
Package pluginhost re-exports the GoFastr heavy-JS plugin platform. |
|
Package posthog is the packaged, one-call version of the PostHog recipe from gofastr's analytics-recipes docs: PostHog's script and ingestion endpoints served first-party through battery/relay, a host-authored bootstrap that loads the real posthog-js loader through the relay, identity from the app's session via a same-origin whoami endpoint, and pageviews that track GoFastr's client-side navigation.
|
Package posthog is the packaged, one-call version of the PostHog recipe from gofastr's analytics-recipes docs: PostHog's script and ingestion endpoints served first-party through battery/relay, a host-authored bootstrap that loads the real posthog-js loader through the relay, identity from the app's session via a same-origin whoami endpoint, and pageviews that track GoFastr's client-side navigation. |
|
recipes
|
|
|
blogapp
command
Command blogapp is the authored blog recipe: posts live in SQLite and are written in the browser with this repository's sandboxed rich text plugin.
|
Command blogapp is the authored blog recipe: posts live in SQLite and are written in the browser with this repository's sandboxed rich text plugin. |
|
blogsite
command
Command blogsite is the markdown blog recipe: a complete blog whose content is a directory of markdown files, with no database, no build step, and none of the plugins in this repository.
|
Command blogsite is the markdown blog recipe: a complete blog whose content is a directory of markdown files, with no database, no build step, and none of the plugins in this repository. |
|
relayboard
command
Command relayboard is the analytics recipe: a three-screen product whose funnel is measured end to end through this repository's posthog integration — campaign attribution on the landing page, identified users from real accounts, an A/B-tested hero, and a server-side gate that asks PostHog per request.
|
Command relayboard is the analytics recipe: a three-screen product whose funnel is measured end to end through this repository's posthog integration — campaign attribution on the landing page, identified users from real accounts, an A/B-tested hero, and a server-side gate that asks PostHog per request. |
|
Package richtext is a full Rich Text block editor plugin for GoFastr, built on ProseMirror and delivered as a genuinely third-party, isolated heavy-JS plugin.
|
Package richtext is a full Rich Text block editor plugin for GoFastr, built on ProseMirror and delivered as a genuinely third-party, isolated heavy-JS plugin. |
|
ssr
Package ssr renders canonical Rich Text block-JSON (a ProseMirror doc, schema version "richtext-v1") into design-token HTML for the no-JS first paint.
|
Package ssr renders canonical Rich Text block-JSON (a ProseMirror doc, schema version "richtext-v1") into design-token HTML for the no-JS first paint. |
|
Package scanner is the GoFastr barcode-scanner plugin: @zxing/library inside an opaque-origin sandboxed iframe, fed GRAYSCALE pixels the HOST page captures and pushes across the postMessage bridge.
|
Package scanner is the GoFastr barcode-scanner plugin: @zxing/library inside an opaque-origin sandboxed iframe, fed GRAYSCALE pixels the HOST page captures and pushes across the postMessage bridge. |
|
Package sqlnotebook is the GoFastr SQL notebook plugin: a real SQLite engine (sql.js, SQLite compiled to WebAssembly) running INSIDE the opaque-origin sandboxed iframe, queried from a host-page notebook UI.
|
Package sqlnotebook is the GoFastr SQL notebook plugin: a real SQLite engine (sql.js, SQLite compiled to WebAssembly) running INSIDE the opaque-origin sandboxed iframe, queried from a host-page notebook UI. |
|
Package tour is a GoFastr plugin that ships a trusted, host-page guided-tour runtime (Appcues-style product tours).
|
Package tour is a GoFastr plugin that ships a trusted, host-page guided-tour runtime (Appcues-style product tours). |
|
Package whiteboard is the GoFastr collaborative-whiteboard plugin: a small canvas board inside an opaque-origin sandboxed iframe, whose document is a Yjs CRDT relayed BETWEEN BROWSERS by the host.
|
Package whiteboard is the GoFastr collaborative-whiteboard plugin: a small canvas board inside an opaque-origin sandboxed iframe, whose document is a Yjs CRDT relayed BETWEEN BROWSERS by the host. |