All Projects → aragon → aragon-react-boilerplate

aragon / aragon-react-boilerplate

Licence: MIT license
(Aragon 1) React boilerplate for Aragon applications

Programming Languages

javascript
184084 projects - #8 most used programming language
solidity
1140 projects
HTML
75241 projects

Projects that are alternatives of or similar to aragon-react-boilerplate

aragon-react-kit-boilerplate
React boilerplate for Aragon applications
Stars: ✭ 15 (-62.5%)
Mutual labels:  aragon, aragon-boilerplate
apm.js
JavaScript library for the Aragon Package Manager
Stars: ✭ 16 (-60%)
Mutual labels:  aragon
KeybaseRegistry
On-chain registry of Ethereum addreses <> https://keybase.io identities
Stars: ✭ 27 (-32.5%)
Mutual labels:  aragon
aragraph
Visualize your Aragon DAO Templates
Stars: ✭ 29 (-27.5%)
Mutual labels:  aragon
voting-connectors
Connector apps for Aragon Voting
Stars: ✭ 14 (-65%)
Mutual labels:  aragon
aragon-id
Aragon's simple identity solution to allow easy and secure ENS name assignments
Stars: ✭ 26 (-35%)
Mutual labels:  aragon
aragon-network-token
Smart contracts for the Aragon Network Token
Stars: ✭ 115 (+187.5%)
Mutual labels:  aragon
court-dashboard
Aragon Court dashboard
Stars: ✭ 35 (-12.5%)
Mutual labels:  aragon
conviction-voting-app
Aragon app used to collectively allocate funds from a shared treasury 💧
Stars: ✭ 86 (+115%)
Mutual labels:  aragon
aragon.js
(Aragon 1) A monorepo of JavaScript libraries for interacting with Aragon
Stars: ✭ 84 (+110%)
Mutual labels:  aragon
apiary
Aragon DAO explorer
Stars: ✭ 26 (-35%)
Mutual labels:  aragon
aragon-wiki
The Aragon wiki
Stars: ✭ 76 (+90%)
Mutual labels:  aragon

Aragon Buidler Boilerplate

🕵️ Find more boilerplates using GitHub | Official boilerplates

▶️ To use this boilerplate, run npx create-aragon-app <app-name>

Buidler + React boilerplate for Aragon applications.

Running your app

To run the app in a browser with frontend and contract hot-reloading, simply run npm start.

  1. Add code quality tools, like JS and contract linting. You may also want to check existing buidler plugins.
  2. Develop your AragonApp contract
  3. Develop your frontend
  4. Publish!

What's in this boilerplate?

npm Scripts

  • postinstall: Runs after installing dependencies.
  • build-app: Installs front end project (app/) dependencies.
  • start Runs your app inside a DAO.
  • compile: Compiles the smart contracts.
  • test: Runs tests for the contracts.
  • publish:major: Releases a major version to aragonPM.
  • publish:minor: Releases a minor version to aragonPM.
  • publish:patch: Releases a patch version to aragonPM.

Hooks

These hooks are called by the Aragon Buidler plugin during the start task's lifecycle. Use them to perform custom tasks at certain entry points of the development build process, like deploying a token before a proxy is initialized, etc.

Link them to the main buidler configuration file (buidler.config.js) in the aragon.hooks property.

All hooks receive two parameters: 1) A params object that may contain other objects that pertain to the particular hook. 2) A "bre" or BuidlerRuntimeEnvironment object that contains environment objects like web3, Truffle artifacts, etc.

// Called before a dao is deployed.
preDao: async ({ log }, { web3, artifacts }) => {},

// Called after a dao is deployed.
postDao: async ({ dao, _experimentalAppInstaller, log }, { web3, artifacts }) => {},

// Called after the app's proxy is created, but before it's initialized.
preInit: async ({ proxy, _experimentalAppInstaller, log  }, { web3, artifacts }) => {},

// Called after the app's proxy is initialized.
postInit: async ({ proxy, _experimentalAppInstaller, log  }, { web3, artifacts }) => {},

// Called when the start task needs to know the app proxy's init parameters.
// Must return an array with the proxy's init parameters.
getInitParams: async ({ log }, { web3, artifacts }) => {
  return []
}

If you want an example of how to use these hooks, please see the plugin's own tests for an example project.

Structure

This boilerplate has the following structure:

root
├── app
├ ├── src
├ └── package.json
├── contracts
├ └── CounterApp.sol
├── test
├── arapp.json
├── manifest.json
├── buidler.config.js
└── package.json
  • app: Frontend folder. Completely encapsulated: has its own package.json and dependencies.
    • src: Source files.
    • package.json: Frontend npm configuration file.
  • contracts: Smart contracts folder.
    • CounterApp.sol: AragonApp contract example.
  • test: Tests folder.
  • arapp.json: Aragon configuration file. Includes Aragon-specific metadata for your app.
  • manifest.json: Aragon configuration file. Includes web-specific configuration.
  • buidler.config.js: Buidler configuration file.
  • package.json: Main npm configuration file.

Libraries

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].