Treacto is a truffle box which can be used to create dapps.
Treacto uses ethereum to store the important piece of information on it. The other information that are not important to us can be stored in mongodb database.Its like offchain data-storage house as we have to pay more gas price to store large piece of information on ethereum chain.
Technology used: Truffle, Reactjs, Redux, Nodejs, Passportjs(token based auth), mongodb, expressjs, ganache.
- Install Truffle and Ganache CLI globally. If you prefer, the graphical version of Ganache works as well!
npm install -g truffle
npm install -g ganache-cli
-
You can use the command
truffle unbox devaman/treacto
to create dapp. -
Run ganache on localhost:8545 (Default)
ganache-cli
- Install all the node modules required by running:
- in client folder
npm install
- in server folder
npm install
- in root folder
npm install
- Create a database.js file in server/config/database.js having following content.
module.exports={
'secret':'mysecret',
'database':'mongodb://linktomongodb'
};
- Compile and migrate the smart contracts.
truffle compile
truffle migrate --network ganache
6.Start the dapp.
npm start
It will start both client and server.