We have a large project (probably one of the largest Meteor project anyone has built to date as it was in full-time development for 1.5 years). We use the same set of filenames in each view. It's very consistent and helps us quickly navigate to exactly what we are looking for:
- events.js
- helpers.js
- templates.html
- routes.js
- styles.less
- etc.
Looks like this in a project:
├── consolidationRequests
│ ├── events.js
│ ├── helpers.js
│ ├── routers.js
│ └── templates.html
├── customerSpoof
│ └── routers.js
├── dashboard
│ ├── events.js
│ ├── helpers.js
│ ├── onDestroyed.js
│ ├── onRendered.js
│ ├── routers.js
│ └── templates.html
├── emailVerification
│ ├── events.js
│ ├── helpers.js
│ ├── routers.js
│ └── templates.html
├── loading
│ ├── styles.css
│ └── templates.html
├── mailbox
│ ├── autoform.js
│ ├── consolidationRequestConfirmation
│ │ ├── events.js
│ │ ├── helpers.js
│ │ ├── onCreated.js
│ │ ├── onRendered.js
│ │ └── templates.html
│ ├── events.js
│ ├── helpers.js
Related templates are just stored together in the same file. Contents of view/order/checkout/templates.html
shown collapsed here:
<template name="orderCheckout"></template>
<template name="paymentPanel"></template>
<template name="orderCheckoutSummary"></template>
<template name="paypalReturnOrderCheckout"></template>
We use subfolders when views get complex with lots of parts:
├── cart
│ ├── addItem
│ │ ├── autoform.js
│ │ ├── events.js
│ │ ├── helpers.js
│ │ ├── onRendered.js
│ │ ├── routers.js
│ │ ├── styles.less
│ │ └── templates.html
│ ├── checkout
│ │ ├── autoform.js
│ │ ├── events.js
│ │ ├── helpers.js
│ │ ├── onRendered.js
│ │ ├── routers.js
│ │ └── templates.html
│ └── view
│ ├── autoform.js
│ ├── deleteItem
│ │ ├── events.js
│ │ ├── helpers.js
│ │ └── templates.html
│ ├── editItem
│ │ ├── autoform.js
│ │ ├── events.js
│ │ ├── helpers.js
│ │ └── templates.html
│ ├── events.js
│ ├── helpers.js
│ ├── onDestroyed.js
│ ├── onRendered.js
│ ├── routers.js
│ ├── styles.less
│ └── templates.html
We also develop with WebStorm, an extremely powerful and flexible editor for Meteor development. We find it immensely helpful when searching and organizing our code and working productively.
Happy to share details on request.