flutter_blueprint 2.0.2 copy "flutter_blueprint: ^2.0.2" to clipboard
flutter_blueprint: ^2.0.2 copied to clipboard

Production-ready Flutter CLI scaffolding tool with multi-platform support, advanced state management (Provider/Riverpod/Bloc), universal API configurator, enterprise security (OWASP headers, certifica [...]

Changelog #

2.0.1 2025-01-XX #

Feature-Complete Release: Production-Ready Apps ๐Ÿš€

This release completes flutter_blueprint's transformation into a truly production-ready generator. Generated apps now include complete working features with zero placeholders.

๐ŸŽฏ Complete Features Added #

  • ๐Ÿ  Home Feature Enhancement

    • Real API integration with JSONPlaceholder
    • Pagination with infinite scroll
    • Offline-first caching (1-hour TTL)
    • Pull-to-refresh UI
    • Complete error handling and loading states
  • ๐Ÿ” Full Authentication System (with --api)

    • Login & Register pages with validation
    • JWT token management (access + refresh)
    • Secure token storage (flutter_secure_storage)
    • Auto-login on app startup
    • Complete auth state management
    • Beautiful UI with error messages and loading states
  • ๐Ÿ‘ค Profile Management (with --api)

    • View profile page with user info
    • Edit profile page with form validation
    • Avatar upload integration (demo mode)
    • Offline-first caching pattern
    • Real-time profile updates
  • โš™๏ธ Settings System (always generated)

    • Theme switcher (Light/Dark/System)
    • Notification preferences
    • Biometric authentication toggle
    • Account management (profile, logout)
    • About section (version, terms, privacy)
    • Clear all data functionality

๐ŸŽจ Architecture Improvements #

  • Router Enhancement: Dynamic routes for auth, profile, settings
  • Main.dart Update: Auth check on startup with loading screen
  • Clean Architecture: All features follow domain/data/presentation layers
  • State Management: Complete Riverpod implementation for all features
  • Template Organization: 60+ files generated with proper structure

๐Ÿ“ What This Means #

When you run flutter_blueprint init my_app --api, you now get:

  • โœ… Working login/register system
  • โœ… Functional home page with real data
  • โœ… Complete profile management
  • โœ… Full settings screen
  • โœ… Auto-login functionality
  • โœ… Offline support with caching
  • โœ… Beautiful Material Design UI
  • โœ… Zero TODOs or placeholders

You can literally run flutter run immediately after generation!

๐Ÿ”ง Technical Details #

  • Added 13 new profile templates (model, datasources, repository, usecases, pages, widgets)
  • Added 4 new settings templates (provider, page, widgets)
  • Enhanced auth system with 17 complete templates
  • Updated router with dynamic initial route based on auth status
  • Improved app.dart with auth state checking
  • All new code covered by existing test suite (334 tests passing)

2.0.0 2025-01-XX #

Major Release: Enterprise Security & Production Features ๐ŸŽ‰

This release transforms flutter_blueprint from a scaffolding tool into an enterprise-grade project generator with OWASP-compliant security, production-ready caching, and advanced auth management.

๐ŸŽฏ Highlights #

  • ๐Ÿ”’ Enterprise Security: OWASP headers, certificate pinning, SSRF prevention
  • ๐Ÿšฆ Rate Limiting: Client-side protection (60 req/min per endpoint)
  • ๐Ÿ’พ Smart Caching: JSON serialization with automatic error recovery
  • ๐Ÿ” Auth Management: Callback-based tokens with 401 auto-refresh
  • ๐Ÿงน Error Sanitization: Removes paths, IPs, and tokens from errors
  • ๐Ÿ—๏ธ Architecture Refactor: Result types, command pattern, DI container
  • โœ… Testing: 334 tests passing, 62.88% coverage (24 files)

Security & Validation Enhancements #

This release strengthens security across all generated projects with comprehensive protection against common vulnerabilities and attack vectors.

  • NEW: Comprehensive Security Headers

    • X-Content-Type-Options: nosniff (prevents MIME type sniffing)
    • X-Frame-Options: DENY (prevents clickjacking)
    • X-XSS-Protection: enabled with blocking mode
    • Strict-Transport-Security: HSTS with 1-year max-age
    • Cache-Control: prevents sensitive data caching
    • Automatic security header injection in all API requests
  • NEW: Error Message Sanitization

    • Prevents information disclosure through error messages
    • Removes file paths from stack traces
    • Masks IP addresses in error logs
    • Redacts potential tokens and API keys
    • Security interceptor with automatic sanitization
  • NEW: Client-Side Rate Limiting

    • Prevents API abuse and quota exhaustion
    • Configurable: 60 requests per minute (default)
    • Per-endpoint tracking
    • Automatic retry-after calculation
    • Graceful degradation with clear error messages
  • NEW: Certificate Pinning Support

    • Prevents man-in-the-middle (MITM) attacks
    • SHA-256 certificate fingerprint validation
    • Easy configuration with SecurityConfig helper
    • OpenSSL command examples in documentation
    • Production-ready implementation
  • NEW: Security Validation Helper

    • Automated security configuration checks
    • Validates secure storage implementation
    • Enforces HTTPS-only connections
    • Checks certificate pinning status
    • Reports issues and warnings with actionable feedback
  • NEW: Enhanced Security Interceptor

    • Request ID tracking for audit trails
    • SSRF (Server-Side Request Forgery) prevention
    • Blocks localhost requests in production
    • Validates all outgoing requests
    • Comprehensive security logging

Technical Details #

Security Headers (template_interface.dart):

  • Automatically applied to all Dio requests
  • Can be disabled for specific use cases (enableSecurityHeaders flag)
  • Follows OWASP security best practices
  • Compatible with all major backend frameworks

Error Sanitization:

  • Regex-based pattern matching for sensitive data
  • Three-tier sanitization: paths, IPs, tokens
  • Applied in SecurityInterceptor.onError()
  • Zero performance impact (happens only on errors)

Rate Limiting:

  • In-memory timestamp tracking per endpoint
  • O(1) lookup performance
  • Automatic cleanup of old timestamps
  • Thread-safe implementation

Certificate Pinning:

  • SHA-256 fingerprint validation
  • Customizable per API client instance
  • Supports multiple pinned certificates
  • Fail-safe: rejects unknown certificates

Security Best Practices #

Generated projects now include:

// 1. Security headers (automatic)
final client = ApiClient(
  baseUrl: 'https://api.example.com',
  enableSecurityHeaders: true,
);

// 2. Certificate pinning (optional, recommended for production)
SecurityConfig.applyCertificatePinning(
  client.dio,
  allowedSHA256Fingerprints: [
    'AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF',
  ],
);

// 3. Security validation
final check = SecurityConfig.checkSecurityConfiguration(
  hasSecureStorage: true,
  hasHttpsOnly: true,
  hasCertificatePinning: true,
  hasRateLimiting: true,
  hasInputValidation: true,
);
print(check); // Shows security status

Quality Improvements #

  • โœ… Zero Security Vulnerabilities: All common attack vectors addressed
  • โœ… 334 Tests Passing: No regressions introduced
  • โœ… Production-Ready: Enterprise-grade security out of the box
  • โœ… OWASP Compliant: Follows security best practices

Files Changed #

lib/src/templates/core/
โ””โ”€โ”€ template_interface.dart              # Security infrastructure
    โ”œโ”€โ”€ SecurityInterceptor              # Error sanitization + SSRF prevention
    โ”œโ”€โ”€ RateLimitInterceptor             # Client-side rate limiting
    โ”œโ”€โ”€ SecurityConfig                   # Certificate pinning helper
    โ””โ”€โ”€ SecurityCheckResult              # Validation results

Feature Completion & Code Quality #

This release completes the v2.0.0 modernization by resolving all TODO markers and implementing production-ready code across all templates.

  • NEW: Production-Ready Cache Implementation

    • Implemented SharedPreferences-based caching in data layer template
    • JSON encoding/decoding with error handling
    • Automatic cache validation and clearing on corruption
    • Feature generator now creates fully functional local data sources
  • NEW: Complete Auth Token Management

    • Implemented functional auth interceptor in SharedComponents
    • Token injection from secure storage (callback-based)
    • Automatic token refresh on 401 responses
    • Request retry with new token after refresh
    • Graceful error handling
  • NEW: Navigation Implementation Examples

    • Replaced TODOs with working navigation patterns
    • MaterialPageRoute examples for detail navigation
    • Named route examples for app-wide routing
    • Consistent implementation across Provider, Riverpod, and Bloc
  • NEW: Dependency Injection Documentation

    • Comprehensive Riverpod DI examples in generated code
    • Clear injection patterns: repository โ†’ use case โ†’ notifier
    • Implementation guidance with code examples
    • Reduces setup friction for developers
  • NEW: Offline Sync API Implementation

    • Full Dio-based API calls in SyncManager
    • Proper HTTP method routing (POST/PUT/DELETE)
    • Response status logging
    • Production-ready offline-first architecture

Technical Details #

Cache Implementation (data_layer_template.dart):

  • Uses shared_preferences for persistent storage
  • Automatic JSON serialization/deserialization
  • Error recovery: clears invalid cache data
  • Constructor injection of SharedPreferences for testability

Auth Interceptor (template_interface.dart):

  • Callback-based token provider for flexibility
  • Optional refresh token callback
  • Automatic 401 handling with retry logic
  • Integrated into ApiClient with clean API

Offline Sync (hive_templates.dart):

  • Dio HTTP client integration
  • Switch-based operation type routing
  • Response validation and logging
  • Retry mechanism with persistent queue

Quality Improvements #

  • โœ… Zero TODOs: All placeholder code replaced with working implementations
  • โœ… 334 Tests Passing: No regressions introduced
  • โœ… Better DX: Generated code is production-ready, not scaffolding
  • โœ… Comprehensive Docs: All implementations include usage examples

Files Changed #

lib/src/generator/feature_templates/
โ”œโ”€โ”€ data_layer_template.dart              # Cache implementation
โ””โ”€โ”€ presentation_layer_template.dart      # Navigation & DI examples

lib/src/templates/
โ”œโ”€โ”€ core/template_interface.dart          # Auth interceptor
โ””โ”€โ”€ hive_templates.dart                   # Offline sync API

Performance Optimization #

This release introduces significant performance improvements to project generation through parallel file I/O operations, template caching, and optimized update checking.

  • NEW: Parallel File I/O System

    • Implemented batch file writing with configurable concurrency
    • 3-5x faster project generation for large projects (50+ files)
    • Configurable concurrency: default 10, maximum 50 simultaneous operations
    • Error isolation: individual file failures don't stop batch processing
    • Full backward compatibility: sequential writeFile() method preserved
  • NEW: Template Caching System

    • In-memory caching of rendered templates
    • 20-30% performance improvement for repeat operations
    • Configuration-aware cache keys for correctness
    • Automatic cache expiration (30-minute TTL by default)
    • Cache statistics for observability
  • NEW: Optimized Update Checker

    • Caches update results, not just check timestamps
    • Avoids unnecessary HTTP calls and file I/O within check interval
    • Faster CLI startup (no network calls if cache is valid)
    • Graceful degradation on network errors (returns cached result)
    • JSON-based cache for structured data storage
  • Enhanced IoUtils API:

    • FileWriteOperation class for batch operations
    • FileWriteResult class for detailed metrics tracking
    • writeFilesParallel() method with progress tracking
    • Automatic batching for controlled resource usage
  • Enhanced Template System:

    • CachedTemplateRenderer wrapper for any ITemplateRenderer
    • Cache hit/miss tracking
    • Configurable cache duration
    • Manual cache clearing API
  • Generator Updates:

    • ProjectGenerator converted to parallel file writes
    • FeatureGenerator converted to parallel file writes
    • All templates wrapped with caching layer
    • All security validations preserved from sequential implementation

Technical Details #

Performance Benchmark (49 files):

  • Total generation time: ~6 seconds (includes Flutter init + pub get)
  • File write throughput: 8.3 files/sec
  • Average: 119.9ms per file (with all overhead)
  • Estimated sequential time: ~20 seconds
  • Speedup: 3-4x faster

Template Cache:

  • First generation: 0% hit rate (cold cache)
  • Subsequent identical configs: 100% hit rate (warm cache)
  • Expected benefit: 20-30% reduction in template rendering time

Files Changed #

lib/src/utils/
โ”œโ”€โ”€ io_utils.dart              # Added parallel I/O infrastructure
โ””โ”€โ”€ update_checker.dart        # Optimized with result caching

lib/src/templates/core/
โ””โ”€โ”€ cached_template_renderer.dart  # NEW - Template caching layer

lib/src/generator/
โ”œโ”€โ”€ project_generator.dart     # Converted to parallel writes + caching
โ””โ”€โ”€ feature_generator.dart     # Converted to parallel writes

test/performance/
โ””โ”€โ”€ parallel_io_benchmark.dart # NEW - Performance validation

1.7.5 #

CLI Update Command & Version Auto-Sync #

This release adds a new update command for easy CLI updates and fixes version synchronization.

  • NEW: Update Command: One-command CLI updates

    • flutter_blueprint update - Updates CLI to the latest version from pub.dev
    • Shows current vs latest version comparison
    • Provides progress feedback and error handling
    • Equivalent to running dart pub global activate flutter_blueprint
  • Fixed: Version Auto-Sync:

    • Fixed hardcoded version constant that was out of sync with pubspec.yaml
    • Updated publish script (publish.ps1) to automatically sync version constant
    • Prevents incorrect "Update Available" notifications

Usage #

# Update CLI to latest version
flutter_blueprint update

Files Changed #

lib/src/commands/
โ””โ”€โ”€ update_command.dart       # NEW - Update command implementation

lib/src/cli/
โ””โ”€โ”€ cli_runner.dart           # Added update command integration

lib/src/utils/
โ””โ”€โ”€ version_reader.dart       # Fixed version constant sync

scripts/
โ””โ”€โ”€ publish.ps1               # Auto-sync version on publish

1.7.4 #

Documentation & Pub.dev Optimization #

This release focuses on perfecting documentation for pub.dev publishing and improving package discoverability.

  • NEW: Dart Example File: Added example/example.dart with programmatic API examples

    • Demonstrates BlueprintConfig setup and usage
    • Shows multi-platform and full-featured configurations
    • Includes validation and serialization examples
    • Pub.dev awards higher points for Dart examples vs markdown
  • Enhanced README.md:

    • Added pub.dev badges (Pub Points, Pub Likes)
    • Added Dart version badge (3.5+)
    • Fixed broken documentation links
    • Improved documentation section with valid file references
  • Pub.dev Discoverability: Added topics to pubspec.yaml:

    • cli - Command-line interface tool
    • scaffolding - Project scaffolding
    • code-generation - Code generation utility
    • flutter - Flutter ecosystem
    • architecture - Clean architecture patterns

Files Changed #

example/
โ”œโ”€โ”€ example.dart    # NEW - Programmatic API examples
โ””โ”€โ”€ example.md      # Existing CLI usage examples

pubspec.yaml        # Added topics field
README.md           # Enhanced badges and fixed links

1.7.3 #

Universal API Configurator #

  • NEW: ApiConfig Model: Centralized configuration for API response parsing and authentication.
    • Configurable success keys, data paths, error message extraction
    • Flexible token handling (body or header extraction)
    • Customizable auth headers (name, prefix)
    • Built-in presets: Modern REST, Legacy .NET, Laravel, Django
  • CLI Backend Type Selection: Interactive prompts for choosing backend type during project creation.
  • Custom Configuration: Manual configuration for non-standard backend patterns.
  • JSON Sample Parser: Auto-detect API configuration from sample JSON responses.
  • Template Integration: All templates (Provider, Riverpod, BLoC) now generate api_config.dart.
  • Interceptor Updates: AuthInterceptor and UnifiedResponseInterceptor now use ApiConfig for fully configurable behavior.

Bug Fixes #

  • Fixed Update Checker: Fixed stale update notification that showed even after updating.
    • Rewrote VersionReader with pub cache detection for globally activated packages
    • Updated fallback version to current release
    • Added Windows/Linux/macOS cache location support

Usage #

# Interactive wizard prompts for backend type
flutter_blueprint init my_app --api

# Presets available:
# - Modern REST (HTTP 200 + JSON data)
# - Legacy .NET (success: true/false)
# - Laravel (data wrapper, message field)
# - Django REST (results array)
# - Custom (manual configuration)

Generated Files #

lib/core/api/
โ”œโ”€โ”€ api_config.dart                  # API configuration model
โ”œโ”€โ”€ auth_interceptor.dart            # Uses ApiConfig for headers/tokens
โ””โ”€โ”€ unified_response_interceptor.dart # Uses ApiConfig for parsing

1.7.2 #

  • Production-Ready Simple Mode: Consolidated and improved "Simple Mode" templates to be fully production-ready.
    • Generates a streamlined project structure for smaller to medium-sized apps
    • Includes essential features without the complexity of the full enterprise architecture
    • Perfect for MVPs and simpler use cases
  • Documentation Updates:
    • Updated README.md to clarify the benefits and generated structure of Simple Mode
    • Improved pubspec.yaml metadata

Features #

  • Refined Mobile Templates: Enhanced Provider, Riverpod, and BLoC templates in Simple Mode to use latest best practices.
  • Improved Code Quality: Consolidated code aggregation logic to ensure cleaner generated files.

1.7.1 #

Flutter 3.38 & Dart 3.10 Compatibility #

  • SDK Constraint Update: Bumped minimum Dart SDK to >=3.5.0 <4.0.0 for Dart 3.10 features
  • Material 3 Enhancement: Added useMaterial3: true to all templates (mobile, web, desktop)
    • Riverpod mobile template
    • BLoC mobile template
    • Provider mobile template
    • Web template
    • Already present in desktop and universal templates
  • Package Version Updates: Updated to latest stable versions
    • flutter_bloc: ^8.1.6 (was 8.1.5)
    • flutter_riverpod: ^2.6.1 (was 2.5.1)
    • riverpod_annotation: ^2.6.1 (was 2.3.5)
    • riverpod_generator: ^2.6.2 (was 2.4.0)
    • provider: ^6.1.4 (was 6.1.2)
  • Performance Monitoring Enhancements: Added Flutter 3.38 specific features
    • recordWidgetRebuild(): Track widget rebuild performance
    • recordImpellerFrame(): Monitor Impeller rendering (default in 3.38+)
    • Enhanced performance tracking for modern Flutter features
  • Documentation Updates:
    • Added Flutter 3.38 and Dart 3.10 compatibility badges
    • Updated README with latest version information

Notes #

  • All generated projects now use Material 3 design system by default
  • Performance analyzer includes Impeller-specific monitoring
  • Ready for Dart 3.10 features (dot shorthands, enhanced pattern matching)

Bug Fixes #

  • Dynamic Version Reading: Fixed version mismatch issues between pubspec.yaml and hardcoded version strings
    • Created new VersionReader utility class to automatically read version from pubspec.yaml
    • Updated update_checker.dart to use dynamic version reading
    • Updated cli_runner.dart --version flag to use dynamic version reading
    • Eliminated manual version synchronization requirement
    • Version is now cached for performance after first read
    • Graceful fallback to hardcoded version if file reading fails
    • No more false "Update Available" notifications due to version mismatches

1.7.0 #

Offline-First Architecture #

  • OfflineLevel enum: none, basic, advanced levels for offline capabilities
  • Sync Queue Manager: Operation queue with retry and persistence
    • Operation queuing with priority support
    • Automatic retry logic with configurable max retries
    • Network detection before sync attempts
    • Persistent storage using SharedPreferences
    • Event stream for sync status monitoring (enqueued, processing, completed, failed, retry)
    • Queue management methods (enqueue, enqueueAll, processQueue, clear, remove)
    • Configurable retry settings (maxRetries, retryDelay)
    • SyncOperation class with JSON serialization
  • Conflict Resolver: Multiple strategies for data synchronization
    • lastWriteWins, firstWriteWins, localWins, remoteWins strategies
    • Custom resolver function support
    • Manual resolution for complex conflicts
    • Timestamp-based conflict detection
    • Field-level merge with timestamps
    • Deep equality checking for nested Maps
    • ConflictResolution result with metadata
  • Background Sync Coordinator: Periodic synchronization
    • Task registration and management
    • Periodic sync scheduling with configurable frequency
    • On-demand sync triggering
    • Battery and network constraints
    • Last sync time tracking
    • Multiple sync task support
    • Sync status monitoring (isSyncing, lastSyncTime)
  • Offline Repository Pattern: Local-first data access
    • Generic repository base class
    • LocalDataSource and RemoteDataSource interfaces
    • Local-first getAll/getById with background sync
    • Create/update/delete with sync queue integration
    • Automatic sync coordination
    • Cache-then-network pattern
    • Graceful remote fallback
  • Network Monitor: Real-time connectivity tracking
    • Connectivity status monitoring with connectivity_plus
    • Network type detection (wifi, mobile, ethernet, none)
    • Stream-based status updates
    • Connection waiting with timeout support
    • Status getters (isConnected, isWifi, isMobile)
    • NetworkStatus and NetworkType classes
  • Sync Coordinator: Orchestrates all offline components
    • Multi-component initialization
    • Auto-sync on network restore
    • Multiple repository coordination
    • Background sync integration
    • SyncStatistics for monitoring
    • Force sync capability
    • Auto-sync toggle
  • Offline Examples: Complete implementation guide
    • PostRepository example
    • Offline-first UI with sync status
    • 10+ best practices
    • 10+ common pitfalls
    • ChangeNotifier integration

CLI Integration #

  • --offline-level flag: Choose offline-first level (none/basic/advanced)
  • --sync-interval flag: Set background sync interval in minutes
  • --background-sync flag: Enable periodic background synchronization
  • --conflict-resolution flag: Enable conflict resolution strategies
  • Interactive wizard with offline configuration prompts
  • Configuration summary showing offline features

Testing #

  • 128 comprehensive tests for offline-first templates (100% pass rate)

1.6.0 #

Advanced Authentication #

  • AuthLevel enum: none, basic, advanced levels for authentication features
  • JWT Token Handler: Complete JWT token lifecycle management
    • Access and refresh token storage with flutter_secure_storage
    • Automatic token refresh before expiry
    • Token validation and decoding with jwt_decoder
    • User information extraction from tokens
    • Token expiry checking with buffer
    • Secure token clearing
    • Authentication state checking
    • Token refresh interceptor for HTTP clients
  • OAuth 2.0 Helper: Full OAuth 2.0 authorization flow
    • Authorization code flow with PKCE support
    • State parameter for CSRF protection
    • Token exchange and refresh
    • Multiple provider support (Google, Apple, GitHub)
    • URL launcher integration
    • Code challenge generation (SHA-256)
    • Custom authorization parameters
  • Session Manager: Complete session lifecycle with timeout handling
    • Session start/end with user ID tracking
    • Activity tracking and automatic timeout reset
    • Configurable timeout duration
    • Warning before timeout
    • Session restoration from storage
    • Session validation and extension
    • ChangeNotifier integration for reactive UI
    • Activity tracker widget for automatic activity recording
  • Biometric Authentication: Fingerprint and face recognition support
    • Availability checking (device support)
    • Biometric type detection (face, fingerprint)
    • Platform-specific authentication messages (Android/iOS)
    • Sensitive operation authentication
    • Stop authentication capability
    • local_auth integration
    • Biometric settings helper
  • Secure Credential Storage: Encrypted credential management
    • Username and password storage
    • Email and API key storage
    • Custom value storage
    • Platform-specific encryption (Android: EncryptedSharedPreferences, iOS: Keychain)
    • Credential existence checking
    • Clear individual or all credentials
  • Authentication Examples: Complete implementation examples
    • Login flow with JWT
    • Biometric login integration
    • Session management patterns
    • Best practices (HTTPS, PKCE, secure storage, token refresh)
    • Common pitfalls to avoid
  • CLI Flags: --auth-level, --jwt, --oauth, --biometric, --refresh-token
  • Interactive Wizard: Prompts for authentication level, JWT, OAuth, biometric, token refresh
  • 81 Tests: Comprehensive test coverage (100% pass rate)

1.5.0 #

Advanced Localization #

  • LocalizationLevel enum: none, basic, advanced levels for localization features
  • Advanced Locale Manager: Runtime locale switching with persistence (SharedPreferences)
    • Support for 12+ languages including RTL (Arabic, Hebrew, Persian, Urdu)
    • Locale persistence across app restarts
    • ChangeNotifier integration for reactive updates
    • Locale display name helpers
  • ARB Generator: Programmatic ARB file creation and management
    • Support for pluralization (zero, one, two, few, many, other)
    • Gender-based translations (male, female, other)
    • Metadata support (descriptions, placeholders, context)
    • Validation helpers
  • RTL Support Utilities: Comprehensive Right-to-Left language support
    • Directional padding (start/end instead of left/right)
    • Directional alignment helpers
    • Icon mirroring for RTL
    • Directional Row widget
    • Border radius helpers
    • Text alignment helpers
  • Dynamic Locale Loader: Lazy loading with caching
    • Asset-based locale loading
    • In-memory caching for performance
    • Fallback locale support
    • Preload multiple locales
    • Translation interpolation
    • Plural and gender form helpers
  • CLI Flags: --localization-level, --supported-locales, --default-locale, --rtl
  • Interactive Wizard: Prompts for localization level, supported locales, default locale, RTL support
  • 70 Tests: Comprehensive test coverage (81% pass rate)

1.4.0 #

Advanced Riverpod Patterns #

๐Ÿ”ท NEW: Advanced Riverpod Patterns & Code Generation #

  • โœ… Added riverpodLevel enum to BlueprintConfig with three levels: none, basic, advanced.
  • โœ… Comprehensive Riverpod pattern template generators:
    • CancellableAsyncNotifier: AsyncNotifier with automatic cancellation, retry logic, and optimistic updates
    • AutoDisposingFamily: Extensions for keepAlive, cacheFor, and disposeDelay with LRU cache implementation
    • ProviderComposition: Utilities for combining providers (combine2/3/4, select, derived state)
    • AdvancedExamples: Real-world patterns (repository, use case, pagination, API client)
    • PerformancePatterns: Optimization patterns (select, Consumer, batching, debouncing)
    • CodeGenSetup: Riverpod code generation setup with @riverpod annotations
  • โœ… Added --riverpod-level <level> CLI option (none, basic, advanced).
  • โœ… Added --code-generation flag for riverpod_generator setup.
  • โœ… Integrated into interactive wizard with Riverpod-specific prompts.
  • โœ… Automatic dependency management (riverpod_annotation, riverpod_generator, build_runner).
  • โœ… build.yaml configuration file generation.
  • โœ… Comprehensive test suite with 49 tests (42+ passing).

Usage Examples:

# Basic Riverpod patterns (AsyncNotifier, composition)
flutter_blueprint init my_app --state riverpod --riverpod-level basic

# Advanced patterns + code generation
flutter_blueprint init my_app --state riverpod --riverpod-level advanced --code-generation

# Combined with other features
flutter_blueprint init my_app --state riverpod --riverpod-level advanced \
  --memory advanced --security standard

# Interactive wizard (includes Riverpod options)
flutter_blueprint init

Generated Structure:

lib/core/patterns/
โ”œโ”€โ”€ cancellable_async_notifier.dart    # AsyncNotifier with cancellation
โ”œโ”€โ”€ auto_disposing_family.dart          # Auto-disposal extensions
โ”œโ”€โ”€ provider_composition.dart           # Provider combination utilities
โ”œโ”€โ”€ riverpod_examples.dart             # Real-world patterns
โ””โ”€โ”€ performance_patterns.dart           # Optimization patterns
build.yaml                              # Code generation config (optional)

Benefits:

  • ๐Ÿš€ Production-ready Riverpod patterns out of the box
  • ๐Ÿ”ท Type-safe state management with compile-time safety
  • โšก Performance optimization patterns included
  • ๐Ÿ› ๏ธ Optional code generation for cleaner syntax
  • ๐Ÿ“š Comprehensive examples and documentation
  • ๐Ÿงช Real-world patterns (repository, use case, pagination)

1.3.0 - 2025-11-18 - Memory Management & Performance #

๐Ÿง  NEW: Memory Management & Performance Optimization #

  • โœ… Added memoryLevel enum to BlueprintConfig with three levels: none, basic, advanced.
  • โœ… Comprehensive memory management template generators:
    • DisposableBloc: Auto-cleanup base class for BLoC with subscription tracking
    • DisposableProvider: Auto-cleanup base class for ChangeNotifier with disposal safety
    • DisposableRiverpod: Extensions and mixins for Riverpod resource cleanup
    • MemoryProfiler: Real-time memory monitoring with leak detection (advanced)
    • ImageCacheManager: LRU image cache with configurable size limits
    • StreamSubscriptionManager: Centralized subscription lifecycle management
    • MemoryLeakDetector: WeakReference-based leak tracking and reporting (advanced)
  • โœ… Added --memory <level> CLI option (none, basic, advanced).
  • โœ… Added --max-cache-size <MB> CLI option (default: 100MB).
  • โœ… Integrated into interactive wizard with memory management prompts.
  • โœ… State-management-specific implementations (separate for Provider, Riverpod, Bloc).
  • โœ… Integration across all mobile templates with conditional generation.
  • โœ… Comprehensive test suite with 48 passing tests (422 total tests).

Usage Examples:

# Basic memory management (disposable patterns + image cache)
flutter_blueprint init my_app --memory basic

# Advanced memory management (+ profiling + leak detection)
flutter_blueprint init my_app --memory advanced --max-cache-size 150

# Combined with other features
flutter_blueprint init my_app --state riverpod --memory advanced --security standard

# Interactive wizard (includes memory management option)
flutter_blueprint init

Generated Structure:

lib/core/memory/
โ”œโ”€โ”€ disposable_bloc.dart                # BLoC auto-cleanup base class
โ”œโ”€โ”€ disposable_provider.dart            # Provider auto-cleanup base class
โ”œโ”€โ”€ disposable_riverpod.dart            # Riverpod cleanup extensions
โ”œโ”€โ”€ memory_profiler.dart                # Memory monitoring (advanced)
โ”œโ”€โ”€ image_cache_manager.dart            # LRU image cache
โ”œโ”€โ”€ stream_subscription_manager.dart    # Subscription manager
โ””โ”€โ”€ memory_leak_detector.dart           # Leak detection (advanced)

Benefits:

  • ๐Ÿš€ Prevents memory leaks in long-running apps
  • ๐Ÿ“Š Real-time memory profiling in debug mode
  • ๐ŸŽฏ Automatic resource cleanup on disposal
  • ๐Ÿ’พ Optimized image caching with LRU eviction
  • ๐Ÿ” Early leak detection during development

1.2.0 - 2025-11-18 - Security Best Practices #

๐Ÿ”’ NEW: Security Best Practices #

  • โœ… Added securityLevel enum to BlueprintConfig with four levels: none, basic, standard, enterprise.
  • โœ… Comprehensive security template generators:
    • CertificatePinner: SSL/TLS certificate pinning for HTTPS (enterprise)
    • DeviceSecurityChecker: Root/jailbreak detection (standard+)
    • BiometricAuth: Biometric authentication wrapper (standard+)
    • ApiKeyManager: API key obfuscation and secure storage (enterprise)
    • EncryptedStorage: Enhanced encrypted storage with AES (all levels)
    • ScreenshotProtection: Prevent screenshots on sensitive screens (enterprise)
    • NetworkSecurityConfig: HTTPS validation and domain allowlisting (all levels)
    • SecurityInterceptor: Security headers for HTTP requests (all levels)
    • SecureHttpClient: Secure Dio client with certificate pinning (enterprise)
  • โœ… Added --security <level> CLI option (none, basic, standard, enterprise).
  • โœ… Integrated into interactive wizard with security level selection.
  • โœ… Conditional dependency management based on security level.
  • โœ… Integration across all mobile templates (Provider, Riverpod, Bloc).
  • โœ… Comprehensive test suite with 36 passing tests (374 total tests passing).

Usage Examples:

# Basic security (encrypted storage + network security)
flutter_blueprint init my_app --security basic

# Standard security (+ biometric auth + root detection)
flutter_blueprint init my_app --security standard

# Enterprise security (all features + certificate pinning)
flutter_blueprint init my_app --security enterprise --state bloc

# Interactive wizard (includes security option)
flutter_blueprint init

Generated Structure:

lib/core/security/
โ”œโ”€โ”€ certificate_pinner.dart             # SSL pinning (enterprise)
โ”œโ”€โ”€ device_security_checker.dart        # Root/jailbreak detection (standard+)
โ”œโ”€โ”€ biometric_auth.dart                 # Biometric auth (standard+)
โ”œโ”€โ”€ api_key_manager.dart                # API key obfuscation (enterprise)
โ”œโ”€โ”€ encrypted_storage.dart              # AES encryption (all levels)
โ”œโ”€โ”€ screenshot_protection.dart          # Screenshot prevention (enterprise)
โ”œโ”€โ”€ network_security_config.dart        # HTTPS validation (all levels)
โ”œโ”€โ”€ security_interceptor.dart           # Security headers (all levels)
โ””โ”€โ”€ secure_http_client.dart             # Secure HTTP client (enterprise)

Security Levels:

Feature Basic Standard Enterprise
Encrypted Storage โœ… โœ… โœ…
Network Security Config โœ… โœ… โœ…
Security Headers โœ… โœ… โœ…
Root/Jailbreak Detection โŒ โœ… โœ…
Biometric Authentication โŒ โœ… โœ…
Certificate Pinning โŒ โŒ โœ…
API Key Obfuscation โŒ โŒ โœ…
Screenshot Protection โŒ โŒ โœ…

Dependencies Added:

  • Basic+: flutter_secure_storage, flutter_jailbreak_detection, device_info_plus
  • Standard+: local_auth
  • Enterprise: encrypt, crypto, pointycastle, flutter_windowmanager

1.1.0 - 2025-11-18 - Analytics & Crash Reporting #

โœจ NEW: Analytics & Crash Reporting Support #

  • โœ… Added includeAnalytics boolean and analyticsProvider enum to BlueprintConfig for analytics integration.
  • โœ… New AnalyticsProvider enum supporting: firebase, sentry, and none.
  • โœ… Comprehensive analytics template generators:
    • AnalyticsService: Abstract interface with unified API for all providers
    • FirebaseAnalyticsService: Complete Firebase Analytics + Crashlytics + Performance implementation
    • SentryAnalyticsService: Full Sentry integration with breadcrumbs and transactions
    • AnalyticsEvents: Pre-defined event constants for consistency
    • ErrorBoundary: Widget wrapper for automatic error reporting
  • โœ… Added --analytics <provider> CLI option (firebase, sentry, none).
  • โœ… Integrated into interactive wizard with provider selection.
  • โœ… Automatic dependency management for Firebase and Sentry packages.
  • โœ… Integration across all mobile templates (Provider, Riverpod, Bloc).
  • โœ… Comprehensive test suite with 23 passing tests.

Usage Examples:

# Firebase Analytics
flutter_blueprint init my_app --analytics firebase --state bloc

# Sentry
flutter_blueprint init my_app --analytics sentry --state riverpod

# Interactive wizard (includes analytics option)
flutter_blueprint init

Generated Structure:

lib/core/analytics/
โ”œโ”€โ”€ analytics_service.dart              # Abstract interface
โ”œโ”€โ”€ firebase_analytics_service.dart     # Firebase implementation
โ”œโ”€โ”€ sentry_service.dart                 # Sentry implementation
โ””โ”€โ”€ analytics_events.dart               # Event constants

lib/core/widgets/
โ””โ”€โ”€ error_boundary.dart                 # Error catching widget

Key Features:

  • Provider flexibility: Choose between Firebase or Sentry
  • Unified API: Same interface regardless of provider
  • Auto error tracking: ErrorBoundary widget catches and reports errors
  • Performance monitoring: Built-in trace support
  • Event tracking: Pre-defined constants for common events
  • User identification: Set user ID and properties
  • Crash reporting: Automatic crash detection and reporting

Dependencies Added:

  • Firebase: firebase_core, firebase_analytics, firebase_crashlytics, firebase_performance, package_info_plus
  • Sentry: sentry_flutter, package_info_plus

1.0.5 - 2025-11-18 - Pagination Feature #

โœจ NEW: Pagination Support #

  • โœ… Added includePagination boolean to BlueprintConfig to toggle pagination support when generating projects.
  • โœ… New pagination template generators: PaginationController, PaginatedListView, and SkeletonLoader (generated into lib/core/pagination/).
    • PaginationController: Generic controller with multiple states (initial, loading, loadingMore, success, failure, empty), automatic pagination logic, error handling with retry, and pull-to-refresh support.
    • PaginatedListView: Production-ready widget with infinite scroll detection, pull-to-refresh, customizable builders (empty, error, loading, loadingMore, separator), and scroll threshold configuration.
    • SkeletonLoader: Animated skeleton screens with shimmer effects, pre-built list tiles, and automatic theme adaptation (light/dark mode).
  • โœ… Added --pagination CLI flag for easy enablement via command line.
  • โœ… Integrated into interactive wizard with "Pagination support (infinite scroll + skeleton loaders)" multi-select option.
  • โœ… Integrated pagination templates across Provider, Riverpod, and Bloc mobile templates with conditional generation.
  • โœ… Added comprehensive tests (test/src/templates/pagination_integration_test.dart) covering config serialization, template generation, and content verification.
  • โœ… Updated documentation with usage examples and implementation details.

Usage Examples:

# Generate project with pagination support
flutter_blueprint init my_app --state riverpod --api --pagination

# Interactive wizard mode (select from features list)
flutter_blueprint init

# Programmatic configuration
BlueprintConfig(
  appName: 'my_app',
  stateManagement: StateManagement.provider,
  includePagination: true,
)

Generated Structure:

lib/core/pagination/
โ”œโ”€โ”€ pagination_controller.dart    # Generic pagination state management
โ”œโ”€โ”€ paginated_list_view.dart      # Infinite scroll widget with pull-to-refresh
โ””โ”€โ”€ skeleton_loader.dart           # Animated loading skeletons

Key Features:

  • Type-safe pagination: Generic PaginationController<T> works with any data type
  • Automatic infinite scroll: Triggers at 90% scroll position by default (configurable)
  • Pull-to-refresh: Built-in RefreshIndicator support
  • Comprehensive error handling: Retry logic for both initial load and load more
  • Customizable UI: All builders are optional and can be overridden
  • Production-ready: Includes loading states, empty states, error states, and skeleton loaders
  • Smooth animations: Shimmer effect for skeleton loaders with theme support

Benefits:

  • Save hours of pagination implementation time
  • Consistent UX across all list screens
  • Professional loading states with animated skeletons
  • Built-in best practices for infinite scroll and error handling
  • Zero boilerplate - ready to use with your API

Impact:

  • Tests: 305 โ†’ 315 tests (+10 pagination tests, all passing)
  • Generated files: Up to 3 additional files when pagination is enabled
  • Production-ready: Tested with all three state management options

See the generated pagination_controller.dart, paginated_list_view.dart, and skeleton_loader.dart files for complete implementation details and usage examples.


0.9.4 - 2025-11-03 - Quality of Life Improvements #

โœจ NEW: Hive Offline Caching #

  • โœ… Added includeHive boolean to BlueprintConfig to toggle Hive support when generating projects.
  • โœ… New Hive template generators: HiveDatabase, CacheManager, and SyncManager (generated into lib/core/storage/) to provide offline persistence, configurable cache strategies (TTL/LRU/size), and an offline sync queue with retry logic.
  • โœ… Integrated Hive templates across Provider, Riverpod, and Bloc starter templates; pubspec dependencies and main.dart initialization are added conditionally when includeHive: true.
  • โœ… Added comprehensive tests (test/src/templates/hive_integration_test.dart) and a helper script tools/create_with_hive.dart which generates a sample app (generated_hive_app) to verify outputs.
  • โœ… Documentation added: HIVE_IMPLEMENTATION.md (full implementation notes, usage examples, and architecture benefits).
  • โš ๏ธ Note: The CLI --hive flag is planned (not added to the public CLI flags yet). Use programmatic BlueprintConfig(includeHive: true) or the generation script to enable Hive for now.

See HIVE_IMPLEMENTATION.md at the repo root for complete implementation details and examples.

โœจ NEW: Automated Windows Installer #

  • โœ… Introduced install.ps1 script for Windows users to automate installation and PATH setup.
  • โœ… Streamlined installation process from multiple manual steps to a single PowerShell command.
  • โœ… Automatically adds the Dart pub cache bin directory to the user's PATH environment variable.
  • โœ… Updated README.md to guide Windows users to the new automated installation method.

๐Ÿš€ NEW: Automatic Update Checker #

  • โœ… Added a non-intrusive, automatic update checker to the CLI.
  • โœ… Notifies users when a new version of flutter_blueprint is available on pub.dev.
  • โœ… Caches the check for 24 hours to ensure minimal performance impact.
  • โœ… Displays a clear, actionable message with the command to update.

0.8.3 - 2025-11-01 - Bug Fixes & Improvements #

๐Ÿ› FIX: Windows Compatibility #

  • โœ… Fixed issues with Windows compatibility for Flutter commands
  • โœ… Improved handling of file paths and environment variables on Windows
  • โœ… Ensured flutter pub get and flutter create commands run correctly on Windows

๐Ÿ› ๏ธ IMPROVEMENT: Asset Configuration #

  • โœ… Improved asset configuration handling for multi-platform projects
  • โœ… Streamlined asset paths and folder structures

0.8.0 - 2025-11-01 - Collaboration & Team Features + Performance Optimization #

๐Ÿค NEW: Collaboration & Team Features #

Shared Blueprint Configurations - Share Standards Across Your Team!

  • โœ… Shared configuration system - Create and share team-wide project templates
  • โœ… Configuration repository - Centralized management of shared configs
  • โœ… Share command - Complete CLI for managing shared configurations
  • โœ… Import/Export - Share configs via files or repository
  • โœ… Validation - Ensure configurations meet requirements before use
  • โœ… Version control - Track configuration changes over time

Share Command Features:

# List available configurations
flutter_blueprint share list

# Import a configuration
flutter_blueprint share import ./company_standard.yaml

# Export a configuration
flutter_blueprint share export company_standard ./exported.yaml

# Validate a configuration file
flutter_blueprint share validate ./config.yaml

# Use a shared configuration
flutter_blueprint init my_app --from-config company_standard

Configuration Structure:

  • Team Standards: Define state management, platforms, CI/CD provider
  • Code Style: Line length, naming conventions, quote preferences
  • Architecture: Pattern enforcement, feature structure, layer separation
  • Required Packages: Ensure critical dependencies are included
  • Custom Metadata: Add team-specific information

Example Configurations Included:

  • company_standard.yaml - Enterprise best practices with Bloc + full stack
  • startup_template.yaml - Lightweight MVP config with Provider
  • enterprise_template.yaml - Full-featured config for large-scale apps

Benefits:

  • Instant consistency across all team projects
  • Faster onboarding with pre-configured templates
  • Enforce standards at project creation time
  • Share best practices through configuration
  • Reduce setup time from hours to seconds

Validation:

  • โœ… 62 tests for collaboration features
  • โœ… All tests passing (266 total)
  • โœ… Full end-to-end testing with example configs
  • โœ… Configuration validation working correctly

โšก NEW: Performance & Optimization Features #

Performance Profiling & Optimization Tools!

  • โœ… Performance monitoring setup - Track app metrics automatically
  • โœ… Bundle size analyzer - Understand what's adding to app size
  • โœ… Asset optimization - Find unused and large assets
  • โœ… Tree-shaking analysis - Get code size reduction recommendations
  • โœ… Performance config - Configure monitoring in blueprint.yaml
  • โœ… Automated tracking - App startup, screen loads, API calls, frames

Performance Analyzer:

# Analyze performance setup
flutter_blueprint analyze --performance

# Analyze bundle size
flutter_blueprint analyze --size

# Optimize assets
flutter_blueprint optimize --assets

# Tree-shaking analysis
flutter_blueprint optimize --tree-shake

Performance Tracking Features:

  • App Startup Time: Measure time to first frame
  • Screen Load Time: Track navigation performance
  • API Response Time: Monitor network requests
  • Frame Render Time: Detect frame drops and jank
  • Custom Metrics: Add your own performance markers

Bundle Size Analysis:

  • Code size breakdown by package
  • Asset size analysis
  • Recommendations for optimization
  • Tree-shaking opportunities

Benefits:

  • Catch regressions early with automated monitoring
  • Optimize bundle size for faster downloads
  • Improve user experience with performance insights
  • CI/CD integration for performance testing

Validation:

  • โœ… Performance analyzer with comprehensive tests
  • โœ… Bundle size analysis working
  • โœ… Asset optimization detection
  • โœ… Tree-shaking recommendations

๐Ÿ”ง NEW: Auto-Refactoring Tool #

Automated Code Improvements & Migrations!

  • โœ… Auto-refactoring command - Apply code improvements automatically
  • โœ… Add caching layer - Inject caching with one command
  • โœ… Add offline support - Enable offline functionality
  • โœ… State management migration - Migrate between Provider/Riverpod/Bloc
  • โœ… Error handling - Add comprehensive error handling
  • โœ… Logging infrastructure - Add professional logging
  • โœ… Performance optimization - Apply performance best practices
  • โœ… Testing infrastructure - Add test scaffolding
  • โœ… Dry-run mode - Preview changes before applying
  • โœ… Backup creation - Automatic backups before refactoring

Refactor Command:

# Add caching layer
flutter_blueprint refactor --add-caching

# Add offline support
flutter_blueprint refactor --add-offline-support

# Migrate state management
flutter_blueprint refactor --migrate-to-riverpod
flutter_blueprint refactor --migrate-to-bloc

# Add error handling
flutter_blueprint refactor --add-error-handling

# Add logging
flutter_blueprint refactor --add-logging

# Optimize performance
flutter_blueprint refactor --optimize-performance

# Add testing infrastructure
flutter_blueprint refactor --add-testing

# Preview changes (dry-run)
flutter_blueprint refactor --add-caching --dry-run

Refactoring Types:

  1. Add Caching - Repository pattern with cache layer
  2. Add Offline Support - Local persistence + sync logic
  3. Migrate to Riverpod - Convert Provider โ†’ Riverpod
  4. Migrate to Bloc - Convert Provider/Riverpod โ†’ Bloc
  5. Add Error Handling - Comprehensive try-catch patterns
  6. Add Logging - Professional logger integration
  7. Optimize Performance - Performance best practices
  8. Add Testing - Test scaffolding and examples

Benefits:

  • Save hours of manual refactoring
  • Reduce errors with automated changes
  • Maintain consistency across the codebase
  • Easy migrations between patterns

Validation:

  • โœ… Refactoring tool with comprehensive logic
  • โœ… Dry-run mode working
  • โœ… Backup creation functional
  • โœ… All refactoring types implemented

๐ŸŽจ NEW: Project Templates #

Pre-configured Templates for Common App Types!

  • โœ… E-commerce template - Product catalog, cart, checkout
  • โœ… Social media template - Feed, profiles, messaging
  • โœ… Fitness tracker template - Workouts, progress tracking
  • โœ… Finance app template - Transactions, budgets, reports
  • โœ… Food delivery template - Menu, orders, delivery tracking
  • โœ… Chat app template - Real-time messaging, groups

Usage:

flutter_blueprint init my_store --template ecommerce
flutter_blueprint init my_social --template social-media
flutter_blueprint init my_fitness --template fitness-tracker
flutter_blueprint init my_budget --template finance-app
flutter_blueprint init my_food --template food-delivery
flutter_blueprint init my_chat --template chat-app

๐Ÿ“ฆ NEW: Dependency Management Utilities #

Smart Package Management!

  • โœ… Dependency manager - Fetch latest versions from pub.dev
  • โœ… Version resolution - Automatic version compatibility checks
  • โœ… Update notifications - Alert when packages are outdated
  • โœ… Latest deps flag - Use --latest-deps for newest versions

Usage:

flutter_blueprint init my_app --latest-deps

โœ… NEW: Input Validation Utilities #

Professional Form Validation!

  • โœ… Comprehensive validators - Email, phone, URL, credit card
  • โœ… Custom validators - Easy to extend
  • โœ… Error messages - User-friendly validation messages
  • โœ… 100% test coverage - All validators thoroughly tested

Generated Validators:

  • Required field validation
  • Email validation (RFC 5322 compliant)
  • Phone number validation (international formats)
  • URL validation
  • Min/max length validation
  • Numeric validation
  • Custom regex patterns
  • Credit card validation

๐Ÿ“Š Impact #

Code Generation:

  • Generated files: 43 โ†’ 60+ (with all features)
  • Test coverage: 204 tests โ†’ 266 tests (+30%)
  • New commands: 3 new major commands (share, optimize, refactor)
  • Example configs: 3 production-ready templates included

Developer Productivity:

  • Configuration sharing: Instant team standardization
  • Performance insights: Built-in monitoring and analysis
  • Automated refactoring: Hours โ†’ Minutes
  • Template library: Start with proven patterns

Quality Improvements:

  • 100% test pass rate: All 266 tests passing
  • Zero analyzer errors: Clean codebase
  • Documentation: 4 new comprehensive docs
  • Production-ready: Enterprise-grade features

0.6.1 - 2025-10-31 - Platform Support & Auto-Publish Fixes #

0.7.0 - 2025-10-31 #

๐Ÿ”„ Auto-generated Release #

Changes:

  • Automatic minor version bump
  • Triggered by: feat: Update CHANGELOG, README, and pubspec.yaml for platform support and auto-publishing improvements
  • Commit: c12fa177ca25ab9afa038400463870f7bfd47f17

๐Ÿ”ง Bug Fixes #

Platform Support Declaration:

  • โœ… Fixed incorrect platform support warnings by explicitly declaring CLI platforms (Windows, Linux, macOS)
  • โœ… Removed CliRunner export from main library to prevent mobile platform conflicts
  • โœ… Updated package description to clarify this is a CLI tool that generates apps for all platforms
  • โœ… Added clear documentation that CLI runs on desktop, but generated projects support Android/iOS/Web/Desktop

Auto-Publishing Reliability:

  • โœ… Fixed auto-publish workflow not triggering by using PAT instead of GITHUB_TOKEN
  • โœ… Added persist-credentials: false to checkout step
  • โœ… Added configurable REPO_PAT secret support with graceful fallback
  • โœ… Updated README with setup instructions for reliable auto-publishing

๐Ÿ“ Documentation #

  • โœ… Added prominent note in README clarifying CLI vs generated project platforms
  • โœ… Added PAT setup guide for GitHub Actions publishing
  • โœ… Updated pubspec.yaml description for better clarity

0.6.0 - 2025-10-30 #

๐Ÿ”„ Auto-generated Release #

Changes:

  • Automatic minor version bump
  • Triggered by: feat: Implement fully automated CI/CD with version bumping, publishing, and quality checks
  • Commit: d0f2de8cb067a561ddaeeedc35ccc62f2ffb5979

๐Ÿค– Fully Automated Release Pipeline #

GitHub Actions Workflows:

  • โœ… Auto-versioning workflow - Automatically bumps version based on commit messages
    • feat: โ†’ minor bump (0.5.1 โ†’ 0.6.0)
    • fix: or other โ†’ patch bump (0.5.1 โ†’ 0.5.2)
    • feat!: or BREAKING CHANGE: โ†’ major bump (0.5.1 โ†’ 1.0.0)
    • Automatically updates pubspec.yaml and CHANGELOG.md
    • Creates and pushes git tags
    • Skip with [skip-version] in commit message
  • โœ… Publish workflow - Publishes to pub.dev when tags are pushed
    • Uses GitHub OIDC for secure authentication (no secrets needed!)
    • Verifies version matches tag
    • Runs tests and analysis before publishing
    • Creates GitHub Release with auto-generated notes
  • โœ… Quality checks workflow - Runs on every PR and push
    • Code analysis with dart analyze --fatal-infos
    • Format checking
    • Full test suite with coverage
    • Publish dry-run validation

Documentation:

  • โœ… Added comprehensive automation guide - docs/AUTOMATED_PUBLISHING.md
    • Complete setup instructions for pub.dev OIDC
    • GitHub Actions configuration guide
    • Usage examples with conventional commits
    • Troubleshooting section
  • โœ… Updated README - Added automation section with badges
    • Workflow status badges
    • Quick start guide for automated releases
    • Setup instructions

Benefits:

  • Zero-touch releases - Push to main and everything happens automatically
  • No manual version management - Smart commit-based versioning
  • No secrets to manage - Uses GitHub OIDC tokens
  • Full audit trail - All releases tracked in GitHub Actions
  • Quality guaranteed - Tests must pass before publish

Impact:

  • Release time: Manual 10 minutes โ†’ Automated 30 seconds
  • Human error: Eliminated version mismatches and forgotten changelog updates
  • Security: No long-lived credentials, temporary OIDC tokens only
  • Developer experience: Simple git push triggers entire pipeline

0.5.2 - 2025-10-30 #

Email Support Update #

0.5.1 - 2025-10-30 - Pub.dev Quality Improvements #

๐ŸŽฏ Pub.dev Score Improvements (140 โ†’ 160 points expected) #

Code Quality Fixes:

  • โœ… Fixed all 90 analyzer issues - Package now has zero lints, warnings, or errors
    • Added curly braces to if statements for better code safety
    • Converted string concatenation to interpolation
    • Removed unnecessary braces in string interpolations (86 fixes)
    • Removed unnecessary string escapes (42 fixes)
  • โœ… Added comprehensive API documentation - 30%+ public API coverage
    • Added dartdoc comments to BlueprintConfig class and all public members
    • Documented BlueprintManifest and BlueprintManifestStore APIs
    • Added detailed documentation to BlueprintGenerator class
    • Included parameter descriptions and usage examples

Package Structure:

  • โœ… Added example directory - Created example/example.md with comprehensive usage examples
    • Basic CLI usage examples
    • Multi-platform project generation
    • Feature addition workflow
    • Generated project structure overview
    • Running and testing instructions

Publishing Ready:

  • โœ… Added publishing scripts - scripts/publish.ps1 and scripts/publish.sh
  • โœ… Updated README - Added "Publishing to pub.dev" section with step-by-step instructions
  • โœ… Clean pubspec.yaml - Removed incorrect plugin block, bumped version to 0.5.0

Impact:

  • Pub points: 140/160 โ†’ 160/160 (expected)
  • Analyzer issues: 90 โ†’ 0
  • API documentation: 30.6% โ†’ 40%+ coverage
  • Package score: Production-ready for pub.dev

Unreleased #

๐Ÿ“ Documentation updates #

  • Updated documentation files to reflect recent generator and template changes:
    • EXAMPLES.md: clarified CLI usage for --platforms, documented that the generator now attempts to run flutter pub get automatically after generation (with a manual fallback), and added multi-platform usage examples.
    • README.md: replaced older responsive library recommendations with flutter_screenutil (example dependency), added notes that generated responsive utilities use flutter_screenutil + LayoutBuilder, and clarified CI multi-platform behavior in the CI section.
  • CI Templates: noted in docs that generated CI configs now include web and desktop jobs where relevant.
  • Verification: unit tests were run locally and passed after doc updates.

0.5.0 (Current) #

๏ฟฝ NEW: Multi-Platform Support - Build Once, Run Everywhere! #

What's New:

  • โœ… Multi-platform project generation - Mobile, Web, AND Desktop in one codebase
  • โœ… Universal templates - Automatically adapts to selected platforms
  • โœ… Responsive layouts - Breakpoints utility for mobile/tablet/desktop
  • โœ… Adaptive navigation - Bottom nav (mobile) โ†’ Rail (tablet) โ†’ Drawer (desktop)
  • โœ… Platform-specific entry points - main_mobile.dart, main_web.dart, main_desktop.dart
  • โœ… Smart dependency management - Only includes packages needed for selected platforms
  • โœ… Interactive multi-select - Checkbox UI in wizard for platform selection
  • โœ… Platform detection utilities - PlatformInfo helper class

Usage:

# Mobile + Web (multi-platform)
flutter_blueprint init my_app --platforms mobile,web --state bloc

# All platforms (universal app)
flutter_blueprint init my_app --platforms all --state riverpod

# Desktop only
flutter_blueprint init my_desktop_app --platforms desktop --state provider

# Interactive mode (wizard includes platform multi-select)
flutter_blueprint init

Platform Options:

Flag Description
--platforms mobile iOS & Android only (default)
--platforms web Web application only
--platforms desktop Windows, macOS, Linux
--platforms mobile,web Multi-platform (mobile + web)
--platforms all Universal app (mobile + web + desktop)

Generated Structure (Multi-Platform):

lib/
โ”œโ”€โ”€ main.dart                   # Universal entry point (routes by platform)
โ”œโ”€โ”€ main_mobile.dart            # Mobile-specific initialization
โ”œโ”€โ”€ main_web.dart               # Web initialization (URL strategy)
โ”œโ”€โ”€ main_desktop.dart           # Desktop initialization (window manager)
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ responsive/
โ”‚   โ”‚   โ”œโ”€โ”€ breakpoints.dart           # Mobile/Tablet/Desktop breakpoints
โ”‚   โ”‚   โ”œโ”€โ”€ responsive_layout.dart     # Responsive widget
โ”‚   โ”‚   โ”œโ”€โ”€ adaptive_scaffold.dart     # Adaptive navigation
โ”‚   โ”‚   โ””โ”€โ”€ responsive_spacing.dart    # Responsive padding/spacing
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ””โ”€โ”€ platform_info.dart         # Platform detection utilities
โ”œโ”€โ”€ web/
โ”‚   โ”œโ”€โ”€ index.html                     # PWA-ready HTML
โ”‚   โ””โ”€โ”€ manifest.json                  # Web app manifest
โ””โ”€โ”€ windows/macos/linux/               # Desktop platform folders

Responsive Features:

  • Breakpoints: Breakpoints.isMobile(), isTablet(), isDesktop()
  • ResponsiveLayout: Adapts UI to screen size automatically
  • AdaptiveScaffold: Navigation adapts (bottom nav โ†’ rail โ†’ drawer)
  • ResponsiveSpacing: Responsive padding and grid columns

Platform-Specific Dependencies:

  • Web: url_strategy (clean URLs), PWA support
  • Desktop: window_manager (window control), path_provider
  • All: flutter_adaptive_scaffold, responsive_framework

Benefits:

  • Single codebase for all platforms
  • Responsive by default with adaptive layouts
  • Clean separation with platform-specific entry points
  • Smart dependencies - no bloat
  • PWA-ready web apps
  • Professional window management for desktop

Impact:

  • 10x faster multi-platform development
  • Consistent UI across all platforms with responsive design
  • Production-ready responsive components included
  • Easy maintenance with shared business logic

Validation:

  • โœ… 40 tests passing (including multi-platform tests)
  • โœ… 0 compile errors
  • โœ… Tested on mobile, web, and desktop platforms
  • โœ… Responsive layouts validated on all screen sizes

0.5.0-ci #

๐Ÿš€ CI/CD Scaffold Generation - Production-Ready from Day One! #

What's New:

  • โœ… Automated CI/CD configuration - Generate GitHub Actions, GitLab CI, or Azure Pipelines workflows
  • โœ… Multi-platform builds - Automated Android and iOS builds
  • โœ… Code quality gates - Automatic analyze, format check, and test execution
  • โœ… Coverage reporting - Built-in code coverage tracking and reporting
  • โœ… Deployment ready - Firebase App Distribution integration templates
  • โœ… Interactive wizard support - CI provider selection in wizard mode

Usage:

# Create project with GitHub Actions
flutter_blueprint init my_app --ci github

# Create project with GitLab CI
flutter_blueprint init my_app --state riverpod --ci gitlab

# Create project with Azure Pipelines
flutter_blueprint init my_app --state bloc --ci azure

# Interactive mode (wizard includes CI selection)
flutter_blueprint init

Generated CI Configurations:

Provider File Features
GitHub .github/workflows/ci.yml Multi-job pipeline, coverage, artifacts
GitLab .gitlab-ci.yml Multi-stage pipeline, coverage reports
Azure azure-pipelines.yml Multi-stage pipeline, test results, artifacts

Pipeline Stages:

  1. Analyze - flutter analyze + dart format verification
  2. Test - Unit tests with coverage reporting
  3. Build Android - APK generation with artifact upload
  4. Build iOS - IPA generation (with codesign instructions)

Benefits:

  • Zero setup time - CI/CD ready on first commit
  • Best practices - Industry-standard workflows included
  • Extensible - Easy to add deployment stages
  • Professional - Production-grade configurations

Impact:

  • Immediate CI/CD for all new projects
  • Consistent quality gates across all features
  • Faster feedback loops with automated testing
  • Deployment ready with Firebase templates

0.3.0-dev.1 #

๐Ÿ”ฅ NEW: Incremental Feature Generation - The Killer Feature! #

What's New:

  • โœ… add feature command - Generate features incrementally in existing projects
  • โœ… Smart state management detection - Automatically generates Provider/Riverpod/Bloc files based on blueprint.yaml
  • โœ… Clean architecture scaffolding - Creates data/domain/presentation layers
  • โœ… Automatic router integration - Injects routes into app_router.dart
  • โœ… Selective layer generation - Choose which layers to generate with flags
  • โœ… API integration support - Include remote data sources with --api
  • โœ… Router skip option - Use --no-router to skip automatic router updates

Usage:

# Full feature with all layers
flutter_blueprint add feature auth

# Only presentation layer
flutter_blueprint add feature settings --presentation --no-data --no-domain

# With API integration
flutter_blueprint add feature products --api

# Skip router update
flutter_blueprint add feature profile --no-router

Generated Structure (example: auth):

lib/features/auth/
โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ models/auth_model.dart
โ”‚   โ”œโ”€โ”€ datasources/
โ”‚   โ”‚   โ”œโ”€โ”€ auth_remote_data_source.dart  # if --api
โ”‚   โ”‚   โ””โ”€โ”€ auth_local_data_source.dart
โ”‚   โ””โ”€โ”€ repositories/auth_repository_impl.dart
โ”œโ”€โ”€ domain/
โ”‚   โ”œโ”€โ”€ entities/auth_entity.dart
โ”‚   โ”œโ”€โ”€ repositories/auth_repository.dart
โ”‚   โ””โ”€โ”€ usecases/
โ”‚       โ”œโ”€โ”€ get_auth_list.dart
โ”‚       โ”œโ”€โ”€ get_auth_by_id.dart
โ”‚       โ”œโ”€โ”€ create_auth.dart
โ”‚       โ”œโ”€โ”€ update_auth.dart
โ”‚       โ””โ”€โ”€ delete_auth.dart
โ””โ”€โ”€ presentation/
    โ”œโ”€โ”€ pages/auth_page.dart
    โ”œโ”€โ”€ widgets/auth_list_item.dart
    โ””โ”€โ”€ [provider|riverpod|bloc]/  # Adapts to project's state management

State Management Adaptation:

Project Type Generated Files
Provider feature_provider.dart (ChangeNotifier)
Riverpod feature_provider.dart (StateNotifier + sealed states)
Bloc feature_event.dart, feature_state.dart, feature_bloc.dart

Flags:

  • --data / --no-data - Generate/skip data layer
  • --domain / --no-domain - Generate/skip domain layer
  • --presentation / --no-presentation - Generate/skip presentation layer
  • --api - Include remote data source (Dio-based)
  • --router / --no-router - Update/skip app_router.dart modification

Impact:

  • 10-20x faster feature development
  • Perfect consistency across all features
  • Zero boilerplate - one command does everything
  • Production-ready code generation

Validation:

  • โœ… Tested with Provider, Riverpod, and Bloc templates
  • โœ… Automatic router update working
  • โœ… Generated 13-15 files per feature
  • โœ… Clean architecture maintained

0.2.0-dev.3 #

๐Ÿš€ NEW: Multi-Template State Management Support #

What's New:

  • โœ… Riverpod Template - Compile-time safe state management
  • โœ… Multi-template architecture (Provider + Riverpod, Bloc coming soon)
  • โœ… Template selection via --state flag
  • โœ… All templates share professional core modules

Riverpod-Specific Features:

  • ProviderScope wrapper in main.dart for dependency injection
  • ConsumerWidget pattern for reactive UI
  • StateNotifier with immutable state classes and copyWith()
  • Global providers in core/providers/app_providers.dart
  • Compile-time safety - catch errors before runtime
  • Better testability - providers easily mocked with ProviderContainer
  • Automatic disposal - no memory leaks

Usage:

# Generate Riverpod project
flutter_blueprint init my_app --state riverpod --theme --api

# Or use wizard (select Riverpod from menu)
flutter_blueprint init

Template Comparison:

Feature Provider Riverpod
State Class ChangeNotifier StateNotifier
UI Widget Consumer ConsumerWidget + WidgetRef
State Updates notifyListeners() state = state.copyWith(...)
Dependency Injection MultiProvider wrapper ProviderScope + ref.watch()
Compile-Time Safety โŒ โœ…
Generated Files 43 files 42 files

Dependencies:

  • flutter_riverpod: ^2.5.1 - Riverpod state management

Validation:

  • โœ… Generated 42 files with professional architecture
  • โœ… 0 analyzer errors
  • โœ… 9/9 tests passing
  • โœ… Same core modules as Provider (API, Logger, Storage, Validators, etc.)

What's Next: Bloc template coming soon!


0.2.0-dev.2 #

โœจ NEW: Interactive Wizard Mode #

Beautiful CLI Experience:

  • โœ… Guided step-by-step project setup
  • โœ… Arrow key navigation for state management selection
  • โœ… Multi-select checkboxes for features (spacebar to toggle)
  • โœ… Configuration preview before generation
  • โœ… Smart validation (prevents Dart reserved words)
  • โœ… Package name validation (lowercase with underscores)
  • โœ… Emoji-rich, colorful UI powered by interact package

Usage:

# Launch wizard
flutter_blueprint init

# Or use quick mode
flutter_blueprint init my_app --state provider

Dependencies Added:

  • interact: ^2.2.0 - Beautiful CLI interactions

0.2.0-dev.1 #

๐Ÿš€ MAJOR UPGRADE: Enterprise-Grade Professional Template #

BREAKING: Generated projects now include 43 files (up from 19) with production-ready patterns.

๐Ÿ†• New Professional Modules

Error Handling System ๐Ÿšจ

  • โœ… 9 custom exception classes (FetchDataException, UnauthorizedException, etc.)
  • โœ… Clean architecture Failures with Equatable
  • โœ… Type-safe error handling throughout

Production API Client ๐ŸŒ

  • โœ… Enhanced Dio client with generic methods (GET/POST/PUT/DELETE)
  • โœ… AuthInterceptor - auto-add JWT tokens
  • โœ… RetryInterceptor - exponential backoff retry logic
  • โœ… Enhanced LoggerInterceptor with structured logging
  • โœ… ApiResponse

Professional Logger ๐Ÿ“

  • โœ… AppLogger with 5 levels (debug/info/warning/error/success)
  • โœ… Tag-based filtering for modules
  • โœ… Emoji-prefixed output for better readability
  • โœ… Stack trace support for errors

Storage Layers ๐Ÿ’พ

  • โœ… LocalStorage - SharedPreferences wrapper with type safety
  • โœ… SecureStorage - FlutterSecureStorage wrapper for tokens
  • โœ… Singleton pattern implementation
  • โœ… Built-in error handling and logging

Form Validators โœ…

  • โœ… 7 production-ready validators (email, password, phone, required, minLength, maxLength, numeric)
  • โœ… Consistent error messages
  • โœ… 8 unit tests with 100% coverage
  • โœ… Easy to extend for custom validators

Reusable Widget Library ๐Ÿงฉ

  • โœ… LoadingIndicator - customizable loading spinner
  • โœ… ErrorView - error display with retry button
  • โœ… EmptyState - empty list placeholders
  • โœ… CustomButton - button with loading state
  • โœ… CustomTextField - styled text field with validators

Extension Methods ๐Ÿ”ง

  • โœ… String extensions (capitalize, isValidEmail, isBlank, removeWhitespace)
  • โœ… DateTime extensions (formattedDate, isToday, isYesterday)
  • โœ… BuildContext extensions (theme, colors, width, showSnackBar)

Constants & Configuration ๐Ÿ“‹

  • โœ… AppConstants - timeouts, storage keys, pagination defaults
  • โœ… ApiEndpoints - centralized API route management
  • โœ… RouteNames - route constants
  • โœ… AppColors - custom color palette

Network Monitoring ๐Ÿ“ก

  • โœ… NetworkInfo - connectivity status checks
  • โœ… Real-time connectivity stream
  • โœ… Works on all platforms

Enhanced State Management ๐ŸŽฏ

  • โœ… Professional Provider patterns with loading/error states
  • โœ… Separated UI components (pages/widgets/providers)
  • โœ… Consumer pattern with proper state handling
  • โœ… Example feature with best practices

Test Infrastructure ๐Ÿงช

  • โœ… Validator unit tests (8 tests, all passing)
  • โœ… Test helpers for widget testing
  • โœ… MockTail integration for testing
  • โœ… CI/CD ready structure

๐Ÿ“ฆ New Dependencies

  • shared_preferences: ^2.2.3 - Local storage
  • flutter_secure_storage: ^9.2.2 - Secure token storage
  • equatable: ^2.0.5 - Value comparison for Failures
  • connectivity_plus: ^6.0.5 - Network monitoring
  • pretty_dio_logger: ^1.4.0 - API logging

๐Ÿ“ˆ Metrics

  • Generated Files: 19 โ†’ 43 (+126%)
  • Core Modules: 5 โ†’ 10 (+100%)
  • Reusable Widgets: 0 โ†’ 5
  • API Interceptors: 1 โ†’ 3 (+200%)
  • Lines of Code: ~800 โ†’ ~2,500+ (+200%)
  • Analyzer Errors: 0
  • Test Coverage: 100% (validators)

๐Ÿ’ก Impact

For Developers:

  • Save 2-3 days of boilerplate setup
  • Professional patterns from day one
  • Focus on features, not infrastructure

For Teams:

  • Consistent codebase across projects
  • Reduced onboarding time
  • Faster MVP delivery

For Enterprises:

  • Enterprise-grade architecture
  • Security patterns included
  • Logging and monitoring ready
  • Scalable structure

0.1.0-dev.1 #

Initial Development Release #

Core Features:

  • โœ… CLI-based project generation with flutter_blueprint init
  • โœ… Interactive and flag-based configuration modes
  • โœ… Provider state management template (mobile platform)
  • โœ… Modular architecture with core/features folder structure
  • โœ… Optional theme scaffolding (light/dark mode support)
  • โœ… Optional localization setup (ARB files + intl)
  • โœ… Optional environment configuration (.env support)
  • โœ… Optional API client setup (Dio + interceptors)
  • โœ… Optional test scaffolding (widget tests + mocktail)
  • โœ… Auto-routing system with route guards
  • โœ… Blueprint manifest (blueprint.yaml) for project tracking

Template Structure:

  • Clean architecture with core/, features/, and app/ layers
  • Type-safe configuration management
  • Production-ready folder organization
  • Best-practice imports and dependency injection

What's Next:

  • Riverpod and Bloc templates
  • Feature generation command (flutter_blueprint add feature)
  • Web and desktop platform support
  • Plugin system for optional modules
  • CI/CD scaffold generation
20
likes
135
points
335
downloads

Publisher

unverified uploader

Weekly Downloads

Production-ready Flutter CLI scaffolding tool with multi-platform support, advanced state management (Provider/Riverpod/Bloc), universal API configurator, enterprise security (OWASP headers, certificate pinning, rate limiting), smart caching, auth token management, offline-first architecture, and Material 3. Flutter 3.38 & Dart 3.10 compatible.

Repository (GitHub)
View/report issues
Contributing

Topics

#cli #scaffolding #code-generation #flutter #architecture

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

args, http, interact, mustache_template, path, pub_semver, yaml

More

Packages that depend on flutter_blueprint