MCBoarder289 / shelf-help

Shelf Help - an app to help connect your Goodreads shelf with your library
https://shelfhelpapp.com
MIT License
4 stars 0 forks source link

Refactor to be React App w/ Flask Backend #26

Closed MCBoarder289 closed 5 months ago

MCBoarder289 commented 6 months ago

Now that the app is functional as a prototype with Plotly's Dash platform, I'd like to try and refactor this to have a distinct FE and BE so that the visual experience is cleaner / more modern. With a React FE, there would be more flexibility for the interactivity, which also might solve some of the PWA issues (not leveraging the url params).

This will be a significant refactor which will take more time, but I'd like to grow this full-stack skillset. I think it will be worth the investment. This resource seems useful as a good place to start.

Overall Vision

FE specifics

BE Specifics

Refactor Concerns

MCBoarder289 commented 6 months ago

Mantine UI Components

MCBoarder289 commented 6 months ago

Helpful article on Pydantic for BE validation / JSON serde: https://medium.com/@danielwume/exploring-pydantic-and-dataclasses-in-python-a-comprehensive-comparison-c3269eb606af

MCBoarder289 commented 6 months ago

Started with create react app, but might want to look into their pwa template: https://create-react-app.dev/docs/making-a-progressive-web-app/

MCBoarder289 commented 6 months ago

This might be needed for awaiting components to finish? https://stackoverflow.com/questions/71778278/how-can-i-ensure-that-a-react-component-is-loaded-only-after-some-api-call-has-b

Or loading behavior?

MCBoarder289 commented 6 months ago

https://stackoverflow.com/questions/66444067/react-display-loading-animation-for-api-call-duration

Loading behavior example

MCBoarder289 commented 6 months ago

https://dev.to/will_yama/how-to-render-responses-96c

Another helpful article about calling external apis

MCBoarder289 commented 6 months ago

Render static site info regarding redirects: https://community.render.com/t/cant-connect-api-calls-to-web-service-express-from-my-static-site/10229/3

MCBoarder289 commented 6 months ago

Looks like I need to go with a Vite template because create react app doesn’t work maybe?

https://help.mantine.dev/q/can-i-use-mantine-with-cra

Vite PWA- https://vite-pwa-org.netlify.app/guide/

Vite PWA- https://dev.to/_ibrahimturan/adding-pwa-to-vite-applications-1bce

MCBoarder289 commented 6 months ago

Might need this for changing the URL without refreshing the page? https://stackoverflow.com/questions/57101831/react-router-how-do-i-update-the-url-without-causing-a-navigation-reload

MCBoarder289 commented 6 months ago

Backend: Might need to consider the BE returning ALL the books, so that the FE can avoid using bandwidth to simply get a random selection.

Frontend: This might mean a refactor to use ReactQuery and manage the cache that way.