-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Frontend POC #243
base: main
Are you sure you want to change the base?
New Frontend POC #243
Conversation
So I honestly have no experience with React, so I can't really judge this. |
BTW, assuming this replaces all the hardcoded strings with the translations, in the html templates, can you also use this to replace the hardcoded strings in the JS /PHP files? |
Hi @JVT038 ! Thank you for showing your interest in this. |
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.