An App with 2 interfaces one for admin and for public catalogue

Hi I’m new to Meteor and I totally believe in it’s philosophy but I’m facing some problems implementing the follwing:

I want to have a route for admin which should load all things related to admin who will Crud products and process orders.

And other route for catalogue which should include and load all related templates and files. catalogue will be publicly accessed and registration is must if you user want to order.

Virtually They are different interfaces but meteor will load all templates and assets and then they will be selected by router but how can I separate the two different interfaces?

thank you

This can all be handled by your router and separate layouts. I’ll assume you’re using Blaze; you could use Flow Router to create separate routes for the public and admin sides of your application, with separate layouts that then include the needed site components. There are quite a few examples floating around that outline how you can do this. If you want to see some sample code, I recently ported an old demo app I had over to Meteor 1.3 to leverage its ES2015 module support. This app demos a claim admin system with a public site for collecting claim details, and an admin site for managing claims. You can take a look at how I have the router setup and configured to handle splitting the 2 interfaces up.

1 Like

Does your public part still downloads templates of admin part?

Thank you hwillson that is really helpful!

I think Meteor is not like other frameworks. In other router based frameworks like express you can completely separate 2 single page application user interfaces like admin and site by using server routing whereas in meteor it loads everything then the client router decides that based on rules that’s what I understand is that right? if so then the more the codebase grows the more files to load assuming Meteor loads everything?

Yes Degger I think it loads admin part but I’m not sure

Yes, it’s loading both parts. If you want to have them loaded separately, you could consider creating 2 separate apps (1 public, 1 admin) then having them both talk to the same database. See Building and Admin App as a Microservice With Meteor.js for an example.

Thank you so much hwillson