Skip to content

s2g090123/NBAToday

Repository files navigation

Run Testing Danger Checks Coverage

NBAToday

Note that NBA Today must be used in conjunction with NBAToday-Server

About

With a range of features designed to enhance your NBA experience, this app is perfect for fans who want to stay up-to-date with their favorite teams and players.

Check your favorite team's schedule, view live score updates, and check out score box in real-time. Want to know how your team is performing in the league? Simply view the standings page to see how they stack up against the competition.

From points per game to field goal percentage, NBA Today has all the data you need.

Looking for information on individual players? This app includes personal profiles and career stats for every player in the league. Learn more about their background, achievements, and career milestones.

Customize your experience by selecting your preferred theme color, and for those who like to bet on their favorite teams, I've got you covered with the option to place bets within the app.

Overall, NBA Today is the perfect companion for basketball fans.

Technology

Built with the latest in Android app development technologies! Use the MVVM and Repository Pattern.

Here are the key technologies I've used to create this app:

  • Jetpack Compose
  • Coroutine & Coroutine Flow
  • Compose Navigation
  • Retrofit
  • Room
  • DataStore
  • Koin

Error handling

The flowchart describes the error handling in NBA Today:

  1. Server to Repository: The process begins with the server, which, upon encountering an error, sends an "Error Response" using Retrofit
  2. Repository to UseCase: Once the repository receives the error response, it processes and wraps it into a "Common Error Response" suitable for the app's internal handling.
  3. UseCase to ViewModel: The UseCase further processes the error and translates it into a "Function Error" encapsulated within a Resource.
  4. ViewModel to UI: The ViewModel receives the function error and maps it to a "Feature Error (with Message)" suitable for display in the UI and update the state based on the error.
  5. UI Handling: Finally, the UI is responsible for displaying the error message to the user.

CI workflows

NBA Today utilizes two CI workflows: Danger and Testing.

All generated reports, including Danger, testing result and jacoco code coverage reports, are archived on GitHub for easy access and reference

Danger workflow

The Danger workflow is designed to enforce coding standards and catch potential issues early in the development process.

Danger checks:

  1. ktlint: Enforces Kotlin coding style.
  2. detekt: Performs static code analysis for Kotlin.
  3. Android lint: Ensures adherence to Android coding conventions.

Utilize Danger to comment on PR with any issues found, alerting the PR author or reviewer.

Testing workflow

The Testing workflow focuses on ensuring the reliability and correctness of the codebase by running both unit and Android tests. Additionally, it generates a code coverage report using jacoco.

Video

095ef519-7641-41da-b52b-a24ded0857de.mp4
7b3ef124-f8d1-4afd-b02d-8d163338bbba.mp4

Screenshot

To-do list

  • Write Unit Tests
  • Write End to End Tests
  • CI
  • Deploy NBA Today Server