Define Entire Apps in Code
The builder is the right tool for most changes. Quick adjustments, layout tweaks, field additions — the visual interface handles them efficiently. But developers working on platform-level structures, building new application modules, or setting up environments programmatically need something different.
They need to define applications in code.
Definitions as Data
Every application structure in Swifty — data objects, screens, navigation, permissions — is driven by definitions. Definitions are structured configuration: they describe what exists, how it behaves, and how it relates to other things. The platform reads definitions at runtime and assembles the application from them.
Because definitions are data, they can come from anywhere: a database, a file, or code. The platform doesn't care about the source — only the shape of the definition matters.
Type-Safe Application Definitions
Developers can now write application definitions directly in code using structured definition builders. Instead of navigating the builder to create a data object, you describe it programmatically:
- Define object types with their field specifications
- Specify field types, validation rules, options, and relationships
- Set default screens, list columns, and form layouts
- Configure navigation structure and permissions
- Attach lifecycle events and computed fields
The definitions are type-checked. Errors surface at definition time, not at runtime. If a field references a type that doesn't exist, or a screen references a field that isn't defined, you'll know immediately.
Fixtures and Seeding
The code-based definition system integrates with fixture workflows. Defining your platform-level application structure in code means it can be version-controlled, reviewed in pull requests, and applied consistently to every environment.
Spinning up a new workspace? Apply the fixtures and the workspace has the full application structure immediately, without manual builder work. The state is reproducible.
Platform vs. Tenant Level
Code-based definitions operate at the platform level. They establish the baseline structure that all workspaces inherit. Tenant-level customizations — field additions, layout adjustments, custom options — are still made through the builder and stored separately.
This separation is intentional. Platform definitions are stable infrastructure. Tenant customizations are flexible extensions. Both coexist cleanly because the definition system was designed with scope in mind.
Built for Teams
Code-based definitions give development teams a natural place to own application structure. Definitions live in the repository alongside the rest of the application code. Changes go through the normal review process. Deployments carry the latest definitions automatically.
This closes the gap between what developers have defined and what the running application reflects — no more manual builder steps required to apply structural changes after deployment.