⚙️ Managing Project Variables
Project variables allow you to customize your template generation dynamically.
🆕 New: JSON Variable Support
You can now load a JSON file and use its contents as a variable.
📸 Screenshots:
-
🖼️ Project Variables Panel
-
🖼️ JSON Load Example
-
🖼️ Loaded JSON Result
Adding Variables
- On the Project Nav Bar, click Project Variables.
- Click Add Variable.
-
Provide:
-
Name (e.g.,
project_name
) - Type (string, boolean, list, map, json)
- Default Value (optional or file path for JSON)
Variable Types
Type | Description | Example |
---|---|---|
String | Text value | "MyApp" |
Boolean | True or False | true |
List | List of values | ["feature1", "feature2"] |
Map | List of key-value pairs | [{"name": "John"}] |
JSON | Load json from file or url | - |
Using Variables in Templates
- Use
{{variable_name}}
in filenames and file contents. - Supports loops, conditions, and chaining (see Templates.md).
Editing Variables
- Update variable values anytime in Project Variables.
- JSON variables re-parse on change.
- Changes apply immediately in project generation.
Best Practices
- Use clear and consistent variable names.
- Provide defaults for optional variables.
- Group related variables logically.
- Use JSON for structured config (e.g., OpenAPI, settings, data models).
➡️ Next: Build-in Functions