madaley1 / nova-library

0 stars 0 forks source link

Separate Frontend and Backend #21

Closed madaley1 closed 3 weeks ago

madaley1 commented 1 month ago

This is essentially an issue to fix up some of the issues that cropped up as a result of my pretty major refactor. I felt that my reliance on Next.js as a full stack framework was creating worse code than if I just separated it all out to be entirely decoupled.

I like the idea of the Front-end, Backend, and API layer all handled by one source, however, the directories were getting deep, the tests not complex, and it was taking more time to write concepts than if I could just build the backend, then build the api endpoint, then build the frontend to interface with that backend. For example, if my integrated tests cannot be run by githubs actions, how is it useful?

I turned this into a monorepo, it now is a Next.js app wtih a python backend and api, and the mysql db is still here. I also added a dockerfile in order to make hosting easier and ensure decoupling of the frontend/backend/db. That being said, the dashboard portion still contains the original backend, and I need to extract that functionality, update it for python, and rebuild tests. Maybe not integration tests just yet though, unit tests for the backend, and more use of mocks. Ironically this may end up with more files, but I think the navigation will be more understandable, and that is the goal.