Closed MCBoarder289 closed 5 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
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/
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?
https://stackoverflow.com/questions/66444067/react-display-loading-animation-for-api-call-duration
Loading behavior example
https://dev.to/will_yama/how-to-render-responses-96c
Another helpful article about calling external apis
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
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
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
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.
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