Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Marcelo Sanchez - Code challenge for SuperFormula #14

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

Conversation

MarceKalEl
Copy link

@MarceKalEl MarceKalEl commented Feb 17, 2024

Hi all!

Description:
This PR introduces a series of enhancements and structural refinements to our Flutter project, acknowledging the limitations posed by external dependencies and optimizing our architecture and feature set. A key focus has been placed on adhering to Clean Architecture principles, albeit with a tailored approach to suit the already established repository patterns within the project. Below are the key highlights and rationale behind these changes:

Constant JSON Usage: In response to Yelp API's rate limiting, I've opted to utilize a constant JSON for data handling. This approach ensures that our development and testing processes remain uninterrupted by external API constraints, allowing us to simulate a stable data environment.

Clean Architecture Adaptation: While our project's scope and existing repository layout did not necessitate a full-blown Clean Architecture implementation, I've made strides in aligning with its principles where feasible. This adaptation ensures a scalable and maintainable codebase, facilitating easier future enhancements and feature additions.

BLoC and Feature-First Paradigm: The presentation layer has been restructured to leverage the BLoC pattern, emphasizing a feature-first approach. This reorganization enhances readability, maintainability, and the ease of feature scalability, aligning with Flutter's reactive programming model.

Splash Screen Introduction: To improve the user experience and provide a seamless app startup, a splash screen has been implemented. This addition not only enhances the aesthetic appeal but also prepares the app's state and resources in the background, leading to a smoother transition for the user.

Functional Programming with Oxidized: Embracing functional programming concepts, I've integrated Oxidized into the project. This inclusion allows for more expressive and concise code, particularly in handling success and error states, thereby improving overall code quality and readability.

This PR lays the groundwork for a more robust, scalable, and maintainable application, setting a solid foundation for future developments and enhancements. Your feedback and contributions to these changes are highly valued as I continue to refine and expand our project's capabilities.
I am looking forward to your feedback and suggestions on how we can further improve this implementation. Your insights are invaluable to enhancing the project's quality and functionality.

Finally I've added some unit testings and fix some stuff in the app that didn't satisfied my own demands. Now I consider done, some minor stuff might be added yet for sure. like optimizing Imports (I'll try to get a time to do it the next days). Or extracting the hardcoded strings onto a l10n file or package. And for sure, suggestions from your end will be welcome.

Finally I'd like to mention that I have enjoyed developing this small project. Actually I do enjoy doing flutter stuff.
Thanks for taking the time to review this PR. I appreciate the opportunity to present my work to you. I hope you find the project to your liking and look forward to potentially moving to the next stage

Warm regards.

Grabacion.de.pantalla.2024-02-17.a.la.s.23.27.00.mov

- Integrate `bloc` for state management to enhance app scalability and maintainability.
- Utilize `equatable` to simplify equality comparisons for state objects.
- Introduce a new splash screen for a better initial user experience.
- Integrate shimmer library to implement TrSkeleton loading skeleton.
- Create TrSkeleton widget to enhance UI loading states with shimmer effects.
- Wrap home_page with BlocProvider to manage state using HomeBloc.
- Implement BlocListener for state changes listening and handling in home_page.
- Use BlocBuilder for reactive UI updates based on HomeBloc states.
- Add HomeBloc to handle the business logic of home_page.
- Implement TabBar with 'All Restaurants' and 'My Favorites' tabs in HomePage.
- Implement a skeleton loader UI component for single restaurant views.
- Enhance user experience by providing a visual cue during data loading.
- Decouple TabView logic into distinct widgets for improved maintainability.
- Facilitate separate lifecycle management and state handling for each tab.
Integrate oxidized package to handle HTTP responses in YelpRepository with Result type, enhancing error handling and success response processing. This change improves code maintainability and readability by distinctly separating success and error cases.
Ensure null safety in model properties and JSON parsing methods.

- Utilize `@JsonKey` to handle custom keys and default values, enhancing data integrity and reducing runtime errors.
- Utilize oxidized Result to handle success and error states in home_bloc.
Implemented a new restaurant detail page with a hero image animation. The page layout has been refactored into smaller widgets for better readability and maintainability. This includes widgets for displaying restaurant information such as name, rating, and status.
…tion

- New models and entities are implemented for API calls.
- Added a new repository and API to fetch restaurant details.
- Optimized the loading and management of the favorites list.

Additionally, animation is introduced to provide a more organic UI experience for loaded items, and functions related to managing all restaurants and favorite restaurants are distributed across two separate Blocs.
User comments provide valuable feedback and personal experiences for each restaurant. This commit includes the implementation of a comment section within the restaurant review UI, allowing users to read through the opinions and stories shared by others. Additionally, necessary adjustments to the layout were made to accommodate variable-length comments without causing overflow issues.
This commit removes tests that no longer align with our current application structure following recent architectural changes. It also introduces new unit tests to cover the updated models and entities, ensuring our testing suite accurately reflects the application's current state and functionality.
… changes

- Updated Google Play Console configurations to align with the latest platform requirements.
- Applied and integrated previously stashed changes into the main development branch, ensuring compatibility and functionality with the current app version.
- Conducted thorough testing to validate that all features behave as expected post-update and that the integration of stashed changes does not introduce any regression.
@MarceKalEl MarceKalEl changed the title Code chanllenge for SuperFormular Code challenge for SuperFormular Feb 18, 2024
@MarceKalEl MarceKalEl changed the title Code challenge for SuperFormular Marcelo Sanchez - Code challenge for SuperFormula Feb 27, 2024
Copy link

@alberto-sf alberto-sf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your time! 😄

I really like how you split widgets and use const constructors. I also like how you've written tests and created the widget tree.

I have some comments about some Dart coding choices I'd like you to clarify!

@MarceKalEl
Copy link
Author

MarceKalEl commented Mar 3, 2024 via email

@diegog-sf
Copy link
Contributor

Hello @MarceKalEl , I'm having an issue running your project,

Error (Xcode): No file or variants found for asset: .env.

could you update the readme with instructions on how to run the app?

@MarceKalEl
Copy link
Author

MarceKalEl commented Mar 6, 2024 via email

@MarceKalEl
Copy link
Author

MarceKalEl commented Mar 6, 2024

Hello @MarceKalEl , I'm having an issue running your project,

Error (Xcode): No file or variants found for asset: .env.

could you update the readme with instructions on how to run the app?

hi @diegog-sf so sorry for the inconvenience, I have just updated the project and updated the readme. Is uploaded already an empty .env file, you will need to add the yelp appkey. If you need to use mine, please let me know.

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

Successfully merging this pull request may close these issues.

3 participants