NY Times Most Popular Articles
NY Times mobile app that gets the most popular articles.
Report bug
·
Request feature
Table of contents
- Quick start
- What's included
- NY Times API
- Development Environment
- Architecture
- SonarQube
- Github Actions
- App Screenshots
- Bugs and feature requests
Quick start
This is a normal flutter app. You should follow the instructions in the official documentation to download Flutter. After you have successfully downloaded it, follow these instructions to run the app:
- Clone the repo using
git clone https://github.com/khalilahmad0/NY_Times_popular_articles.git
- Run
flutter pub get
in the project directory - Replace
apiKey
inlib/utils/api.dart
with your own NY Times API Key. For more info on how to generate your key, please follow NY Times developer's documentation. - Run the app with
flutter run
Optional
- To run the static code analysis, use
flutter analyze
- To run the unit tests, use
flutter test
- To build the APK, use
flutter build apk
What's included
- Master/detail app
- Articles listing
- Articles display
- Responsive layout
- Static code analysis
- Unit tests including code coverage
- Integration tests
- CI with Github Actions
- Following the best practices!
NY Times API
This repo is using NY Times Most Popular Articles API. More info here.
Development Environment
The app was developed using:
- Flutter 2.5.2 - channel stable
- Dart 2.14.3
- Android Studio Arctic Fox | 2020.3.1 Patch 2
The app was tested on:
- Emulator: Pixel 5 API 29
- Android Physical Device: Samsung S21 Ultra
Architecture
MVC architecture was used in this app. We have 1 model (Article), 3 views (Articles list, Article item, Article detail), 1 controller (loads the articles by calling the service)
SonarQube
SonarQube was used for code quality analysis. To run it:
- If you have SonarQube installed, just run
sonar-scanner
after ensuring that SonarQube is running. - If you don't have SonarQube installed, please follow this detailed tutorial .
My report:
Github Actions
I'm using Github Actions CI to run these tasks in order (It is triggered on every push or PR
to main
):
- Running static code analysis (default
flutter_linter
) - Running unit tests
- Build for production
- Save Artifact as a GitHub release
You can find the actions under .github/workflows/build.yml
App Screenshots
Bugs and feature requests
Have a bug or a feature request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue .
Enjoy 🤘