documentation icon indicating copy to clipboard operation
documentation copied to clipboard

feat: Add fsd-fipe sample

Open MatheusMoura17 opened this issue 10 months ago • 3 comments

Background

Add new sample

This project was created to practice the FSD. It integrates with the FIPE API to demonstrate the application of this methodology in a real-world scenario.

  • Live demo: https://matheusmoura17.github.io/fsd-fipe/
  • Source: https://github.com/MatheusMoura17/fsd-fipe

Staiger

image

MatheusMoura17 avatar Jan 13 '25 00:01 MatheusMoura17

Hi, thanks for the example and the Steiger screenshot! I looked over the project briefly, and it looks nice, one comment — I found the api segment of the filter-vehicle feature strange. Typically, the api segment is for code that communicates with external APIs, but in your case it contains a Zustand store and a URL search params wrapper — both things related to data storage. Typically, these things should go to model. Why did you choose to put them in api?

illright avatar Feb 04 '25 21:02 illright

Oh, and also the app doesn't seem to be working for me: image

Link: https://matheusmoura17.github.io/fsd-fipe/vehicle-value?type=carros&brand=3&model=6&year=2004-1

illright avatar Feb 04 '25 21:02 illright

Hey @illright!

Thank you so much for taking the time to review this example!

Typically, these things should go to the model. Why did you choose to put them in the API?

You're right, I just confused some concepts while developing the project, and it ended up in the wrong place.
Fixed in https://github.com/MatheusMoura17/fsd-fipe/pull/3

Oh, and also, the app doesn't seem to be working for me.

It was a conflict between github-pages and react-router. I made a change to use hash-router, and now everything is working as expected. You can try visiting the link below:
https://matheusmoura17.github.io/fsd-fipe/#/vehicle-value?type=carros&brand=43&model=1833&year=1994-1

You can see all the changes here: v1.0.2.

MatheusMoura17 avatar Feb 13 '25 21:02 MatheusMoura17

I've decided not to stop adding examples to the site because of how much time they take to review and because the example section seems to be a persistent frustration with users. I'd prefer it if in the future we had a completely revised section with examples that would be more curated, but for now, please accept my apology for dragging this PR on for so long and then not merging it.

illright avatar Jun 19 '25 22:06 illright