What am I missing? Help with Node JS and Express Architecture in My First Large Project

Hi everyone, I’m Douglas and it’s my first post! I’ve been working on my first project from scratch. I’ve been doing the backend courses, node.js, express, and javscript since last year. The picture above shows my project structure, I built a html page with forms to be field, a button to update the inputs. When I click on the buttom I’m sending a POST request to the server to get the values of the form fields, put it into an object and store it in mongoDB. Calculation folder1 and 2 are javascript modules, I built those modules based on a excel spreadsheets that I made. The logic of the calculation folders depends on the object property values, meaning that changing any of those properties would update the entire calculations and the final output tables.
I got stuck trying to use the input fields from the browser in my calculations. I’m not sure where my calculation folders should be placed, and from where should I fetch the data to update my calculations. I’ve been thinking to use middlewares in express, but I’m not sure if that’s the correct way to do it. Calculation folder 1 and 2 has approximately 48000 lines of code, so I feel that I need some guidance/feedback from experienced developers to move on.
The idea here is use those inputs to test the calculations, that’s not everything, I still need to validate more calculations that I have with those outputs, and in the future all those inputs would come from other 3 sources via API requests.

Any help, suggestions or guidance is welcomed so that i can setup my project correctly and not have to go back and re-do a large body of work.