Templates live in their own repo
Each style is a real, compiling Flutter app on its own branch of Thunder-Template (getx, bloc, cubit). Improving a template is a normal pull request, not an edit to strings inside the CLI.
Case study · Open source
A command-line tool that sets up Flutter projects and features with one command, so the boilerplate is never written by hand.
01Problem
Every new Flutter project started the same way, and so did every new feature or repository: I already knew which directories and files it needed, but creating and wiring them by hand was slow and tedious. So I built a CLI to do it for me — in 2023, before AI coding tools existed to help.
02My role
I designed Thunder and have maintained it since the first pub.dev release in September 2023. Version 3.0.0 is a full rebuild: new sub-commands, three state-management styles and a separate template repository.
03How it works
thunder init runs flutter create, then lays the chosen template on top: networking, DI, routing, theming, localization and a first feature. After that, each generator writes code in the style the project was created with.
$ dart pub global activate thunder_cli $ thunder init shop_app --state bloc $ cd shop_app $ thunder feature cart ✅ Create …/cart/bloc/cart_bloc.dart ✅ Create …/cart/cart_view.dart ✅ Register 'cart' in injection.dart $ thunder c_api --collection api.json $ thunder localization --from en --to ar,fr
04Key technical decisions
Each style is a real, compiling Flutter app on its own branch of Thunder-Template (getx, bloc, cubit). Improving a template is a normal pull request, not an edit to strings inside the CLI.
The state-management style is written to thunder.json at init. Every later command reads it, so a team never mixes styles by accident.
v3 moved to init, feature, model, c_api and localization sub-commands, while the 2.x --flags keep working and -y skips prompts in CI.
05Hard parts solved
If the template download fails — or with --offline — Thunder falls back to a copy of all three templates bundled inside the package, so init never depends on the network.
Earlier versions relied on Windows-only commands and \ paths. v3 builds every path through Dart's path package, so one codebase runs everywhere.
A feature becomes a controller, a bloc with events and state, or a cubit; a Postman folder becomes one bloc event or one cubit method per request.
06Outcome
I used Thunder on my own real projects, and starting a project or adding a feature stopped being repetitive manual work. Its CI generates a full app for each of the three styles, then runs flutter analyze and the tests on it.
Each dot is a published version (32 in total). Source: pub.dev API.
Source: git history of the main branch (Oct 31, 2026).
07Stack & links
© 2026 Abd Alftah Salem · Back to portfolio