I have a question that is crucial for my end of year project.
My web application allows users to build other webapps based on drag&drop (within the domain of the webapp).
These web applications can contain regular elements, but also functional widgets in the form of ReactJS components that can even talk to our backend.
When the user uploads a self-created webapp, they upload the description for a website (*.zp format, which is actually json), which I'll build at the server (meaning, the json file is converted to an actual webpage with css, js properly built).
Here is the scheme for POSTing a single webpage, which I'll explain below:
- The user builds a webpage that is transformed into a descriptive json file (*.zp);
- The json file is uploaded to the NodeJS server, which builds the HTML (React JS components can be rendered to html at the server), css file (based on self written algorithm) and JS (minified/concatenated).
It requires conversion logic, and NodeJS child processes to transpile ES6 ReactJS components with webpack too;
- HTML, CSS and built (minified/concatenated) JS is sent to the Java Spring REST server to store into the db. Here my plan is to use Java as a simple REST server.
In case you wonder: I use Java Spring because my EOY project is for a Java graduate.
When the user wants to render a webpage, the files can be immediately downloaded from the Java services (which may implement further caching).
I have the following related questions:
- Do you see loopholes in the architecture that require a fix?
- I thought storing the html + JS + *.zp (json describing the site) be performed as a transaction in Java. Is this a valid workflow? If so, what is the best way to send the html, css, js and *.zp form the NodeJS to the Java server in a single shot?
- Do you have any advice related to choice of db? My intention was to use a mix between filesystem and MongoDB for the *.zp format.
I appreciate you help, the answer to this question is very important for me.