Enterprise project structure

I an planning to build an enterprise app which will have

  1. Landing Page
  2. Admin Section

I need to separate these two modules such that the css and js should not be same
I have different set of css and js to be loaded for each page and some common js and css
I am super confused how to go about this project structure.

Please help someone.

You’ll need to get the beta of Meteor 1.5 for that, to use code splitting. Alternatively I suppose you could create the admin client as an entirely separate project that connects to the same server.

is it possible for me to do the same thing in 1.4 by any chance?

One way to achieve that goal, is to have the admin section wrapped in a div that has a class such as admin then all of the css rules for the admin section start with .admin <CSS SELECTOR>

As for the javascript, its a bit trickier, is there a reason the JS can’t be included everywhere? Until 1.5 the way Meteor works is that all of the JS is bundled together. You just need to conditionally use it depending on what part of the app is running.

I assumed he really didn’t want to send the admin view at all. Since it’s “enterprise” maybe they demand a little extra security-by-obscurity. But yes of course you can have multiple pages, using a router for example, and only allow admins to access some of them.

But if you start now, by the time you’re done the stable release of 1.5 will probably be out :wink:

So I guess I will have to wait for sometime to write this kinda apps in Meteor. :cry:

I’m launching a new admin panel soon… I think it’ll be exactly what you are looking for. If you would like to preview it, let me know, it would be great to get your feedback.


Yes please send me. I am really having second thoughts about meteor.

I am interested for a preview

May I ask why exactly you are trying to separate CSS and JS this way? I mean, it’s pretty easy to use one bundled CSS file for your entire app, if you create your classes correctly and use proper CSS scoping. And for the JS, the access to the admin pages would be restricted by login and role settings, so who cares if the actual code is included in the bundle? As long as you don’t store confidential data like access tokens right inside the code (what isn’t a good practice for user-facing pages either), I would not see any reason for concerns.