Modelizer
OverviewModelizer is an intelligent, bidirectional VS Code companion engineered specifically for Flutter and Dart developers practicing Clean Architecture. Unlike traditional "one-way" code generator scripts that destroy user modifications upon re-run, Modelizer embeds a syntax-aware Dart Lexer, AST Parser, and surgical source patcher. It not only generates pristine Domain Entities and Data Models from JSON, but also intelligently modifies existing files whenever you add, edit, rename, or remove fields—preserving all comments, annotations, and custom business logic. Key Features
Supported Workflows
1. Generate from JSON (Workflow A)
2. Add Field to Existing Model / Entity (Workflow B)
3. Rename Field (Workflow C)
4. Remove Field (Workflow D)
5. Synchronize Entity and Model (Workflow E)
6. Regenerate Members (Workflow F)
Code Generation ExampleGenerated Domain Entity (
|
| Setting | Type | Default | Description |
|---|---|---|---|
modelizer.dateStrategy |
enum |
'iso8601' |
Date strategy: 'iso8601', 'timestamp', or 'string'. |
modelizer.equalityStrategy |
enum |
'plain' |
'plain' (Dart operator== & hashCode) or 'equatable'. |
modelizer.copyWithStrategy |
enum |
'standard' |
'standard' (clean idiomatic copyWith) or 'sentinel'. |
modelizer.formatWithDart |
boolean |
true |
Automatically run dart format when Dart SDK is available. |
modelizer.defaultModelSuffix |
string |
'Model' |
Suffix for generated data model classes. |
modelizer.defaultEntitySuffix |
string |
'Entity' |
Suffix for generated domain entity classes. |
Installation
From VS Code Marketplace
Search for Modelizer by Soham Kolhe in the Extensions view (Cmd+Shift+X / Ctrl+Shift+X), or install via terminal:
code --install-extension sohamkolhe.modelizer
From VSIX Package Directly
code --install-extension modelizer-1.0.1.vsix
Method 2: From VS Code Extensions View
- Open VS Code.
- Press
Cmd+Shift+X(macOS) orCtrl+Shift+X(Windows/Linux) to open the Extensions view. - Click the
...menu in the top right of the Extensions panel. - Select Install from VSIX...
- Choose
modelizer-1.0.1.vsix.
Available Commands
Access all commands via Command Palette (Cmd+Shift+P on macOS / Ctrl+Shift+P on Windows/Linux) or the Modelizer Sidebar:
| Command | Identifier | Description |
|---|---|---|
| Focus Sidebar | modelizer.openSidebar |
Opens the Modelizer Clean Architecture sidebar panel |
| Generate From JSON | modelizer.generateFromJson |
Generate paired Entity and Model from raw JSON |
| Generate Entity | modelizer.generateEntity |
Generate pure Domain Entity from JSON |
| Generate Model | modelizer.generateModel |
Generate Data Model from JSON |
| Add Selected Fields to UI Entity | modelizer.addToUiEntity |
Parses comma-separated selection and injects into UI Entity |
| Add Selected Fields to Entity or Model | modelizer.addToEntityOrModel |
Parses selection and injects into Domain Entity or Model |
| Add Selected Fields to Class | modelizer.addFieldsFromSelection |
Adds comma-separated fields to any targeted class |
| Add Field | modelizer.addField |
Add a single field to an existing Dart class via prompts |
| Edit Field | modelizer.editField |
Update type, nullability, or default value of an existing field |
| Rename Field | modelizer.renameField |
Rename a field and update constructor, copyWith, & JSON mappings |
| Remove Field | modelizer.removeField |
Safely removes a field and all its references from a class |
| Sync Entity and Model | modelizer.syncEntityAndModel |
Detects drift and synchronizes fields between Entity and Model |
| Regenerate Members | modelizer.regenerateMembers |
Re-builds constructor, copyWith, and JSON serialization |
| Accept All Changes | modelizer.acceptAll |
Accepts all proposed changes from the review queue |
| Reject All Changes | modelizer.rejectAll |
Discards all proposed changes from the review queue |
Local Development Setup
Prerequisites:
- Node.js:
v20.xor higher - npm:
v10.xor higher - VS Code:
^1.85.0
# 1. Clone repository
git clone https://github.com/sohamkolhe9829/modelizer.git
cd modelizer
# 2. Switch to development branch
git checkout dev
# 3. Install dependencies
npm ci
# 4. Compile TypeScript in watch mode
npm run watch
# 5. Execute test suite
npm test
# 6. Package extension VSIX locally
npm run package
Press F5 in VS Code to open an Extension Development Host window and test live changes with full debugging capabilities.
Branch Strategy & Contributing
Modelizer follows a strict two-branch version control policy:
main: Protected branch containing only production-ready, release-tested code. Releases are published exclusively frommain.dev: Active integration branch for development. All feature and bugfix branches merge intodev.
For full details on Conventional Commits, Semantic Versioning, Pull Request guidelines, and release procedures, see VERSION_CONTROL_RULES.md.
Documentation Links
- Software Requirements Specification (SRS.md)
- Implementation & Architecture Guide (IMPLEMENTATION.md)
- Version Control & Release Rules (VERSION_CONTROL_RULES.md)
License
Released under the MIT License.