Monolith vs. Multiple apps, an architecture question

Hey everyone.

I’m a couple months down the road with building online courseware software in Meteor, and the past week I have been thinking about something, and how it relates to structuring your Meteor app. Let me explain.

My application will ultimately have (for now) 3 main sections.

The first section would be the public facing site that serves up the marketing pages and the course catalog to sell the courses.

The second section would be for learners enrolled in the courses, who see the course content and take the course and get certificates.

The third section is the administrative area where instructional designers build their courses, a CMS, and engage with the learners from here…

In the past, I don’t have to worry about keeping a site like this as a monolith, even though we split up our application into micro services in Rails eventually. But in a meteor scenario I am asking public visitors and learners to also download all the client side JS dealing with the other sections as well as the administrative sections. I know that doing my publications correctly there is no real security concern, but my concern is one of security and downloading too much JS up front for a user who doesn’t need it.

I haven’t seen this discussed anywhere yet, but I have seen some people in favor of writing all your meteor code as packages, and then from one codebase I can deploy multiple apps. But condpsidering my case above, is 3 apps the right move, or am I missing something in Meteor that I should have seen? At least writing my code in packages means that I keep shared scheme and can reuse some libraries across the apps, which is important for sure.

Thanks for any guidance.

I’ve done both the big monolith on one project and then another project with several smaller apps based on common packages. The smaller apps based on a set of shared code in packages is the way to go in my opinion, for exactly the reasons you’ve stated. And if, for instance, you want to bust out a mobile app at some stage, half the code base is already written.

This was the best advice I got about how to set up a repo for the whole project with shared packages.


@babrahams @timothyjoh I think you’d find these two posts interesting to read as well

1 Like

Thanks for the reminder about the Differential post. I’d read it back in the day, thought “that’s cool” then forgotten about it. Very handy.

I saw the meteorpatterns post a couple of days ago and found the idea of umbrella packages really good.

1 Like

Thanks for the resources.
The second blog post seems to have moved here: