flutterkit-cli
v1.0.2
Published
Professional Flutter CLI starter with 40+ pre-configured modules
Downloads
24
Maintainers
Readme
🚀 FlutterKit
🎯 What is FlutterKit?
FlutterKit is a powerful CLI tool that generates production-ready Flutter applications with best practices, clean architecture, and 40+ pre-built modules. Stop reinventing the wheel — start building features that matter.
✨ Key Features
| Category | Features | |----------|----------| | 🔐 Auth | Firebase Auth, Supabase Auth, OAuth (Google, Apple), JWT, Biometric | | 💳 Payments | RevenueCat integration, Stripe, In-App Purchases, Subscriptions | | 💬 Chat | Real-time messaging, Push notifications, File sharing, Reactions | | 🤖 AI | OpenAI GPT-4, Claude, Gemini integration, LLM chat interface | | 📊 Analytics | Firebase Analytics, Custom events, User tracking | | 🎨 UI/UX | 20+ screen templates, Dark mode, Animations, Shimmer loading | | 🔧 Backend | Firestore, Supabase, REST API support, Offline sync | | 🧪 Testing | Unit tests, Widget tests, Integration tests, Mocking |
🚀 Quick Start
Installation
# Install globally via npm
npm install -g flutterkit
# Or use npx (no installation required)
npx flutterkit create MyAwesomeAppCreate Your First App
# Interactive mode - answer a few questions
flutterkit create MyAwesomeApp
# Or with all options inline
flutterkit create MyAwesomeApp \
--backend firebase \
--auth firebase \
--payments revenuecat \
--analytics firebase \
--ai openai \
--state riverpod \
--router go_routerRun Your App
cd MyAwesomeApp
flutter pub get
flutter run📋 CLI Options
| Option | Description | Default | Choices |
|--------|-------------|---------|---------|
| --backend | Backend provider | firebase | firebase, supabase, rest |
| --auth | Authentication provider | firebase | firebase, supabase, oauth |
| --payments | Payment integration | none | none, revenuecat, stripe |
| --analytics | Analytics provider | firebase | firebase, amplitude, mixpanel, none |
| --ai | AI/LLM integration | none | none, openai, claude, gemini |
| --state | State management | riverpod | riverpod, bloc, mobx, getx |
| --router | Navigation router | go_router | go_router, auto_route, navigator |
| --localization | i18n support | true | true, false |
| --testing | Include tests | true | true, false |
| --ci-cd | CI/CD workflows | github | github, gitlab, none |
Examples
# Minimal app with Firebase
flutterkit create QuickApp --backend firebase --auth firebase
# Full-featured SaaS app
flutterkit create SaaSApp \
--backend supabase \
--auth supabase \
--payments stripe \
--ai openai \
--analytics amplitude
# Social app with chat
flutterkit create SocialApp \
--backend firebase \
--auth firebase \
--chat yes \
--notifications yes📁 What's Generated
my_awesome_app/
├── 📱 lib/
│ ├── 🎯 main.dart # Entry point with flavor support
│ ├── 🏠 app.dart # App widget with theme
│ │
│ ├── 🔧 core/ # Core infrastructure
│ │ ├── 📐 config/ # App configuration
│ │ ├── 🎨 theme/ # Colors, typography, themes
│ │ ├── 🧭 router/ # Navigation & deep links
│ │ ├── 💾 storage/ # Local & remote storage
│ │ ├── 🌐 network/ # API clients & interceptors
│ │ └── ⚡ utils/ # Extensions, helpers, logger
│ │
│ ├── 🔐 features/auth/ # Authentication
│ │ ├── domain/entities/
│ │ ├── data/repositories/
│ │ └── presentation/
│ │ ├── screens/
│ │ └── providers/
│ │
│ ├── 💳 features/paywall/ # In-App Purchases
│ │ ├── data/models/
│ │ ├── domain/entities/
│ │ └── presentation/screens/
│ │
│ ├── 💬 features/chat/ # Real-time Chat
│ │ ├── data/models/
│ │ ├── domain/entities/
│ │ └── presentation/
│ │
│ ├── 🤖 features/llm_chat/ # AI Chat Interface
│ │ ├── data/
│ │ └── presentation/
│ │
│ ├── 🏠 features/home/ # Home Dashboard
│ │ └── presentation/
│ │
│ ├── ⚙️ features/settings/ # Settings & Profile
│ │ └── presentation/
│ │
│ └── 🎯 features/onboarding/ # Onboarding Flow
│ └── presentation/
│
├── 🧪 test/ # Test suites
│ ├── unit/
│ ├── widget/
│ └── integration/
│
├── 🔧 android/ # Android config
├── 🍎 ios/ # iOS config
├── 🌐 web/ # Web config
├── 🖥️ macos/ # macOS config
├── 🪟 windows/ # Windows config
│
├── 📦 pubspec.yaml # Dependencies
├── 🔥 firebase.json # Firebase config
└── ⚙️ analysis_options.yaml # Lint rules🔑 Setup Keys & Configuration
Firebase Setup
# 1. Install Firebase CLI
npm install -g firebase-tools
# 2. Login and initialize
firebase login
firebase init
# 3. Add to your app
# Place google-services.json in android/app/
# Place GoogleService-Info.plist in ios/Runner/Supabase Setup
# Create project at https://supabase.com
# Add to lib/core/config/app_config.dart:
const supabaseUrl = 'https://your-project.supabase.co';
const supabaseAnonKey = 'your-anon-key';RevenueCat Setup
# Add to lib/core/config/app_config.dart:
const revenueCatIosKey = 'appl_your_ios_key';
const revenueCatAndroidKey = 'goog_your_android_key';Sentry Setup
# Add to lib/core/config/app_config.dart:
const sentryDsn = 'https://[email protected]/zzz';OpenAI Setup
# Add to .env file (not committed):
OPENAI_API_KEY=sk-your-api-key🏗️ Architecture
FlutterKit follows Clean Architecture with 3 distinct layers:
┌─────────────────────────────────────────────────────────┐
│ 🎨 PRESENTATION LAYER │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │ Screens │ │ Widgets │ │ State (Riverpod│ │
│ └─────────────┘ └─────────────┘ └─────────────────┘ │
├─────────────────────────────────────────────────────────┤
│ 🎯 DOMAIN LAYER │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │ Entities │ │ Use Cases │ │ Repository IF │ │
│ └─────────────┘ └─────────────┘ └─────────────────┘ │
├─────────────────────────────────────────────────────────┤
│ 💾 DATA LAYER │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │ Models │ │ Repositories│ │ Data Sources │ │
│ └─────────────┘ └─────────────┘ └─────────────────┘ │
└─────────────────────────────────────────────────────────┘
↓ Dependency direction (inward)Architecture Principles
- Dependency Inversion: Domain layer has zero dependencies
- Single Responsibility: Each class has one reason to change
- Open/Closed: Extend features without modifying existing code
- Testability: Business logic is framework-agnostic
State Management
// Riverpod providers structure
lib/
└── features/auth/
└── presentation/
└── providers/
├── auth_provider.dart # Main auth state
├── auth_actions.dart # Auth methods
└── auth_selectors.dart # Derived stateNavigation
// GoRouter with deep links
@override
Widget build(BuildContext context, WidgetRef ref) {
final router = ref.watch(routerProvider);
return MaterialApp.router(
routerConfig: router,
// ...
);
}📦 All 40+ Modules
| # | Module | Description | Category | |---|--------|-------------|----------| | 1 | 🔐 Auth Firebase | Email/password, Google, Apple sign-in | Auth | | 2 | 🔐 Auth Supabase | Supabase Auth with Magic Link | Auth | | 3 | 🔐 OAuth | Social login integration | Auth | | 4 | 🔐 Biometric | Face ID / Touch ID | Auth | | 5 | 💳 RevenueCat | In-App Purchases & Subscriptions | Payments | | 6 | 💳 Stripe | Payment processing | Payments | | 7 | 💬 Chat Real-time | Firestore-based messaging | Chat | | 8 | 💬 Push Notifications | FCM + local notifications | Notifications | | 9 | 🤖 OpenAI GPT-4 | ChatGPT integration | AI | | 10 | 🤖 Claude | Anthropic Claude API | AI | | 11 | 🤖 Gemini | Google Gemini API | AI | | 12 | 🤖 LLM Chat UI | Pre-built chat interface | AI | | 13 | 📊 Firebase Analytics | Event tracking | Analytics | | 14 | 📊 Amplitude | Product analytics | Analytics | | 15 | 📊 Mixpanel | User analytics | Analytics | | 16 | 🎨 Onboarding | Multi-step onboarding | UI | | 17 | 🎨 Paywall | Subscription screens | UI | | 18 | 🎨 Settings | Complete settings UI | UI | | 19 | 🎨 Profile | User profile management | UI | | 20 | 🎨 Dark Mode | Theme switching | UI | | 21 | 🎨 Shimmer Loading | Skeleton loaders | UI | | 22 | 🎨 Animations | Pre-built transitions | UI | | 23 | 🔧 Firestore | Cloud database | Backend | | 24 | 🔧 Supabase | PostgreSQL backend | Backend | | 25 | 🔧 REST API | HTTP client with Dio | Backend | | 26 | 🔧 Offline Sync | Local persistence | Backend | | 27 | 🔧 Image Upload | Cloud storage | Backend | | 28 | 🔧 Deep Links | Universal links | Navigation | | 29 | 🔧 Routing | GoRouter setup | Navigation | | 30 | 🧪 Unit Tests | Mockito + test coverage | Testing | | 31 | 🧪 Widget Tests | Golden tests | Testing | | 32 | 🧪 Integration Tests | E2E testing | Testing | | 33 | 🧪 Mock Data | Fixtures & factories | Testing | | 34 | 🔍 Crashlytics | Error reporting | DevOps | | 35 | 🔍 Sentry | Error tracking | DevOps | | 36 | 🚀 GitHub Actions | CI/CD workflows | DevOps | | 37 | 🌍 Localization | i18n (10+ languages) | Internationalization | | 38 | ♿ Accessibility | Screen reader support | Accessibility | | 39 | 📱 Responsive | Adaptive layouts | UI | | 40 | 🔒 Security | Encryption & secure storage | Security |
🛠️ Development
Prerequisites
- Flutter SDK 3.24+
- Dart 3.5+
- Node.js 18+
- Firebase CLI (optional)
Local Development
# Clone the repository
git clone https://github.com/flutterkit/flutterkit.git
cd flutterkit
# Install dependencies
npm install
# Build the CLI
npm run build
# Link for local testing
npm link
# Test your changes
flutterkit create TestApp --backend firebaseRunning Tests
# Unit tests
npm test
# Integration tests
npm run test:integration
# Linting
npm run lint
# Full check
npm run check🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
FlutterKit is open-source software licensed under the MIT License.
💬 Support
- 📧 Email: [email protected]
- 💬 Discord: Join our community
- 🐦 Twitter: @flutterkit
- 📚 Docs: docs.flutterkit.dev
