Blame view
README.md
4.69 KB
9f35d9281
|
1 |
# The Meteor Chef - Base (@0.9.3) |
aa8376fb4
|
2 |
A starting point for Meteor apps. |
e4dcfed40
|
3 |
### **This project is currently under heavy development and not recommended for use.** |
8435208bb
|
4 |
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
|
5 6 |
### Packages Included |
d30971538
|
7 8 9 |
- Accounts (Base) - `meteor add accounts-base` - Accounts (Password) - `meteor add accounts-password` - Audit Argument Checks - `meteor add audit-argument-checks` |
07610a42f
|
10 |
- Bootstrap 3 - `meteor add pinglamb:bootstrap3` |
d30971538
|
11 12 |
- Check - `meteor add check` - CoffeeScript - `meteor add coffeescript` |
07610a42f
|
13 14 |
- Handlebars Server - `meteor add cmather:handlebars-server` - Iron Router - `meteor add iron:router` |
d30971538
|
15 |
- jQuery - `meteor add jquery` |
07610a42f
|
16 |
- Sass - `meteor add particle4dev:sass` |
d30971538
|
17 |
- Underscore - `meteor add underscore` |
aa8376fb4
|
18 |
|
d1f4dbea8
|
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
|
24 |
---/.meteor |
d1f4dbea8
|
25 26 |
---/client ------/controllers |
39a8af161
|
27 28 |
---------/authenticated ------------header.coffee |
d1f4dbea8
|
29 30 31 32 33 34 35 |
---------/public ------------login.coffee ------------signup.coffee ------------recover-password.coffee ------------reset-password.coffee ------/helpers ---------helpers-ui.coffee |
39a8af161
|
36 37 |
------/includes ---------_header.html |
d1f4dbea8
|
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
|
46 47 48 49 50 51 52 53 54 55 |
---------/sass ------------/globals ---------------_extends.scss ------------/modules ------------/vendor ------------/views ---------------/authenticated ---------------/public ------------------_login.scss ---------application.scss |
cabe1c46e
|
56 |
-------/views |
39d39619c
|
57 58 |
---------/authenticated ------------index.html |
cabe1c46e
|
59 60 |
---------/public ------------login.html |
07610a42f
|
61 |
------------not-found.html |
cabe1c46e
|
62 63 64 |
------------recover-password.html ------------reset-password.html ------------signup.html |
d1f4dbea8
|
65 66 67 68 |
---/collections ------example.coffee ---/lib ---/packages |
39d39619c
|
69 |
------ (See List Above) |
d1f4dbea8
|
70 71 72 |
---/public ---/server ------/admin |
7439c59f5
|
73 |
---------accounts.coffee |
d1f4dbea8
|
74 |
---------startup.coffee |
d1f4dbea8
|
75 76 77 78 |
------/data ---------/insert ---------/update ---------/remove |
07610a42f
|
79 80 81 |
------/email ---------/send ---------/templates |
033f96299
|
82 |
------------reset-password.coffee |
07610a42f
|
83 |
------/publications |
d1f4dbea8
|
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
|
88 |
### Functionality |
3f0a97317
|
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
|
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
|
92 |
|
39d39619c
|
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
|
103 |
|
033f96299
|
104 |
###### Authentication |
510619f55
|
105 |
A complete authentication pattern complete with: |
39d39619c
|
106 |
|
510619f55
|
107 108 |
- Signup (at /signup) - Login (at /login) |
1350fabde
|
109 |
- Logout (no path, implemented as a dropdown item/click event in /client/controllers/header.coffee) |
510619f55
|
110 |
- Password Recovery (at /recover-password and /reset-password) |
39d39619c
|
111 |
|
033f96299
|
112 113 |
###### Validation (Not Added Yet) Validation via [jQuery Validation](http://jqueryvalidation.org). This applies to all of the public templates: login, signup, recover password, and reset password. |
39d39619c
|
114 |
###### Automatic Admin User Creation |
f60c4c89b
|
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**. |