Documentation
¶
Overview ¶
Package scaffold generates a Cloudflare-ready fullstack Next.js starter (App Router + Drizzle + better-auth + R2 + Workers AI + proxy.ts guard) from embedded templates. It powers `nextdeploy init` when the user opts to scaffold a new app rather than deploy their existing one.
The DB layer is pluggable: "d1" (Cloudflare native SQLite) or "byo" (bring-your-own Postgres via Hyperdrive). A db-<variant> overlay is written on top of the shared base.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Scaffold ¶
Scaffold writes the base template plus the db-<variant> overlay into opts.Dir, substituting the app name. Existing files are never overwritten — their paths are returned in `skipped` so the caller can report them. Returns the written (created) paths and the skipped (pre-existing) paths, both sorted.
func TemplateFiles ¶
TemplateFiles returns the relative paths shipped for a given variant (base + overlay), sorted. Used by tests and the init summary.