Skip to content

IbbyBenali/snet-rfai-dapp

 
 

Repository files navigation

Request for RFAI Portal

This DApp is for RFAI Portal where users are request for a AI Service. This project also includes necessary contracts and the DApp is built using Drizzle Framework with ReactJS.

Installation

  1. 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
  2. Clone the code from Github @ https://github.com/singnet/snet-rfai-dapp. Install the dependencies by running npm install Command.

    git clone https://github.com/singnet/snet-rfai-dapp
    cd snet-rfai-dapp
    npm install
  3. Run the development blockchain, we recommend passing in a blocktime. Otherwise, its difficult to track things like loading indicators because Ganache will mine instantly.

    // 3 second blocktime.
    ganache-cli -b 3
  4. Compile and migrate the smart contracts. Note inside the development console we don't preface commands with truffle.

    compile
    migrate
  5. Run the webpack server for front-end hot reloading (outside the development console). Smart contract changes must be manually recompiled and migrated. Make sure that the network & contract addresses are updated in the respective locations (build -> contracts)

    // Serves the front-end on http://localhost:3000
    npm run start
  6. Truffle can run tests written in Solidity or JavaScript against your smart contracts. Note the command varies slightly if you're in or outside of the development console.

    // If inside the development console.
    test
    
    // If outside the development console..
    truffle test
  7. Test is included for testing React components. Compile your contracts before running Jest, or you may receive some file not found errors.

    // Run Jest outside of the development console for front-end component tests.
    npm run test
  8. To build the application for production, use the build command. A production build will be in the build_webpack folder.

    npm run build

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 85.9%
  • CSS 11.2%
  • Python 1.9%
  • Other 1.0%