/flutter-fir-e-commerce

A simple e-commerce implementation using Flutter and Firebase

Primary LanguageDartMIT LicenseMIT

Flutter-Fir-E-Commerce

style: very good analysis License: MIT

Generated by the Very Good CLI 🤖

A very simple product that shows some good practices that I apply everyday as a Software Engineer.

Highlights

  • Flutter adaptation of Clean Architecture by Robert C. Martin
  • Firebase as a Backend Service using Firestore and Storage services
  • Strong reactive programming
  • Eithers, Monads and many other FP thingies
  • Bloc/Cubit as a state management solution.
  • Dependency Injection using injectable and get_it packages
  • Feature oriented architecture, decoupling as much as possible the entire dependency tree.

Getting Started 🚀

This project contains 3 flavors:

  • development
  • staging
  • production

To run the desired flavor either use the launch configuration in VSCode/Android Studio or use the following commands:

# Development
$ flutter run --flavor development --target lib/main_development.dart

# Staging
$ flutter run --flavor staging --target lib/main_staging.dart

# Production
$ flutter run --flavor production --target lib/main_production.dart

*Flutter Fir E Commerce works on iOS, Android, Web, and Windows.


Running Tests 🧪

To run all unit and widget tests use the following command:

$ flutter test --coverage --test-randomize-ordering-seed random

To view the generated coverage report you can use lcov.

# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
$ open coverage/index.html

Architecture and Design Patterns

This project is based on Clean Architecture book by