A batteries-included CLI that scaffolds production-ready mobile modules for Android, Flutter, and iOS using consistent architectural patterns.
MobWiz streamlines the tedious parts of module creation: it asks a few high-level questions (or accepts flags), picks the right template, and writes all the boilerplate for data, domain, and presentation layers. The result is a predictable module tree that mirrors the architecture standards your team already uses.
- Multi-platform scaffolding: Android (Kotlin), Flutter (Dart), and iOS (Swift) out of the box.
- Architecture-aware: Clean Architecture, MVVM, and BLoC templates with matching directory layouts.
- Interactive or scripted: Run
mobwiz createfor prompts or pass flags for CI/CD usage. - Smart templating: Uses Go templates plus utility funcs (
pascalCase,snakeCase, etc.) to keep files idiomatic. - Extensible: Customize
templates/templates.yamlor add your own.tmplfiles to expand coverage.
- Go 1.24 or later (
go env GOVERSIONto confirm) - Git (to clone the repo)
- macOS/Linux/Windows shell
go install github.com/chingiz/mobwiz@latestThis will place the mobwiz binary in your GOBIN (usually $(go env GOPATH)/bin or $GOBIN if set), so make sure that directory is on your PATH.
git clone https://github.com/chingiz/mobwiz.git
cd mobwiz
go build -o mobwiz ./...After building, add the binary to your PATH or run it from the repo root via ./mobwiz.
./mobwiz createYou’ll be guided through module name, platform, architecture, package identifiers, and optional extras (tests, DI, networking, local DB).
./mobwiz create \
--name Profile \
--platform "Flutter" \
--architecture "bloc" \
--package com.example.profileFlags make MobWiz deterministic—perfect for CI pipelines or scaffolding scripts. Omit the --package flag for non-Android modules.
| Platform | Architectures | Layers generated |
|---|---|---|
| Android (Kotlin) | mvvm |
Data (models, DAO, API, repository impl), Domain (models, repository, use cases), Presentation (ViewModel, Fragment) |
| Flutter (Dart) | bloc |
Domain entities/repositories/use cases, data repositories, presentation BLoC trio + page |
| iOS (Swift) | mvvm |
Domain entities/repositories/use cases, Data DTO/service/storage/repo impl, Presentation view/viewmodel/coordinator |
Templates live in templates/<platform>/<architecture>/... and are referenced through templates/templates.yaml. Add new template files and update the YAML to expand MobWiz’ reach.
Here is an example of what MobWiz generates for a Flutter module using Clean Architecture + BLoC:
lib/
├── data/
│ └── repositories/
│ └── profile_repository_impl.dart
├── domain/
│ ├── entities/
│ │ └── profile.dart
│ ├── repositories/
│ │ └── profile_repository.dart
│ └── usecases/
│ └── get_profile_usecase.dart
└── presentation/
├── bloc/
│ ├── profile_bloc.dart
│ ├── profile_event.dart
│ └── profile_state.dart
└── pages/
└── profile_page.dart
This predictable structure ensures that every team member knows exactly where to find logic, UI, and data handling code.
MobWiz uses templates/templates.yaml to map your choices (Platform + Architecture) to specific template files.
- platform: "Flutter"
architecture: "Clean Architecture + BLoC"
templates:
- template: "flutter/bloc/domain/entity.dart.tmpl"
output: "lib/domain/entities/{{snakeCase .Name}}.dart"
# ... other templatestemplate: Path to the source.tmplfile relative to thetemplates/directory.output: Destination path for the generated file. You can use Go template syntax and helper functions like{{snakeCase .Name}}or{{pascalCase .Name}}to dynamically name files.
command not found: mobwiz: Ensure your Go binary directory is in yourPATH.- Run
go env GOPATHto find your workspace. - Add
$GOPATH/binto your shell config (e.g.,~/.zshrcor~/.bashrc).
- Run
- Templates not found: If you installed from source, make sure you run
mobwizfrom the root of the repository or that thetemplates/directory is available relative to the binary if you moved it. (Future versions will embed templates into the binary).
# Run tests (add more as features expand)
go test ./...
# Verify lint/tooling (example)
golangci-lint run ./...When editing templates, keep placeholders in Go template syntax ({{ }}) and leverage helper funcs defined in the templating engine (see internal/generator/engine.go).
- Duplicate an existing platform folder in
templates/to add new architectural patterns. - Update
templates/templates.yamlwith newpath+templateentries. Paths support helper funcs like{{pascalCase .Name}}. - Extend the
Configstruct (ininternal/config) and prompt flow to add richer options such as networking stacks or dependency injection frameworks.
- Template packs for Jetpack Compose, SwiftUI, and Flutter Riverpod.
- Additional flags for opting in/out of tests, DI, or persistence.
- Exportable JSON/YAML of module definitions for documentation automation.
- Embed templates into the binary for easier distribution.
Issues and feature requests are welcome. Open a ticket or start a discussion to share ideas that could make MobWiz even more helpful.