/ instructions / 2 Template Download.md
2 Template Download.md
1 # DReddit Template clone and explore 2 Now that we have Embark installed properly, let’s grab the DReddit dApp template that we will use as the skeleton of our dApp. This template is a website built using React (don't worry if you don't know React, we are not focussing on this part). 3 4 ## Let's go 5 First, let's make sure our `pwd` is in the parent folder of where we want our dApp to be. For example, if we want our dApp to live in our home directory (`~`), make sure we're in our home directory: 6 ``` 7 cd ~ 8 ``` 9 Now, let's download the template in to a `~/dtwitter` folder: 10 ``` 11 embark new dtwitter --template status-im/dreddit-devcon 12 cd dtwitter 13 ``` 14 Embark will create new dApp called `dtwitter` and install all dependencies for us! 15 Let’s take a moment to open the template in our favorite IDE and take a tour of the file structure of a standard Embark dApp: 16 * `/app` - contains all our assets for the website. These will get webpacked according to our settings in `/embark.json`. 17 * `/config` - contains all our configuration 18 * `blockchain.js` - configures options for running geth 19 * `communication.js` - configures whisper options 20 * `contracts.js` - configures options for deploying contracts from Embark, as well as the connection to make to geth from the dApp 21 * `namesystem.js` - configures ENS support (coming in 3.2) 22 * `storage.js` - configures decentralised storage for IPFS and Swarm. Includes a section for uploading the dApp as well as a dApp connection that can be used in the dApp. 23 * `webserver.js` - configuration options for the webserver that serves the dApp during development. 24 * `/contracts` - contains our contacts 25 * `/test` - contains our mocha tests for testing our contracts 26 * `embark.json` - configures file locations, webpack options, and library versions to use