The four basic types of directories that must be defined inside any Meteor App are /client,/server, /public and /lib. These directories are special and when it comes to coding, Meteor has few rules:
- Code inside /server directory only runs on the server.
- Code inside /client directory only runs on the client.
- Everything else runs on both client and server.
- Static assets (like fonts, images etc.) goes into /public directory.
Meteor also maintains a special order to load its files:
- Files in /lib folder are loaded before anything else.
- Any main.* is loaded after everything else.
- Everything else loads in alphabetical order based on file name.
Meteor App also includes a hidden folder called .meteor. This is where the Meteor stores its own code. /meteor/packages and .meteor/release files are respectively used to list your smart packages and Meteor version to use. When you add your custom packages or change Meteor releases, it is helpful to check changes to these files.