Code Monkey home page Code Monkey logo

heather's Introduction

heather

Heather is a platform for sharing resources within local communities to minimize environmental impact.

It uses Vue, Vuex, Nuxt, Bootstrap, SCSS, Solidity and the Hedera JavaScript SDK.

Navigating the repository

We use the default nuxt directory structure for the front-end. Most of the front-end implementation can be found in /pages and /components. The decentralized data storage is handled using the scripts in /utils/storage. Both the original and the compiled smart contracts can be found in /utils/contracts, which are deployed on the Hedera testnet using /utils/deployContract.js. The interactions with the Hedera Javascript SDK can be found in /utils/borrow.js which uses helper functions we defined in /utils/hederaService.js.

Setup

1. Add testnet credentials

Add your testnet credentials to .env, which is located in the root directory.

MY_ACCOUNT_ID=
MY_PRIVATE_KEY=

Also add .env to .gitignore if your planning to push to Git!

Install dependencies (once)

npm i

Build for development

npm run dev

Or build for production (target = static)

npm run generate
npm run start

And that's it!

Deploying contracts

Only needed if you want to make changes to the contracts.

The Solidity contracts are compiled to using solcjs (this is not a project dependency, you need to install it manually). After installation, go to the utils/contracts directory and run:

solcjs --bin ContractFileName.sol

Next, deploy the bytecode on Hedera from the root directory of the project. Make sure you change the Contract filename on line 21 in the script to the file you wish to deploy.

node utils/deployContract.js

heather's People

Contributors

louweal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.