Architecture - enduser -vs- admin as two SPA

We have a fairly substantial app (30K lines of proprietary code). It is B2B, so in addition to an enduser client, it has UI for configuration that only admins will use. The admin side is browser only, while the enduser side is both browser- and Cordova-ready.

For the browser, we want to serve the admin client and the enduser client as distinct SPA pages (e.g. “my-app.com/” returns the enduser client and “my-app.com/admin” returns the admin client). For Cordova, we want to build only the enduser client. How have others addressed this issue?

Packages can limit what goes to web.cordova but they don’t allow us to split web.browser. (Not to mention that we get some “SyntaxError: Can’t use const in strict mode” surfacing.)

v1.3 will offer imports — but that is apparently lazy evaluation not lazy loading. Has anyone implemented lazy loading such that it fires all Meteor’s Template instantiation afterwards?

A wrapper around the build process with the expectation that we run two Meteor servers in production? (The server, admin client and enduser client all version together, so they’re one logical codebase.)

2 Likes