Skip to content

Konete326/flutter_Boiler_plate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Typing SVG

A scalable, modular, and production-ready Flutter boilerplate built on Feature-First Clean Architecture.

Flutter Dart Firebase

🚀 Overview

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.

🏗️ Architecture

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
Loading

Folder Structure

Self-contained modules per feature. Shared utilities exist strictly in /core or /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

⚙️ Setup & Installation

Prerequisites

  • Flutter SDK (latest stable)
  • Firebase CLI (firebase-tools)
  • FlutterFire CLI

1. Clone & Install

git clone https://github.com/Konete326/flutter_Boiler_plate
cd flutter_Boiler_plate
flutter pub get

2. Environment Variables

Secure keys must never be committed. We use flutter_dotenv.

cp .env.example .env

(Populate .env with your active keys).

3. Firebase Connectivity

Configure Firebase securely out of the box:

  1. Create a project at Firebase Console.
  2. Enable Authentication (Google Sign-In), Realtime Database, and Storage.
  3. Apply security rules strictly from docs/FIREBASE_RULES.md.
  4. Run:
flutterfire configure

4. Run

flutter run

🔒 Security Principles

  • 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.

📫 Maintainer & Contact

Developed and maintained by Muhammad Sameer.

Have questions about architectural patterns or need a custom feature module built? Connect with me via LinkedIn or shoot me an email.

About

A production-ready Flutter boilerplate featuring Clean Architecture, Riverpod state management, Go Router, and Firebase integration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors