Skip to content

Flutter application that demonstrates the differences between using a REST API versus a GraphQL API while following the best practices using Dart, Clean Architecture, State Management, Service Locator, Tests...

License

Notifications You must be signed in to change notification settings

matthieucoisne/YelpExplorer-Flutter

Repository files navigation

YelpExplorer-Flutter

build

Project Description

YelpExplorer is a multiplatform project that shows a list of businesses, their details and latest reviews using Yelp's API.

I originally created this project to learn about GraphQL but since Yelp is also serving its data with a REST API, I thought it would be a great opportunity to showcase the power of Clean Architecture when it comes to being able to swap one data layer for another without having to modify the domain and presentation layers.

I then thought it would be a great experience to port the Android project to Flutter and ReactNative to learn more about all the different technologies that exist to build multiplatform applications.

This project is available in:
Compose/Kotlin
Flutter/Dart
ReactNative/TypeScript

Screenshots

Business List Business Details
YelpExplorer - Business List YelpExplorer - Business Details

Project Characteristics

  • Multiplatform project using Flutter and Dart
  • Modern architecture (Clean Architecture, BLoC, Service Locator)
  • Testing
  • Material design
  • Continuous Integration with GitHub Actions
  • Project management with GitHub Project Board

Tech Stack

Development Setup

Yelp API Key

If you want to build and run this project on physical device, a simulator/emulator, or a web browser, you need to obtain your own API key from Yelp and provide it to the app.

  1. Request your API key: https://www.yelp.com/developers/documentation/v3/authentication
  2. Create a json file config/app_config.json located at the root of the project and add your API key like this:
    {
      "api_key": "YOUR_API_KEY"
    }
    

REST vs GraphQL

This project allows you to either use the GraphQL API or the REST API to retrieve data.
To switch between one or the other, you can change the value of USE_GRAPHQL in const.dart

Author

Follow me

License

Copyright 2020-Present Matthieu Coisne

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Flutter application that demonstrates the differences between using a REST API versus a GraphQL API while following the best practices using Dart, Clean Architecture, State Management, Service Locator, Tests...

Topics

Resources

License

Stars

Watchers

Forks