A starting point for decentralized MeteorJS applications. Includes Ethereum.js, iron-router, Bootstrap 3, Font Awesome, LESS and more.
**Based off of Differential's meteor-boilerplate and Ethereum's meteor-dapp-wallet. Please note that this boilerplate is still in Alpha.
- Included Packages
- Installation
- Deployment
- File Structure
- Bootstrap and Less
- Favicons and Touch Icons
- Clone this repo to
<yourapp>
git clone https://github.com/SilentCicero/meteor-dapp-boilerplate.git <yourapp>
- Remove
.git
cd <yourapp>/app && rm -rf .git
- Start coding!
Start an eth node open the http://localhost:3000 in mist, mix or alethzero or run a CPP node as follows:
$ eth -j -b // for a mining node: $ eth -j -b -f -n no -m yes
Start your app using meteor
$ cd <yourapp>/app
$ meteor
Go to http://localhost:3000
This file structure is largley based off of Differentials boilerplate, but with client-only directories. Client-only files are stored in the client
directory. The public
directory is for publicly accessible assets such as images and fonts. The i18n
directory is for language files.
The majority of Bootstrap can be customized with LESS variables. If you look in client/stylesheets/base/lib/bootstrap/variables.import.less
you will see a slew of configuration variables that can be tweaked to drastically change the look and feel of your site without having to write a single line of CSS.
However we should avoid modifying the core Bootstrap Less files (in case we want to update them later), and should instead override the variables in our own LESS files.
For example, to change the color of all primary buttons and links, simply add a @brand-primary
variable to stylesheets/base/variables.import.less
:
// variables.import.less
@brand-primary: #DC681D;
If you'd like to override a feature of Bootstrap that can't be modified using variables, simply create a new file in the client/stylesheets/components
directory named after the corresponding Bootstrap component (eg. buttons
in this case), and make your changes there.
// buttons.import.less
.btn {
text-transform: uppercase;
}
After your file is ready, you need to import it into client/stylesheets/base/global.less
. So, you would add in this statement:
@import '@{components}/buttons.import.less';
The reason that this is done is to avoid any issues when the LESS files are compiled into CSS. That way, if one component relies on another or you want a certain order for your components, you can avoid any issues.
Upload your image to http://realfavicongenerator.net/ and place the resulting images in public/images/favicons