Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #225 , this is a proof of concept for a next gen frontend for Movary.
For now, this only contains the login page (without any routing and logic).
In order to avoid having another server in the stack, the way this works, is by placing the built files in the existing
public
folder. Then, whenever a request comes in, it loads a basictwig
template where it loads the assets (mainly the JS and CSS).For now this twig template is only being used in here in a rather hacky way (with a conditional and a env var). If anyone can provide a better solution for this, where it gets implemented everywhere (maybe in a middleware when it's implemented #235 ?) would be very much appreciated.
Also, right now we're using the
ENV
variable to know if we need to load from the Vite development server (when in development), or serve the built assets inpublic/frontend
when in production.Implemented features:
Pending requirements from the backend before we move to this frontend:
To test locally:
Simply start docker, and make sure that the
USER_ID
in the.env
is the user on your local machine. Also addNEW_FRONTEND=1
to load the new template.