Generate And Host A System
Use this workflow after the model has enough detail to become generated software.
Before You Generate
Generation works best when the model is explicit. Review command ownership, aggregate boundaries, event payloads, policies, read models, interfaces, and unresolved hotspots.
- Every command has an initiator, target aggregate, required input, and success event.
- Every aggregate has identity, handled commands, emitted events, and invariants.
- Every policy has a trigger, condition, and resulting command.
- Every user-facing task has a read model and query.
- Every integration boundary has a contract owner and failure handling.
Step 1: Choose Generation Scope
Select the bounded context, workflow, or full canvas area to generate. Start with one bounded context when the model is large. Smaller generation scope makes review and iteration easier.
Step 2: Select Architecture Options
- Persistence style: current-state, event-sourced, or mixed by aggregate.
- CQRS depth: simple command/query split, separate read models, or event-fed projections.
- Interface generation: APIs, admin pages, portals, dashboards, or workflow screens.
- Integration style: webhooks, message bus, REST API, file exchange, or manual import/export.
- Hosting target: local project, customer-managed infrastructure, or SAAScade Cloud.
Step 3: Resolve Warnings
Code Genie may warn about disconnected blocks, missing event payloads, ambiguous command names, policy loops, oversized aggregates, unresolved hotspots, or integration events without subscribers. Resolve generation blockers before creating production code.
Step 4: Generate Code
Generate the application structure. Review generated commands, domain events, aggregate tests, read models, user interfaces, and integration contracts. Treat the first generation as a design review artifact as much as a code artifact.
Step 5: Configure Environments
- Development: rapid iteration and local validation.
- Test: business acceptance, integration tests, and review of generated workflows.
- Production: locked configuration, monitoring, backup, audit, and access controls.
Step 6: Deploy To SAAScade Cloud
When you choose SAAScade Cloud, Code Genie can host the generated system for you. Confirm the application name, region, environments, identity configuration, database settings, secrets, integrations, and operational contacts before deployment.
After deployment, validate the generated application with real scenarios from the canvas: submit commands, confirm events, inspect read models, test policies, and verify external integrations.
Step 7: Keep The Canvas Alive
The canvas should remain the source of product and architecture intent. When the business changes, update the model, review the impact, regenerate the affected area, and keep the generated system aligned with the shared language.