Skip to content

raphaaugustosilva/flutter_clean_arch_repository

Repository files navigation

Flutter Clean Arch Repository

This project implements a clean arch repository, with an app that aims to allow a rock'n'roll band staff to track the current weather and the forecast for the 5 next days of the main cities where shows of the tour.

Features

This project has the following features:

  • Works offline (friendly error page with retry function if there is no connection);
  • List and search for concerts;
  • Weather information (current, minimum and maximum temperature, main weather icon and description) for the current day and the next 5 days of the selected city show;
  • Loading states with animation and error state for all the screens;
  • Responsive adaptive for different screen sizes.

Technology

This project uses Flutter for app development, Firebase Crashlytics for monitoring crashes, Firebase Analytics and OpenWeather API for Weather retrieval, GetIt for dependency injection and MobX for state managment.

Architecture

This project uses Clean Arch with SOLID design principles. The main layers of the project are:

  • domain: models and interfaces
  • infra: apis, repositories
  • services: usecases
  • presentation: ui, components

Environment Variables

To run this project, you will need to provide the following environment variables:

ENVIRONMENT => DEV ou PROD

WEATHER_API_URL => Weather API Url. It`s usually https://api.openweathermap.org

WEATHER_API_KEY => Your created Open Weather API Key

Getting Started

To build and run this project:

  1. In order to communicate with OpenWeather API, you need to create a free account and get your API key.
  2. Get Flutter here if you don't already have it
  3. Clone this repository.
  4. run cd into the repo folder.
  5. run flutter pub get in order to get the project dependencies
  6. run flutter pub run build_runner build --delete-conflicting-outputs in order to generate the .g files
  7. flutter run -t lib/app/main.dart --dart-define=ENVIRONMENT=DEV --dart-define=WEATHER_API_URL=https://api.openweathermap.org --dart-define=WEATHER_API_KEY={YOUR_WEATHER_API_KEY} to run the app

(Please note that a Mac with XCode is required to build for iOS)

Tests

This project has unit and widget/UI tests to ensure quality and possible breaking changes when developing new codes. To run the tests, run flutter test inside project's repo folder.

Feedback

If you have any feedback, please reach out at raphaaugustosilva@gmail.com

Contributing

You are welcome to contribute to this project! If you have an idea or a bug fix, please open an issue or a pull request.

License

This project is licensed under the MIT License. See LICENSE for more information.

Author

Screenshots

Splash Screen | Home | No Data | Search | Loading | Weather Detail

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published