{"id":32556504,"url":"https://github.com/opensoft/flutterbench","last_synced_at":"2026-06-15T16:31:56.301Z","repository":{"id":320232560,"uuid":"1069909222","full_name":"opensoft/flutterBench","owner":"opensoft","description":"This is a devcontainer setup for Flutter development. Scripts for setting up new devcontainer projects with well manered containers.","archived":false,"fork":false,"pushed_at":"2026-05-27T20:19:04.000Z","size":513,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-27T22:12:57.469Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opensoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-04T21:28:13.000Z","updated_at":"2026-05-27T20:19:15.000Z","dependencies_parsed_at":"2025-10-22T18:36:32.159Z","dependency_job_id":null,"html_url":"https://github.com/opensoft/flutterBench","commit_stats":null,"previous_names":["opensoft/flutterbench"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opensoft/flutterBench","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensoft%2FflutterBench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensoft%2FflutterBench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensoft%2FflutterBench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensoft%2FflutterBench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensoft","download_url":"https://codeload.github.com/opensoft/flutterBench/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensoft%2FflutterBench/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34372121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-28T22:56:52.266Z","updated_at":"2026-06-15T16:31:56.294Z","avatar_url":"https://github.com/opensoft.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 FlutterBench - Flutter Development Environment\n\nA comprehensive Flutter development environment with DevContainer templates and project creation tools.\n\n## 🧱 Container Architecture (Layered)\n\nFlutterBench is standardizing on the layered workBenches model:\n- **Layer 0**: `workbench-base:latest`\n- **Layer 1a**: `dev-bench-base:latest`\n- **Layer 2**: `flutter-bench:latest` (bench-specific tools)\n- **Layer 3**: `flutter-bench:{user}` (user image built from Layer 2)\n\n### Legacy Note\nAny monolithic `.devcontainer/` Dockerfiles are **deprecated**. The layered images are the source of truth going forward.\n\n## Bench Image Workflow\n\nUse these commands for the bench itself:\n\n```bash\n# Check whether Flutter bench images are current\n./scripts/rebuild-stack.sh --check\n\n# Rebuild Layer 2 and Layer 3\n./scripts/build-layer.sh\n\n# Start the bench container from the prebuilt user image\n./scripts/start-monster.sh\n```\n\n`./scripts/start-monster.sh` no longer builds a monolithic devcontainer image. It ensures `flutter-bench:latest` exists, refreshes `flutter-bench:${USER}` if needed, and then starts the bench container from the layered image.\n\n## Flutter SDK policy\n\n`flutterBench` now carries two SDK tracks in Layer 2:\n\n- `/opt/flutter` — the shared current stable SDK used as the default `flutter`\n- `/opt/flutter-3.27.0` — the long-term supported Flutter 3.27 line for pinned repos\n\nShell helpers exposed in bench user environments:\n\n- `flutter` / `dart` → current stable\n- `flutter327` / `dart327` → pinned Flutter 3.27.0\n\nUse project-local FVM where the repo pins a version. The baked 3.27 SDK exists to avoid slow first-run downloads for long-lived pinned projects.\n\n## 🎯 Purpose\n\nFlutterBench provides two ways to create Flutter projects with DevContainer support:\n\n1. **🤖 Automated Setup** - Use `new-flutter-project.sh` for quick, standardized project creation\n2. **🔧 Manual Setup** - Copy templates manually for maximum customization control\n\n## 📁 Structure\n\n```\nflutterBench/\n├── scripts/\n│   ├── new-flutter-project.sh        # Automated project creation\n│   ├── new-dartwing-project.sh       # DartWing project creation  \n│   ├── update-flutter-project.sh     # Update existing projects\n│   ├── launch-devbench.sh           # Launch development container\n│   └── start-monster.sh             # Container startup script\n├── templates/\n│   └── flutter-devcontainer-template/  # DevContainer template\n│       ├── .devcontainer/            # VS Code DevContainer config\n│       ├── .vscode/                  # VS Code settings \u0026 tasks\n│       ├── scripts/\n│       │   ├── manual-setup-project.sh  # Manual setup validation\n│       │   └── README.md             # Script usage guide\n│       ├── .env.example             # Environment template\n│       └── README.md               # Template documentation\n└── docs/                           # Additional documentation\n```\n\n## 🚀 Getting Started\n\n### Option 1: Automated Setup (Recommended)\n\n**Best for**: New projects, standardized setup, quick start\n\n```bash\n# Navigate to flutterBench scripts\ncd /path/to/workBenches/devBenches/flutterBench/scripts\n\n# Create new Flutter project with DevContainer\n./new-flutter-project.sh my-flutter-app\n\n# Or specify custom target directory  \n./new-flutter-project.sh my-flutter-app ~/projects/special-projects\n```\n\n**What it does automatically:**\n- ✅ Creates Flutter project using `flutter create`\n- ✅ Copies and configures DevContainer template\n- ✅ Sets up environment variables (`.env`)\n- ✅ Configures user UID/GID for proper permissions\n- ✅ Sets up infrastructure paths\n- ✅ Includes specKit for spec-driven development\n- ✅ Ready to open in VS Code\n\n### Option 2: Manual Setup (Advanced)\n\n**Best for**: Existing projects, template customization, learning/understanding\n\n```bash\n# 1. Create or navigate to your Flutter project\nflutter create my-flutter-app  # or use existing project\ncd my-flutter-app\n\n# 2. Copy template files\nTEMPLATE_PATH=\"/path/to/workBenches/devBenches/flutterBench/templates/flutter-devcontainer-template\"\ncp -r \"$TEMPLATE_PATH/.devcontainer\" .\ncp -r \"$TEMPLATE_PATH/.vscode\" .\ncp -r \"$TEMPLATE_PATH/scripts\" .\ncp \"$TEMPLATE_PATH/.env.example\" .\n\n# 3. Set up environment configuration\ncp .env.example .env\n# Edit .env file with your project settings...\n\n# 4. Validate setup (IMPORTANT!)\n./scripts/manual-setup-project.sh\n```\n\n**When to use manual setup:**\n- ✅ Adding DevContainer to existing Flutter project\n- ✅ Need to customize template before applying\n- ✅ Working with non-standard directory structure\n- ✅ Want to understand how the template works\n- ✅ Debugging container configuration issues\n\n## 📋 Key Differences\n\n| Feature | Automated Setup | Manual Setup |\n|---------|----------------|-------------|\n| **Speed** | ⚡ Fast (single command) | 🐢 Multiple steps required |\n| **Control** | 🎯 Standardized | 🔧 Full customization |\n| **Validation** | ✅ Built-in | 📋 Manual validation required |\n| **Learning** | 📦 Black box | 🎓 Educational |\n| **Best For** | New projects | Existing projects, customization |\n| **Difficulty** | 🟢 Easy | 🟡 Intermediate |\n\n## 🔧 Manual Setup Validation\n\n**⚠️ IMPORTANT**: When using manual setup, you **MUST** run the validation script:\n\n```bash\n./scripts/manual-setup-project.sh\n```\n\nThis script:\n- 🔍 Creates `.env` from `.env.example` if missing  \n- ✅ Validates all required environment variables\n- 🔧 Checks variable formats and values\n- 🐳 Verifies Docker environment\n- 📋 Tests container configuration\n- 🏗️ Validates infrastructure paths\n\n**📖 For detailed manual setup guidance**, see [`templates/flutter-devcontainer-template/scripts/README.md`](templates/flutter-devcontainer-template/scripts/README.md)\n\n## 💡 Which Approach Should I Use?\n\n### Use **Automated Setup** when:\n- ✅ Creating a new Flutter project from scratch\n- ✅ You want standard workBenches project structure\n- ✅ You need to get started quickly\n- ✅ You trust the default configuration\n- ✅ You're new to DevContainers\n\n### Use **Manual Setup** when:\n- ✅ Adding DevContainer to existing Flutter project\n- ✅ You need custom template modifications\n- ✅ Working with unique directory structures\n- ✅ You want to learn how DevContainers work\n- ✅ Debugging container issues\n- ✅ You need maximum control over the setup process\n\n## ⚙️ Centralized Configuration Philosophy\n\n**Key Principle: The `.env` file is the single source of truth for ALL project and user-specific configuration.**\n\n### What This Means:\n- ✅ **Template files remain untouched** - `devcontainer.json`, `docker-compose.yml`, etc. are never modified\n- ✅ **All customization via environment variables** - container names, user settings, versions, ports\n- ✅ **Project-specific settings isolated** - each project has its own `.env` file\n- ✅ **Easy template updates** - template improvements don't conflict with your settings\n\n### Configuration Examples:\n\n```bash\n# .env file controls everything:\nPROJECT_NAME=dartwing\nAPP_CONTAINER_SUFFIX=app           # Results in: dartwing-app\nSERVICE_CONTAINER_SUFFIX=gateway   # Results in: dartwing-gateway  \nUSER_UID=1000\nFLUTTER_VERSION=3.24.0\nCOMPOSE_PROJECT_NAME=dartwingers\n```\n\n**Result**: Template files use `${PROJECT_NAME}-${APP_CONTAINER_SUFFIX}` → resolves to `dartwing-app`\n\n## 🚀 Next Steps After Setup\n\nRegardless of which setup method you used:\n\n1. **Open in VS Code**: `code .`\n2. **Reopen in Container**: Click prompt or Ctrl+Shift+P → \"Dev Containers: Reopen in Container\"\n3. **Wait for build**: First time takes 2-5 minutes\n4. **Start coding**: Container includes Flutter SDK, Android tools, and VS Code extensions\n\n## 🔧 Available Scripts\n\n### Project Creation\n- `scripts/new-flutter-project.sh` - Create new Flutter project with DevContainer\n- `scripts/new-dartwing-project.sh` - Create new DartWing project variant\n\n### Project Management  \n- `scripts/update-flutter-project.sh` - Update existing project to latest template\n- `templates/.../scripts/manual-setup-project.sh` - Validate manual setup\n\n### Development Environment\n- `scripts/launch-devbench.sh` - Launch development container\n- `scripts/start-monster.sh` - Ensure Layer 2 and Layer 3, then start the bench container\n- `scripts/rebuild-stack.sh` - Check or rebuild the Flutter bench image stack\n- `scripts/ensure-images.sh` - Lightweight Layer 2/Layer 3 check for devcontainer startup\n\n### SonarCloud Coverage\n- `sonarcloud-dart-flutter` - Run Dart/Flutter coverage and SonarCloud scan\n\n`sonarcloud-dart-flutter` reads `SONARQUBE_TOKEN` from\n`~/.config/sonarqube/sonar.env`. For Flutter projects it runs\n`flutter test --coverage`; for pure Dart projects it runs the Dart `coverage`\npackage. Both paths produce `coverage/lcov.info`, then the helper invokes:\n\n```bash\nsonar-scanner -Dsonar.dart.lcov.reportPaths=coverage/lcov.info\n```\n\nShell aliases: `flutter-sonar-coverage` and `dart-sonar-coverage`.\n\n## 📚 Documentation\n\n- [`templates/flutter-devcontainer-template/README.md`](templates/flutter-devcontainer-template/README.md) - Template details\n- [`templates/flutter-devcontainer-template/scripts/README.md`](templates/flutter-devcontainer-template/scripts/README.md) - Manual setup guide\n- [`docs/env-file-docker-compose-guide.md`](docs/env-file-docker-compose-guide.md) - Environment configuration guide\n\n## 🎯 Template Features\n\nThe DevContainer template includes:\n\n- 🐳 **Lightweight container** (~500MB vs 2GB+ FlutterBench)\n- 🔧 **Centralized configuration** - ALL project and user settings in `.env` file only\n- 📝 **No template file modification** - template files remain untouched, use environment variables\n- 🏷️ **Configurable container naming** - customize app and service container names via `.env`\n- 📱 **Shared ADB infrastructure** (connects to external ADB server)\n- ⚙️ **VS Code integration** (tasks, launch configs, extensions)\n- 🏗️ **Proper user permissions** (UID/GID matching)\n- 🔄 **Hot reload support** (port forwarding configured)\n- 🧪 **Testing support** (launch configurations)\n- 📋 **Spec-driven development** (includes specKit)\n\n## 🏗️ Container Philosophy\n\n- **FlutterBench** = Heavy development workbench (~2GB, all tools)\n- **Project Containers** = Lightweight project-specific environment (~500MB)\n\nUse FlutterBench for heavy development, project containers for debugging and light development.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensoft%2Fflutterbench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensoft%2Fflutterbench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensoft%2Fflutterbench/lists"}