When I first started learning Meteor, it was before Meteor Guide described a desired application structure. So I used @arunoda’s Mantra figuring it would be a fast way to have a properly set-up app structure for Meteor.
While @arunoda’s Kadira and Flow Router are brilliant and continue to be widely used, his Mantra project turned out to be a dead end. It was never turned over to the community and its forum has been shut down.
So it was time for me to remove Mantra from my app. I figured it could take a month of spare time hours to learn how to get an app running in the Meteor standard folder structure, because it took about that long to get my app running in Mantra.
In fact it only took a few days! I used meteor create appName --full to generate the recommended folder structure and easily moved my app files over and got them working. I was very impressed with Meteor.
There is no need for mantra. However there are diff strategies for folder structure. I honestly thought it brings even more complexity into the chaos, it felt over-engineered and unnecessary.
Example, instead of “/imports/ui” use “/imports/client”, this way if you do a change in it, it will only refresh the client, app will be faster.
Always keep your methods/publications in /api/{whatever}/server, making a change in them will only restart the server, and not your browser.
It’s important that you keep api and ui as close as you can if they work hand in hand. At least some modules of UI not everything. For example, we have a package where we have a CreditCardForm that accepts an onSubmit handler and is easily manipulateable.
Microservicification for even bigger apps:
/root/modules/payments
/root/app/imports/modules --SYMLINK-- …/…/modules
/root/admin/imports/modules–SYMLINK-- …/…/modules
To promote reusability amongst microservices.
There are so many other tricks I found in terms of organizing UI and API… If you guys want, I can make time to write a solid article about it.
Hello. I’m sorry for the delay. But I managed to finish Chapter 3. I still have some elements to add, but it’s 85% done. Thanks! There you will see more about microservice architecture.