A scalable, modular, and production-ready Flutter boilerplate built on Feature-First Clean Architecture.
The Antigravity Boilerplate minimizes initial project setup friction. It enforces strict separation of concerns, guarantees predictability across the codebase, and hooks out-of-the-box into Firebase for rapid backend deployment.
Key Highlights:
- Riverpod for declarative state management.
- GoRouter for scalable, declarative routing.
- Firebase integration mapped specifically to free-tier capacities.
- Global Theme Engine pre-configured for seamless Dark/Light setups.
- 120 lines-per-file constraint baked into the project DNA to force component extraction.
We strictly follow Feature-First Clean Architecture. Every feature lives in isolation, minimizing cross-feature dependencies and avoiding "spaghetti" code.
graph TD
subgraph Data Layer
A(Remote/Local Data Source) --> B(Models & Mappers)
B --> C(Repository Implementation)
end
subgraph Domain Layer
C -. Implements .-> D((Repository Interface))
D --> E{Entities}
end
subgraph Presentation Layer
E --> F(Riverpod Providers)
F --> G[Widgets & UI]
G --> H[Screens]
end
style A fill:#1c1c27,stroke:#6c63ff,stroke-width:2px,color:#f0f0f5
style F fill:#1c1c27,stroke:#34c77b,stroke-width:2px,color:#f0f0f5
style H fill:#6c63ff,stroke:#000,stroke-width:2px,color:#fff
Self-contained modules per feature. Shared utilities exist strictly in
/coreor/shared.
lib/
├── core/ # App-wide constants, formatting, validators
├── features/ # Feature-specific isolation
│ └── auth/ # Example: Authentication feature
│ ├── data/ # Repository impl, models, Firebase calls
│ ├── domain/ # Repository interfaces
│ └── presentation/ # UI and Riverpod providers
├── routing/ # GoRouter definitions & Navigation guards
├── services/ # Shared raw SDK logic (e.g. Firebase wrappers)
├── shared/ # Globally reused UI components & Models
└── theme/ # Design tokens, Typography, Animations
- Flutter SDK (latest stable)
- Firebase CLI (
firebase-tools) - FlutterFire CLI
git clone https://github.com/Konete326/flutter_Boiler_plate
cd flutter_Boiler_plate
flutter pub getSecure keys must never be committed. We use flutter_dotenv.
cp .env.example .env(Populate .env with your active keys).
Configure Firebase securely out of the box:
- Create a project at Firebase Console.
- Enable Authentication (Google Sign-In), Realtime Database, and Storage.
- Apply security rules strictly from
docs/FIREBASE_RULES.md. - Run:
flutterfire configureflutter run- No Test Mode in Prod: Realtime database and Storage rules use default global deny. Explicitly grant endpoint access.
- Env Separation: Zero hard-coded logic parameters or API keys.
Developed and maintained by Muhammad Sameer.
- Email: sameerdevexpert@gmail.com
- LinkedIn: Sameer Akram
- GitHub: @Konete326
Have questions about architectural patterns or need a custom feature module built? Connect with me via LinkedIn or shoot me an email.