A cross-platform desktop toolkit for IoT developers — built with Flutter.
MQTT device simulator · JSON formatter · Text diff · Timestamp converter · X.509 certificate generator · Timesheet.
- Highlights
- Screenshots
- Architecture
- Design System
- Tech Stack
- Getting Started
- Project Structure
- UI Consistency
- Build & Release
- Platforms
- Roadmap
- Author & License
| Feature | Description | |
|---|---|---|
| 📡 | MQTT Simulator | Single or thousands of virtual devices; publish telemetry, enable topic subscriptions, auto-ack RPC requests, import/export profiles, and run low-latency schedules with drop-vs-catch-up control |
| 🔐 | Certificate Generator | One-click X.509 bundle for IoT brokers (ThingsBoard / EMQX). CA + device cert + key + ready-to-deploy zip |
| 🧾 | JSON Formatter | Validate / minify / format; interactive collapsible tree; in-tree key/value search; auto-persists last input |
| 🔀 | Text Diff | Local side-by-side line comparison with add/remove/change markers, line numbers, swap, and unified patch copy; opt-in from Settings |
| ⏱ | Timestamp Converter | ms-precision live clock; bi-directional Unix ↔ ISO; full IANA timezone list; one-click copy |
| 📅 | Timesheet | Log work entries, weekly report copy, local-only persistence; opt-in from Settings |
| 🎨 | 8 Themes | Lab Console design system — 5 dark (Signal / Plasma / Cobalt / Amber / Mint) + 3 light (Paper / Linen / Slate) |
| 🌐 | i18n | Full English + 简体中文; all user-facing text in .arb files, no hardcoded strings |
| 🖥 | Desktop-native | macOS / Windows / Linux. Window state, file picker, native menus; no mobile-first compromises |
Screenshots are captured from the current macOS release build and kept under docs/screenshots/.
IoT DevKit is organized as a desktop product with a stable app shell, feature modules, service boundaries, and repeatable release automation.
flowchart LR
Shell["App Shell\nNavigationRail · Settings · Optional Features"] --> Screens["Feature Screens\nSimulator · Tools · Timesheet"]
Screens --> ViewModels["ViewModels\nChangeNotifier state"]
ViewModels --> Services["Services\nMQTT · Certificates · Profiles · Storage"]
Services --> Runtime["Desktop Runtime\nmacOS · Windows · Linux"]
Design["Lab Console Design System\nTokens · Themes · Components"] --> Shell
Design --> Screens
Tests["Quality Gates\nanalyze · custom_lint · widget smoke · golden"] --> Design
Tests --> Services
| Area | What it owns |
|---|---|
| App shell | Stable feature IDs, optional-feature visibility, keyboard shortcuts, settings, theme/language switching, status banner |
| Simulator | MQTT connection lifecycle, telemetry payloads, subscriptions, RPC auto-ack, metrics, log console |
| Tool pages | Timestamp conversion, JSON tooling, local text diff, certificate package generation and endpoint checks |
| Services | Broker clients, scheduler, text diff, profile import/export, certificate generation, local storage |
| Design system | Lab tokens, 8 themes, atomic components, custom lint rules, golden baselines |
The Lab Console design system — 8 themes × 5 atomic component groups — is fully golden-tested. The PNGs below are the actual rendered baselines that gate every PR:
Explore the live gallery:
flutter run -d macos -t lib/main_gallery.dart| Layer | Choice |
|---|---|
| Framework | Flutter 3.41.8 (Material 3) |
| Language | Dart >=3.0.0 <4.0.0 |
| State | provider (ChangeNotifier) |
| MQTT | mqtt_client |
| Storage | shared_preferences |
| i18n | flutter_localizations + .arb |
| Crypto | pointycastle + basic_utils for X.509 |
| Charts | fl_chart |
| Desktop | window_manager + file_picker |
| Packaging | flutter_distributor + Inno Setup (Windows) |
| Visual regression | golden_toolkit |
| Static analysis | flutter_lints + custom lab_lints (3 rules) |
- Flutter SDK — pinned to
3.41.8for reproducible CI builds - VS Code or Android Studio
- Desktop toolchain: Xcode (macOS), Visual Studio 2022 + Desktop C++ (Windows), GTK 3 (Linux)
git clone https://github.com/bcblr1993/iot_devkit_flutter.git
cd iot_devkit_flutter
flutter pub get
flutter run -d macos # or: -d windows / -d linuxflutter run -d macos -t lib/main_gallery.dartlib/
├── main.dart # App entry + Provider wiring
├── main_gallery.dart # Lab design-system gallery entry
├── l10n/ # .arb sources (en / zh) + generated AppLocalizations
├── models/ # Plain data classes (configs, schema, simulation context)
├── viewmodels/ # ChangeNotifier state (MqttViewModel, TimesheetProvider)
├── services/
│ ├── mqtt/ # Client manager + send scheduler
│ ├── lab_theme_manager.dart # 8-theme persistence
│ ├── profile_service.dart # Profile import/export
│ ├── certificate_*.dart # X.509 generation + zip packaging
│ └── log_storage_service.dart
├── utils/ # isolate worker, dialogs, toast, statistics
└── ui/
├── shell/ # NavigationRail + content switcher + status banner
├── screens/ # Top-level screens (Home, Timesheet)
├── lab/ # ✨ Design system — tokens + atomic components
│ ├── tokens/ # LabTokens, LabThemes, OKLCH, text theme
│ └── components/ # LabButton / LabField / LabSection / LabDialog / ...
├── components/ # Project-wide shared widgets
├── tools/ # Standalone tool screens (JSON / Text Diff / Timestamp / Cert)
├── widgets/ # Simulator-specific widgets
└── styles/ # Legacy theme constants
tooling/lab_lints/ # Custom analyzer rules (color / spacing / radius)
test/golden/ # Visual regression goldens (signal + paper)
test/widgets/ # Widget smoke tests
docs/ # Design system docs, UI consistency guide, releases
The project ships a three-layer defense against UI drift — every PR runs them in CI:
L1 static │ flutter analyze + dart run custom_lint (lab_lints rules)
L2 visual │ flutter test test/golden/ (golden PNG diff)
L3 smoke │ flutter test test/widgets/ (widget smoke)
One-shot local check:
./scripts/ui_check.shRefresh goldens after intentional component changes (with manual review):
./scripts/ui_golden_update.sh [component_name]Full guide & PR checklist: docs/ui_consistency_guide.md.
flutter build macos --release # → build/macos/Build/Products/Release/
flutter build windows --release # → build/windows/runner/Release/
flutter build linux --release # → build/linux/x64/release/bundle/dart pub global activate flutter_distributor
flutter_distributor release --name release --jobs macos-dmg
flutter_distributor release --name release --jobs windows-exe # requires Inno SetupPush an annotated tag like v1.6.6 — .github/workflows/release.yml builds macOS + Windows + Linux artifacts and creates a GitHub Release. Release notes are sourced from docs/releases/vX.Y.Z.md if present.
| OS | Build | Distribution |
|---|---|---|
| macOS 12+ (Intel & Apple Silicon) | ✅ | .dmg via flutter_distributor |
| Windows 10 / 11 (x64) | ✅ | .exe installer via Inno Setup |
| Linux (Ubuntu 22.04+) | ✅ | tarball |
Note: you cannot cross-build Windows artifacts from macOS / Linux. Use
.github/workflows/release.ymlfor all three platforms.
- MQTT 3.1.1 protocol selection
- Lab Console design system + 8 themes
- UI consistency three-layer defense (static + visual + smoke)
- Migrate remaining 25 legacy files to LabTokens
- MQTT 5 support
- Plug-in payload generators (custom Dart snippets)
- Recorded session replay
Open an issue to suggest more.
Built by Chen Xu (@bcblr1993).
License: see repository root. If no LICENSE file is present, all rights are reserved by the author until one is added.
If this saves you time, consider giving the repo a ⭐ — it helps others find it.








