Blame view

README.md 4.65 KB
9f35d9281   Ryan Glover   Update docs to re...
1
  # The Meteor Chef - Base (@0.9.3)
aa8376fb4   Ryan Glover   Add basic README ...
2
  A starting point for Meteor apps.
8435208bb   Ryan Glover   Add nod to recipe...
3
  Base is the lazy person's starter kit for Meteor. It includes some commonly used packages (biased to The Meteor Chef) and code for common functionality. This is the starter kit for all Meteor Chef recipes.
aa8376fb4   Ryan Glover   Add basic README ...
4
5
  
  ### Packages Included
d30971538   Ryan Glover   Update formatting...
6
7
8
  - Accounts (Base) - `meteor add accounts-base`
  - Accounts (Password) - `meteor add accounts-password`
  - Audit Argument Checks - `meteor add audit-argument-checks`
07610a42f   Ryan Glover   Update README to ...
9
  - Bootstrap 3 - `meteor add pinglamb:bootstrap3`
d30971538   Ryan Glover   Update formatting...
10
11
  - Check - `meteor add check`
  - CoffeeScript - `meteor add coffeescript`
07610a42f   Ryan Glover   Update README to ...
12
13
  - Handlebars Server - `meteor add cmather:handlebars-server`
  - Iron Router - `meteor add iron:router`
d30971538   Ryan Glover   Update formatting...
14
  - jQuery - `meteor add jquery`
10b1a6f3d   Ryan Glover   Update documentat...
15
  - jQuery Validation - `meteor add themeteorchef:jquery-validation`
07610a42f   Ryan Glover   Update README to ...
16
  - Sass - `meteor add particle4dev:sass`
d30971538   Ryan Glover   Update formatting...
17
  - Underscore - `meteor add underscore`
aa8376fb4   Ryan Glover   Add basic README ...
18

