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.
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.
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.
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
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
To build and run this project:
- In order to communicate with OpenWeather API, you need to create a free account and get your API key.
- Get Flutter here if you don't already have it
- Clone this repository.
- run
cd
into the repo folder. - run
flutter pub get
in order to get the project dependencies - run
flutter pub run build_runner build --delete-conflicting-outputs
in order to generate the .g files 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)
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.
If you have any feedback, please reach out at raphaaugustosilva@gmail.com
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.
This project is licensed under the MIT License. See LICENSE for more information.