Project Structure
Fluttron is a monorepo plus a project template generated by the CLI.
Repository Layout
Fluttron/
├── packages/
│ ├── fluttron_host/ # Host library (Flutter Desktop)
│ ├── fluttron_ui/ # Renderer library (Flutter Web)
│ └── fluttron_shared/ # Shared protocols
├── templates/ # CLI templates (app + web_package)
├── packages/fluttron_cli/ # CLI source
├── docs/ # Internal docs
├── website/ # Docusaurus documentation site
└── README.md
Generated Project Layout
After fluttron create, a project looks like:
hello_fluttron/
├── fluttron.json
├── host/ # Flutter Desktop app
└── ui/ # Flutter Web app
fluttron.json
Manifest for the project. Key fields:
entry.uiProjectPath: UI project folder (ui)entry.hostAssetPath: Host assets folder (host/assets/www)entry.index: entry file (defaultindex.html)window: title and size for the host window
host/
The host app loads Web assets from assets/www and exposes services.
Key files:
host/lib/main.dart: entry point, callsrunFluttronHost()host/assets/www/: Web build output (populated byfluttron build)host/assets/www/ext/: external frontend runtime assets (for examplemain.js,main.css)host/assets/www/ext/packages/: collected web package assets (for exampleext/packages/my_pkg/main.js)
ui/
The renderer app is a standard Flutter Web project.
Key files:
ui/lib/main.dart: entry point, callsrunFluttronUi()ui/lib/generated/web_package_registrations.dart: generated byfluttron buildui/web/index.html: Flutter Web shellui/frontend/src/main.js: frontend source entryui/web/ext/: frontend runtime output used byindex.htmlui/scripts/build-frontend.mjs: frontend build/clean script
Generated Web Package Layout
After fluttron create --type web_package, a package looks like:
my_web_package/
├── fluttron_web_package.json
├── pubspec.yaml
├── lib/
├── frontend/
└── web/ext/
Key points:
fluttron_web_package.jsondeclares view factories and assets.pubspec.yamlincludesfluttron_web_package: truemarker.frontend/builds JavaScript/CSS intoweb/ext/.
Next Steps
- Architecture Overview - Dual-layer architecture
- API Reference - Service APIs