Skip to content

phuongpt/product_hunt

Repository files navigation

Product Hunt

Coverage style: very good analysis

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


Showcase

product_hunt.mp4
Image description Image description Image description Image description Image description
---

Architecture

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

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

Running Tests

The application has unit tests for:

Repository

Bloc

Widget

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

$ flutter test --coverage

Build

# 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

About

Product Hunt is built by Flutter/Bloc/GraphQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published