Do you mean the visitor’s browser is running a Single Page App?
Two ports? Is one port for the dev server, and one port for the production server? It might be possible with a workaround for Glitch’s single external port limitation.
Are you doing Server Side Rendering, and running the client code on the server? If so, you may need to do some experimenting and measure the CPU usage for the anticipated number of visitors.
The setup for a Glitch project usually has a package.json at the top folder (/app/) and modules are in subfolders with their own package.json. I don’t see any problem with a subfolder containing a different app entirely. It might mean some fiddling with npm scripts or devDependencies to trigger the build when you want it to.
Another consideration is whether pnpm is being used in the subfolders to conserve disk space.
I think the usefulness of combining them depends on the reasons you have them separate, for example if you want to be able to deploy them to different servers.
I’d recommend making a tiny version of the app to experiment with in Glitch. Something minimal that still reflects the structure you want, but with less complexity to make resolving problems and taking measurements easier, and also with code that you can share with the community to allow people to help.
I’m looking forward to seeing more