Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joao Alves SuperFormula Code Test #15

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

JoaoReisA
Copy link

@JoaoReisA JoaoReisA commented Sep 15, 2024

General info

First to run the app you need to provide a .env file with a field API_KEY that represents yelp api key value, so that app can be able to make api requests.

Architecture

To develop the i used an implementation of clean arch, that have 4 main layers:

  • Domain : Represents the core logic of the app and store data models and works independently of other layers.
  • Data: Does the communication with external things like local storages and api requests
  • Presentation: Shows the Ui to the user using data and logic from domain layer
  • Core: common things and configurations useful for all the application

Using this architecture we can achieve independency of the layers, being able to replace and add parts very easily if necessary, follow SOLID principles that helps to maintain a healthy codebase and be able to adapt and introduce new patterns since clean arch is an abstract guideline that the main goal is to be the best case for your application following certain guidelines.

Here is diagram of example:

image

Packages usage (new added)

  • get_it:
    Used for dependency injection
  • flutter_bloc:
    Used as a state management library to achieve responsible UIs and State control
  • shared_preferences:
    Used to have access to device local storage
  • Equatable
    Provide comparison between objects

Working app

Screen.Recording.2024-09-15.at.12.38.51.mov

Improvements

Given more time i would definitely improve my implementation in certain aspects like:

  • improve test coverage
  • offset logic and pull to refresh
  • how i show errors to the user
  • Client class that uses Dio and return CustomReponses and Exceptions
  • Ui List visualization with Slivers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant