October 20, 2015
There is no conventional file structure for meteor but the following is a good guide.
/client /template /_partial navbar.html footer.html layout.html layout.js /plan # This is just for example add_plan.html edit_plan.html list_plans.html plan.js ... /style /server /lib router.js collection.js /public /img
footer in the
_partial folder because these appears in almost all meteor prpjects. There’s also a
layout.js file which we use to put helper functions for
I also prefer to put css files in separate folder but it’s not necessary.
Any files in this directory are only used on the server, and are never sent to the client. We typically put propriatory code, database updating etc code in server to prevent client side attack.
This is typically for files which is accessible both from client and server. Router.js is a good example as both needs to know how to go to certain route. Collections.js holds information on database collections and possibly data verification.
Files in /public are served to the client as-is. Use this to store assets such as images.