d1f4dbea8   Ryan Glover   Additional README...
19
20
21
22
23
  ### File Structure
  Base comes with a pre-defined file structure common to all projects along with some skeleton files for getting started quickly. Here's what it looks like:
  
  ```
  /root
07610a42f   Ryan Glover   Update README to ...
24
  ---/.meteor
d1f4dbea8   Ryan Glover   Additional README...
25
26
  ---/client
  ------/controllers
39a8af161   Ryan Glover   Add bootstrap hea...
27
28
  ---------/authenticated
  ------------header.coffee
d1f4dbea8   Ryan Glover   Additional README...
29
30
31
32
33
34
35
  ---------/public
  ------------login.coffee
  ------------signup.coffee
  ------------recover-password.coffee
  ------------reset-password.coffee
  ------/helpers
  ---------helpers-ui.coffee
39a8af161   Ryan Glover   Add bootstrap hea...
36
37
  ------/includes
  ---------_header.html
d1f4dbea8   Ryan Glover   Additional README...
38
39
40
41
42
43
44
45
  ------/layouts
  ---------layout-default.html
  ------/routes
  ---------filters.coffee
  ---------routes-global.coffee
  ---------routes-authenticated.coffee
  ---------routes-public.coffee
  ------/stylesheets
07610a42f   Ryan Glover   Update README to ...
46
47
48
49
50
51
52
53
54
55
  ---------/sass
  ------------/globals
  ---------------_extends.scss
  ------------/modules
  ------------/vendor
  ------------/views
  ---------------/authenticated
  ---------------/public
  ------------------_login.scss
  ---------application.scss
cabe1c46e   Ryan Glover   Add a simple sign...
56
  -------/views
39d39619c   Ryan Glover   Add automatic acc...
57
58
  ---------/authenticated
  ------------index.html
cabe1c46e   Ryan Glover   Add a simple sign...
59
60
  ---------/public
  ------------login.html
07610a42f   Ryan Glover   Update README to ...
61
  ------------not-found.html
cabe1c46e   Ryan Glover   Add a simple sign...
62
63
64
  ------------recover-password.html
  ------------reset-password.html
  ------------signup.html
d1f4dbea8   Ryan Glover   Additional README...
65
66
67
68
  ---/collections
  ------example.coffee
  ---/lib
  ---/packages
39d39619c   Ryan Glover   Add automatic acc...
69
  ------ (See List Above)
d1f4dbea8   Ryan Glover   Additional README...
70
71
72
  ---/public
  ---/server
  ------/admin
7439c59f5   Ryan Glover   Add in a server-o...
73
  ---------accounts.coffee
d1f4dbea8   Ryan Glover   Additional README...
74
  ---------startup.coffee
d1f4dbea8   Ryan Glover   Additional README...
75
76
77
78
  ------/data
  ---------/insert
  ---------/update
  ---------/remove
07610a42f   Ryan Glover   Update README to ...
79
80
81
  ------/email
  ---------/send
  ---------/templates
033f96299   Ryan Glover   Update README wit...
82
  ------------reset-password.coffee
07610a42f   Ryan Glover   Update README to ...
83
  ------/publications
d1f4dbea8   Ryan Glover   Additional README...
84
85
86
87
  ```
  
  ### Language & Formatting
  There are two considerations when using Base: JavaScript is written in [CoffeeScript](http://coffeescript.org) and CSS is written using [Sass](http://sass-lang.com). I prefer this setup because it allows me to move a little quicker than I do when writing in the native languages. This may not be for everybody, but I recommend giving both a shot because they make it much easier to write code.
aa8376fb4   Ryan Glover   Add basic README ...
88
  ### Functionality
3f0a97317   Ryan Glover   Update README wit...
89
90
  ###### Bootstrap (@3.2.0)
  Base makes use of the [Bootstrap](http://getbootstrap.com) Front-End Framework. It may not be your bag of chips and is *definitely not required*. If you want to swap it out, you'll need to unhook the markup in each of the included template files in `/client/views` and uninstall the Bootstrap3 package by running `meteor remove pinglamb:bootstrap3` in your terminal.
f89ea24e3   Ryan Glover   Fix typo in refer...
91
  In respect to UI, Base uses Bootstrap's `.navbar` element, as well as its `.container` and a few `.row`/`.col-<size>-<columns>` wrappers. You'll also find the `.btn` class and its modifiers (`.success, .warning, etc.`) in use throughout the app. All of these applications are merely presentational and can be changed (or removed) as you see fit.
c7fad243d   Ryan Glover   Add note in READM...
92

39d39619c   Ryan Glover   Add automatic acc...
93
94
95
96
97
98
99
100
101
102
  ###### Basic Routing
  A collection of pre-defined routes and templates for common functionality (see Authenticate below). Also includes a set of common route filters for managing user access. Routes bundled include:
  
  ```
  - / (Authenticated)
  - /login (Public)
  - /signup (Public)
  - /recover-password (Public)
  - /reset-password (Public)
  ```
aa8376fb4   Ryan Glover   Add basic README ...
103

033f96299   Ryan Glover   Update README wit...
104
  ###### Authentication
510619f55   Ryan Glover   Clean up document...
105
  A complete authentication pattern complete with:
39d39619c   Ryan Glover   Add automatic acc...
106

510619f55   Ryan Glover   Clean up document...
107
108
  - Signup (at /signup)
  - Login (at /login)
1350fabde   Ryan Glover   Add note to READM...
109
  - Logout (no path, implemented as a dropdown item/click event in /client/controllers/header.coffee)
510619f55   Ryan Glover   Clean up document...
110
  - Password Recovery (at /recover-password and /reset-password)
39d39619c   Ryan Glover   Add automatic acc...
111

10b1a6f3d   Ryan Glover   Update documentat...
112
  ###### Validation
033f96299   Ryan Glover   Update README wit...
113
  Validation via [jQuery Validation](http://jqueryvalidation.org). This applies to all of the public templates: login, signup, recover password, and reset password.
39d39619c   Ryan Glover   Add automatic acc...
114
  ###### Automatic Admin User Creation
f60c4c89b   Ryan Glover   Add emphasis to d...
115
  When developing, having a handful of user accounts to test your application with can come in handy. Base comes with an automated account generation script located in `server/admin/startup.coffee` that creates accounts based on an array of specified users. **Note: by default this creates one Admin user on server startup, so make sure to customize or remove this user so the public can't access your app**.