Migrating from v2
Already have a v2 Gothic project? The CLI ships a one-shot migrator that moves it to v3 — from the old felipegenef/gothicframework imports and SAM deploys to the new gothicframework org modules and OpenTofu. Commit your work first, then preview every change with a dry run:
gothic migrate-v3 --dry-runWhen the plan looks right, apply it:
gothic migrate-v3In one pass, migrate-v3 automatically:
- - Generates gothic.config.go from your old gothic-config.json (backed up as .bak), carrying your cache settings into the Runtime block.
- - Rewrites main.go to gothicServer.Middleware(Config.Runtime) and your layout <head> to @gothicComponents.Styles() / RuntimeScripts().
- - Remaps every import to the new gothicframework org paths (core, components, middlewares).
- - Removes the old SAM artifacts, strips the retired topic-mount surface, rewrites go.mod, and runs go mod tidy.
Important: if you have a live v2 stack, follow the printed tofu import playbook after your first gothic deploy so existing resources (S3 contents, CloudFront config) are adopted instead of recreated. Then re-run templ generate and gothic wasm, hand-review the diff, and you're on v3.
That's the whole framework, end to end. Thanks for reading — jump back to the start any time!
