Skip to content

Commit 91435cb

Browse files
committed
Initial commit.
Meteor Boilerplate source.
1 parent 1f2921c commit 91435cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2875
-43
lines changed

.gitignore

+1-43
Original file line numberDiff line numberDiff line change
@@ -1,43 +1 @@
1-
# Windows image file caches
2-
Thumbs.db
3-
ehthumbs.db
4-
5-
# Folder config file
6-
Desktop.ini
7-
8-
# Recycle Bin used on file shares
9-
$RECYCLE.BIN/
10-
11-
# Windows Installer files
12-
*.cab
13-
*.msi
14-
*.msm
15-
*.msp
16-
17-
# Windows shortcuts
18-
*.lnk
19-
20-
# =========================
21-
# Operating System Files
22-
# =========================
23-
24-
# OSX
25-
# =========================
26-
27-
.DS_Store
28-
.AppleDouble
29-
.LSOverride
30-
31-
# Thumbnails
32-
._*
33-
34-
# Files that might appear on external disk
35-
.Spotlight-V100
36-
.Trashes
37-
38-
# Directories potentially created on remote AFP share
39-
.AppleDB
40-
.AppleDesktop
41-
Network Trash Folder
42-
Temporary Items
43-
.apdisk
1+
.idea/*

.meteor/.finished-upgraders

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file contains information which helps Meteor properly upgrade your
2+
# app when you run 'meteor update'. You should check it into version control
3+
# with your project.
4+
5+
notices-for-0.9.0
6+
notices-for-0.9.1
7+
0.9.4-platform-file
8+
notices-for-facebook-graph-api-2

.meteor/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
local

.meteor/.id

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file contains a token that is unique to your project.
2+
# Check it into your repository along with the rest of this directory.
3+
# It can be used for purposes such as:
4+
# - ensuring you don't accidentally deploy one app on top of another
5+
# - providing package authors with aggregated statistics
6+
7+
zivmvxxevpdg1xu8kc5

.meteor/cordova-plugins

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

.meteor/packages

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Meteor packages used by this project, one per line.
2+
#
3+
# 'meteor add' and 'meteor remove' will edit this file for you,
4+
# but you can also edit it by hand.
5+
6+
meteor-platform
7+
less
8+
jquery
9+
underscore
10+
accounts-password
11+
aldeed:collection2
12+
iron:router
13+
raix:handlebar-helpers
14+
matteodem:easy-security
15+
audit-argument-checks
16+
fastclick
17+
zimme:iron-router-active
18+
manuelschoebel:ms-seo
19+
browser-policy
20+
useraccounts:semantic-ui
21+
natestrauser:animate-css
22+
dburles:collection-helpers
23+
meteorhacks:fast-render
24+
25+
semantic:ui-css

.meteor/platforms

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
server
2+
browser

.meteor/release

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

.meteor/versions

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
2+
3+
4+
5+
6+
7+
8+
9+
10+
11+
12+
13+
14+
15+
16+
17+
18+
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+
30+
31+
32+
33+
34+
35+
36+
37+
38+
39+
40+
41+
42+
43+
44+
45+
46+
manuelschoebel:[email protected]
47+
48+
49+
50+
meteorhacks:[email protected]
51+
meteorhacks:[email protected]
52+
meteorhacks:[email protected]
53+
54+
55+
56+
57+
natestrauser:[email protected]
58+
59+
60+
61+
62+
63+
64+
65+
66+
67+
68+
69+
70+
71+
72+
softwarerero:[email protected]
73+
74+
75+
76+
77+
78+
79+
80+
underscorestring:[email protected]_1
81+
82+
useraccounts:[email protected]
83+
useraccounts:[email protected]
84+
85+
86+

LICENSE.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Matteo De Micheli
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# meteor-boilerplate
2+
3+
This boilerplate is here to give you a starting point for your meteor projects, with a console tool to ease up some tasks. Essential atmosphere packages are included to give you features like routing and collection schemas out-of-the-box.
4+
5+
<!-- toc -->
6+
7+
* [Installing with orion-cli](#installing-with-orion-cli)
8+
* [How to use](#how-to-use)
9+
* [Generating files](#generating-files)
10+
* [Removing default code](#removing-default-code)
11+
* [Available profiles (cofeescript and es6)](#available-profiles-cofeescript-and-es6)
12+
* [Deployments](#deployments)
13+
* [SEO and other concerns](#seo-and-other-concerns)
14+
* [Adding allow rules for external URLs](#adding-allow-rules-for-external-urls)
15+
* [Structure](#structure)
16+
* [Packages used](#packages-used)
17+
* [Folder structure](#folder-structure)
18+
* [Other Awesome Boilerplates](#other-awesome-boilerplates)
19+
* [License](#license)
20+
21+
<!-- toc stop -->
22+
23+
The boilerplate looks like following: [boilerplate.meteor.com](http://boilerplate.meteor.com). Have a look at [starthacking](http://starthacking.meteor.com/) for a project created with this boilerplate.
24+
25+
## Installing with orion-cli
26+
27+
```bash
28+
npm install -g orion-cli
29+
```
30+
31+
This will install the [orion-cli](https://github.com/matteodem/orion-cli) tool, which can be used for scaffolding files with different profiles.
32+
You can still clone the repository, which doesn't give you the profile and scaffolding support.
33+
34+
## How to use
35+
36+
```sh
37+
# Assuming meteor is already installed
38+
orion create appName
39+
cd appName && meteor
40+
```
41+
42+
### Generating files
43+
44+
With orion-cli you can scaffold files based on your configuration that you've got.
45+
46+
```sh
47+
orion generate routes
48+
```
49+
50+
You can create models, views, change profiles and reset the project with the console tool (see below).
51+
52+
53+
### Removing default code
54+
55+
There's already a lot of predefined code in this boilerplate, to show you the possible functionality. However, if you want to start off with an
56+
empty project use the provided command to get rid off all the code you don't need.
57+
58+
```sh
59+
orion reset
60+
```
61+
62+
### Available profiles (coffeescript and es6)
63+
64+
* default (Plain Vanilla Javascript)
65+
* coffee (coffeescript, Unfancy JavaScript)
66+
* es6 (traceur, Traceur is a JavaScript.next-to-JavaScript-of-today compiler)
67+
68+
You can change your profile like that
69+
```sh
70+
orion set-profile
71+
```
72+
73+
There will be a prompt, where you can enter __coffee__ or any other profile that you have specified. Also use the ```reset``` command to start off with blank files according to your profile.
74+
75+
### Deployments
76+
77+
It is highly recommended to use [Meteor Up](https://github.com/arunoda/meteor-up) for easy deployments.
78+
Have a look at the repository for more information.
79+
80+
### SEO and other concerns
81+
82+
> Meteor cannot do SEO
83+
84+
This statement is only partially true, since there is a package called [ms-seo](https://github.com/DerMambo/ms-seo), which
85+
has a lot of neat little tricks to help web crawlers notice your app the way you want them to. This boilerplate also adds constants under
86+
__client/lib/constants.js__ for the app. Change SEO settings inside the routes like that.
87+
88+
```javascript
89+
Router.route('/about', function () {
90+
this.render('about');
91+
// Using the app constants
92+
SEO.set({ title: 'About -' + Meteor.App.NAME, og: {...} });
93+
});
94+
```
95+
96+
### Adding allow rules for external URLs
97+
98+
The [browser-policy](https://atmospherejs.com/meteor/browser-policy) adds rules to deny all operations from external URLs.
99+
This helps dealing with clickjacking and other XSS methods used to attack the client. To whitelist a url, add following to
100+
__server/config/security.js__
101+
102+
```javascript
103+
BrowserPolicy.content.allowOriginForAll(YOUR_URL);
104+
```
105+
106+
Other security enforcing packages like [audit-argument-checks](https://docs.meteor.com/#/full/auditargumentchecks) and
107+
[matteodem:easy-security](https://github.com/matteodem/meteor-easy-security) have also been added.
108+
109+
## Structure
110+
111+
### Packages used
112+
113+
* Meteor Core
114+
* meteor-platform
115+
* Routing
116+
* [iron:router](https://github.com/EventedMind/iron-router)
117+
* [zimme:iron-router-active](https://github.com/zimme/meteor-iron-router-active)
118+
* Collections
119+
* [aldeed:collection2](https://github.com/aldeed/meteor-collection2)
120+
* [dburles:collection-helpers](https://github.com/dburles/meteor-collection-helpers)
121+
* Accounts
122+
* [accounts-password](https://github.com/meteor/meteor/tree/devel/packages/accounts-password)
123+
* [useraccounts:semantic-ui](https://github.com/meteor-useraccounts/semantic-ui)
124+
* UI and UX
125+
* [fastclick](https://github.com/meteor/meteor/tree/devel/packages/fastclick)
126+
* [meteorhacks:fast-render](https://github.com/meteorhacks/fast-render)
127+
* [natestrauser:animate-css](https://github.com/nate-strauser/meteor-animate-css/)
128+
* [semantic:ui](https://github.com/Semantic-Org/Semantic-UI-Meteor/)
129+
* Security
130+
* [browser-policy](https://github.com/meteor/meteor/tree/devel/packages/browser-policy)
131+
* [audit-argument-checks](https://github.com/meteor/meteor/tree/devel/packages/audit-argument-checks)
132+
* [matteodem:easy-security](https://github.com/matteodem/meteor-easy-security)
133+
* SEO
134+
* [manuelschoebel:ms-seo](https://github.com/DerMambo/ms-seo)
135+
* Development
136+
* [less](https://github.com/meteor/meteor/tree/devel/packages/less)
137+
* [jquery](https://github.com/meteor/meteor/tree/devel/packages/jquery)
138+
* [underscore](https://github.com/meteor/meteor/tree/devel/packages/underscore)
139+
* [raix:handlebar-helpers](https://github.com/raix/Meteor-handlebar-helpers)
140+
141+
The "insecure" and "autopublish" packages are removed by default (they make your app vulnerable).
142+
143+
### Folder structure
144+
145+
```
146+
client/ # Client folder
147+
compatibility/ # Libraries which create a global variable
148+
config/ # Configuration files (on the client)
149+
lib/ # Library files that get executed first
150+
startup/ # Javascript files on Meteor.startup()
151+
stylesheets # LESS files
152+
modules/ # Meant for components, such as form and more(*)
153+
views/ # Contains all views(*)
154+
common/ # General purpose html templates
155+
model/ # Model files, for each Meteor.Collection(*)
156+
private/ # Private files
157+
public/ # Public files
158+
routes/ # All routes(*)
159+
server/ # Server folder
160+
fixtures/ # Meteor.Collection fixtures defined
161+
lib/ # Server side library folder
162+
publications/ # Collection publications(*)
163+
startup/ # On server startup
164+
meteor-boilerplate # Command line tool
165+
```
166+
167+
(*) = the command line tool creates files in these folders
168+
169+
## Other Awesome Boilerplates
170+
171+
- [Void](https://github.com/SachaG/Void) by Sacha Greif
172+
- [meteor-jw-opinionated-skeleton](https://github.com/jamesdwilson/meteor-jw-opinionated-skeleton) by jamesdwilson (CoffeeScript)
173+
- [meteor-boilerplate](https://github.com/BeDifferential/meteor-boilerplate) by BeDifferential (CoffeeScript)
174+
- [em](https://github.com/EventedMind/em) by EventedMind (Boilerplate & Scaffolding)
175+
176+
## License
177+
This boilerplate has an MIT License, see the LICENSE.txt for more information.

client/compatibility/default.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/*
2+
// Libraries which need a global variable, such as jQuery etc
3+
globalVariable = function () {
4+
}
5+
*/

client/config/router.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Router.configure({
2+
layoutTemplate: 'basicLayout',
3+
notFoundTemplate: 'notFound'
4+
});

0 commit comments

Comments
 (0)