Migrate an Existing Project
The CLI ships a one-shot migrator for projects using the legacy felipegenef/gothicframework imports and SAM deployment structure. It updates them to the 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 legacy 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 review the completed migration.
That's the whole framework, end to end. Thanks for reading — jump back to the start any time!
