A comprehensive Flutter development toolkit that streamlines application development with Supabase integration, code generation, and architectural patterns. This monorepo contains multiple packages and tools that work together to provide a cohesive development experience.
kimapp/
βββ packages/ # Core packages
β βββ kimapp/ # Main package with core utilities
β βββ kimapp_generator/ # Code generation package
β βββ kimapp_utils/ # Utility functions and extensions
β βββ kimapp_supabase_helper/ # Supabase integration helpers
βββ pubs/ # Additional published packages
β βββ autoverpod/ # Auto-generated Riverpod providers
β βββ autoverpod_generator/ # Generator for autoverpod
βββ mason/ # Mason bricks for code generation
β βββ kimapp/ # Core Kimapp brick
β βββ kimapp_feature/ # Feature generation brick
β βββ kimapp_simple_feature/ # Simplified feature brick
β βββ kimapp_feature_ui/ # UI components brick
β βββ kimapp_package/ # Package template brick
βββ tools/ # Development tools and scripts
βββ template_generators/ # Custom code generators
- kimapp: Core utilities, widgets, and base classes
- kimapp_generator: Code generation for models, repositories, and more
- kimapp_utils: Utility functions and extensions
- kimapp_supabase_helper: Helpers for Supabase integration
- Schema-First Approach: Define database tables as Dart schemas
- Type-Safe Models: Generate Freezed models from schemas
- Repository Generation: Consistent repository pattern implementation
- Form Generation: Streamlined form handling with validation
- Feature Generation: Quickly scaffold new features with proper architecture
- UI Components: Generate consistent UI components
- Package Templates: Create new packages with proper structure
- Melos Integration: Monorepo management with scripts for common tasks
- Template Generators: Custom code generators for specific use cases
- Flutter SDK (>=3.3.0)
- Dart SDK (>=3.3.0)
- Melos for monorepo management
- Mason CLI for code generation
- Clone the repository:
git clone https://github.com/pckimlong/kimapp.git
cd kimapp- Install Melos globally:
dart pub global activate melos- Bootstrap the project:
melos bootstrapThis will install all dependencies and link local packages together.
- Install Mason CLI:
dart pub global activate mason_cli- Get the bricks:
cd mason
mason get- Generate a new feature:
mason make kimapp_feature --name user_management --table users- Define your database schema using the schema-first approach
- Generate the feature using Mason:
mason make kimapp_feature --name feature_name --table table_name- Implement the repository methods
- Create providers for state management
- Build the UI components
melos run build_allThis will run build_runner in all packages that depend on it.
melos run testmelos run format
melos run analyzeMelos provides several useful commands for managing the monorepo:
melos bootstrap: Set up the projectmelos run update_deps: Update dependencies in all packagesmelos run format: Format Dart code in all packagesmelos run analyze: Run static analysismelos run build_all: Run build_runner in all packagesmelos run test: Run tests in all packagesmelos run clean: Clean all packagesmelos run publish_dry: Run a dry-run of publishing all packagesmelos run publish: Publish all packages to pub.dev
Kimapp uses a schema-first methodology where database tables are defined as Dart schemas. These schemas generate type-safe models, repositories, and providers, ensuring alignment between the database and application code.
@TableStructure(
'products',
classPrefixName: 'Product',
idColumn: 'ProductId:string',
columns: [
'name',
'price:double',
'description?', // Optional field
'category_id>Category', // Foreign key
],
)
class ProductTable {}- Use type-safe ID classes for all ID fields
- Foreign keys must reference the appropriate ID type
- Leverage Freezed and
fast_immutable_collectionsfor immutable data structures
Each feature includes:
- Schema: Defines the database table and generates models
- Repository: Manages CRUD operations and data access
- Providers: Handles state management with Riverpod
- Params: Specifies request parameters for operations
This project is licensed under the MIT License - see the LICENSE file for details.