Codegen
Codegen creates the first target codebase from the Bubble app and the selected tech stack.
It gives the agent a constrained working foundation before implementation starts. The foundation includes the application structure, database model, Bubble-compatible UI controls, and workflow runtime support.
Codegen runs during migration setup
Codegen is part of the migration flow. It does not need a separate command.
After you select a stack and complete setup, initialize the target codebase:
buildprint migration init my-appWhen discovery runs, Buildprint reads the Bubble workspace and generates the files that match the current source:
buildprint migration discover my-appThe result is a target project that the agent can run, inspect, and extend.
What Codegen creates
Codegen turns the parts of the Bubble app that can be generated safely into typed target code.
The Bubble data model becomes a Supabase and Drizzle schema, including relationships, list fields, and indexes needed by discovered searches.
Bubble option sets become typed modules with their values and attributes.
Bubble native controls become reusable Next.js components. Codegen adds the libraries and styles that those controls need.
The selected workflow provider receives the runtime scaffolding needed for backend and recurring workflows.
Data and file migration orchestratio
Codegen also creates the target project structure, service clients, authentication helpers, database scripts, environment file, and agent instructions for the selected stack.
The exact files depend on the app and the selected stack. For example, a Vercel Workflows migration receives the Vercel workflow runtime and recurring schedule support when the source uses recurring workflows.
Generated files support implementation
Codegen does not try to finish the application. It creates the parts that are deterministic and gives the agent clear places to add application behavior.
The migration plan then adds implementation, testing, and delivery work. The agent builds on the generated schema, components, and runtime instead of setting up each part by hand.