The project is a mobile application built with Flutter that serves as a platform to discover and share new products, from Product Hunt. It uses Bloc as the state management and architecture. The project uses GraphQL to communicate with the backend.
And Crybse is another project which uses RiverPod and clean architecture
product_hunt.mp4
The application uses Bloc as the state management library, which follows a unidirectional data flow pattern. The app has the following directory structure:
lib/
|-- core/
|-- constants/
|-- extensions/
|-- helpers/
|-- data/
|-- apis/
|-- models/
|-- repositories/
|-- features/
|-- post/
|-- bloc/
|-- view/
|-- widgets/
main.dart
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
The application has unit tests for:
Repository
Bloc
Widget
To run all unit and widget tests use the following command:
$ flutter test --coverage
# Development
$ flutter build apk --target lib/main_development.dart --flavor development --release -v
# Staging
$ flutter build apk --target lib/main_staging.dart --flavor staging --release -v
# Production
$ flutter build apk --target lib/main_production.dart --flavor production --release -v