Skip to content

marioblas/meteor-blaze-boilerplate

Repository files navigation

Meteor blaze boilerplate

MIT License Dependency Status devDependency Status

A starting point for Meteor applications with a basic folder structure and some files.

Table of contents

Quick start

$ npm install
$ meteor

Commands

  • npm start - start your meteor server with settings-development.json
  • npm run lint -s - lint all javascript files
  • npm run lint:fix -s - lint all javascript files and autofix problems

Important: don't use npm start at this moment because of performance issues, read this discussion.

Note that -s option is a shortcut for --loglevel=silent that makes the log output a little tidier and hides npm errors if the script exits with an error status (non-zero exit code).

Packages & libs

insecure and autopublish packages are removed.

standard-minifiers core package is removed in favor of seba:minifiers-autoprefixer, read this discussion about minifiers.

Development

Routing

Rendering and Layout Management

Collections

User accounts

UI & UX

Velocity testing tools

Debugging & Performance monitoring

Folder structure

.
├── client/                     # Client folder
│   ├── compatibility/          # Legacy libraries that expect to be global
│   ├── lib/                    # Code for the client to be loaded first
│   │   ├── helpers/
│   │   └── vendors/
│   ├── startup/                # Meteor.statup functions that will run as soon as the DOM is ready
│   ├── stylesheets/            # Sass files
│   └── templates/              # Contains all templates
│       ├── authenticated/      # Templates for logged-in users
│       ├── globals/            # Templates used globally like footer, header, loading template, 404...
│       ├── layouts/            # App layouts
│       └── public/             # Public templates  
│
├── lib/                        # Common code for client and server
│   ├── collections/            # Common collections
│   ├── helpers/                # Common helpers
│   └── routes/                 # Routes
│
├── packages/                   # npm modules defined in packages.json will be automatically added here
│   └── npm-container/
│
├── private/                    # Private files that you don't want to be accessible from the outside
│
├── public/                     # Public files like images, fonts, favicons...
│   ├── favicons/
│   ├── fonts/
│   └── images/
│
├── server/                     # Server folder
│   ├── fixtures/               # Fixture data
│   ├── lib/                    # Code for the server to be loaded first
│   │   └── helpers/
│   ├── methods/                # Meteor.methods definitions
│   ├── publications/           # Meteor.publish definitions
│   └── startup/                # Meteor.startup functions that will run when on server startup
│
├── tests/                      # Local test code
│   └── jasmine/
│       ├── client/
│       └── server/
│
├── package.json                # Defines project contents and useful scripts
├── packages.json               # npm modules used by meteorhacks:npm package
├── postcss.json                # Autoprefixer config
└── settings-development.json   # Configuration data to be passed to meteor --settings

Settings

Don't push keys in your code, push them in settings file.

  • settings-development.json should only contain values used for testing.
  • settings-production.json should only contain values used in production.

For security purposes settings-production.json is ignored to prevent from being stored into version control.

An example of production file with Kadira keys:

{
  "kadira": {
    "appId": "<appId>",
    "appSecret": "<appSecret>"
  }
}

Read this article for more info about Meteor settings.

Recommended coding style

Language Style guide Linter
Sass Sass guidelines SCSS-Lint
JavaScript Airbnb ESLint

License

MIT © marioblas

About

🚀 A starting point for Meteor apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published