Authoring
Authoring in Typeflows means writing your configurations as type-safe code instead of editing configuration files by hand. This changes configuration management from manual file editing to programmatic construction.
The Code-First Approach
Typeflows takes a different approach: you write configurations as code that generates the files your tools expect, with configuration errors caught at compile time rather than runtime.
DSL-Based Configuration
Typeflows uses Domain-Specific Languages (DSLs) that feel natural for each configuration domain. Instead of remembering complex syntax and formatting rules for different file formats, you work with intuitive, discoverable APIs that guide you toward correct configurations.
Creation Patterns
Immutability, consistency are key throughout the entire API design of Typeflows. Objects are configured in one of two basic ways, both of which favour the use of factory functions over direct constructor invocation.
Complex objects: create()
The create() pattern is central to Typeflows authoring for configuring complex objects. It provides a structured way to build complex configurations through nested blocks that mirror the logical structure of what you’re configuring:
Better Experience in Landscape Mode
The code examples look much better when viewed horizontally. Please rotate your device for the best experience!
Or view on a larger screen to see the code!
DotEnv.create(dotEnv -> {
dotEnv.fileName = ".env.example";
dotEnv.sections.add(DotEnv.Section.create("Application",
section -> {
// configure section
}));
});This pattern makes configurations both readable and maintainable, with clear hierarchies that match how you think about your infrastructure rather than the arbitrary structure of configuration file formats.
Simple objects: of()
Where there is no optional configuration to be done, the of() factory function is used:
Better Experience in Landscape Mode
The code examples look much better when viewed horizontally. Please rotate your device for the best experience!
Or view on a larger screen to see the code!
MarkdownContent.of("## Application");Programmatic Generation
Typeflows configurations are generally code, not templates or static files. This fundamental difference means you can generate configurations programmatically using all the constructs of modern programming languages.
Unlike templating systems that only support string substitution, Typeflows lets you generate entire configuration structures programmatically. Create hundreds of similar resources with loops, adapt configurations with conditionals, extract patterns into functions, or derive configurations from external data sources.
This changes configuration from declaration to generation. Instead of maintaining hundreds of similar configuration blocks, you maintain the logic that generates them.
IDE-Powered Development
Because Typeflows configurations are code, you get the full power of modern development environments:
- Autocomplete shows you all available configuration options as you type
- Error detection highlights syntax errors, type mismatches, and constraint violations immediately
- Refactoring tools let you rename, extract, and reorganise configurations with confidence
- Navigation enables jumping to definitions and finding usages across complex configurations
This IDE integration means configuration authoring becomes as productive and reliable as application development.
Configuration as Living Code
When configurations are written as code, they can:
- Evolve through refactoring rather than manual copy-paste
- Be tested for correctness before deployment
- Benefit from code review processes that catch issues early
- Integrate with version control to track changes and enable collaboration
This makes configurations maintainable software components rather than static files.
By treating configuration authoring as software development, Typeflows enables all the practices that make software reliable, maintainable, and collaborative to apply to configuration management.
What would you like to do next?
How do we distribute configurations?
How do we build complex structures?