4

A few similar (but not same) questions were asked 2 years ago but not 100% answered..

(Segmented Meteor App(s) - loading only half the client or two apps sharing a database ;

Meteor: Different collections, different databases)

Since Meteor has changed quite a bit, was wondering if there was a better way of doing the following (i know about roles, publish subscribe etc):

Simple example: Say I have a restaurant ordering app with 2 portals:

(1) Consumer side, with accounts, and a form for your food order & pay for it w/ credit card (assume # is stored, not using Stripe etc).

(2) Admin side, with accounts, for the restaurant to manage incoming orders & track payments, see credit card numbers.

Assuming more complexity + very high security requirements, would this be structured as 1 monolithic meteor app? Or is there a standard way to break it into 2 (like traditional MVC frameworks, you might have 3 DBs - 1 Consumer DB, 1 Admin DB, 1 DB for shared sensitive data like credit card numbers - and 2 SPA clients). Breaking it into 2 would be preferable for the following reasons:

(1) different account types for the 2 portals - e.g. admins require 2FA. I also actually prefer to have separate DBs for security & backup precautions.

(2) useful for code management/distribution purposes

(3) also so we don't have to send all the Admin templates to the Consumer.

Community
  • 1
  • 1
ASX
  • 635
  • 7
  • 18
  • More than anything else - I'm asking if there is a **standard** way of doing this that fits **Meteor** specifically - i.e. not just what could/couldn't work. (i.e. a possible answer is simply "No") – ASX Apr 20 '15 at 10:00

1 Answers1

1

I think you would be able to use two Meteor apps accessing the same Mongo database.

Gaelan
  • 1,149
  • 11
  • 25