Giter Site home page Giter Site logo

w3f-grants-archive / dapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imbuenetwork/dapp

0.0 0.0 0.0 40.04 MB

License: GNU General Public License v3.0

Dockerfile 0.06% JavaScript 2.70% HTML 69.89% CSS 17.64% TypeScript 9.59% Makefile 0.06% Shell 0.05%

dapp's Introduction

imbue-web3-open-grant Imbue Network is a decentralised crowdfunding DAO built on top of the Polkadot blockchain platform. It is an idea incubator open to the entire world that allows anyone, from any walk of life and for any kind of endeavour, to submit and vote on Ideas worth funding from the communities that believe in them the most.

Imbue Network Dapp

Requirements

To go through this guide you will need:

  1. An account on the target testnet with funds. Our public testnet can be found here
  2. Polkadot-js wallet extention, you can install one from here
  3. If launching locally, you need to have the env GOOGLE_OAUTH2_CLIENT_ID and GOOGLE_OAUTH2_CLIENT_SECRET variables set. You can set an empty value to them if you dont plan to sign in using OAuth

Local deployment quickstart with docker-compose

From the top-level of the repo, all that's required is to run

docker-compose up -d

to build the associated images and start all services.

Once all the services are build you need to set up the databases using the command docker exec api make db_up;

If you face any issues after the databases are created then restart the services using docker-compose down;docker-compose up -d

Please note if you are using a Apple silicon e.g. M1 then you need to replace the Docker files

Steps to create a new Imbue Network Project

For the purpose of this tutorial we will be using a local environment but you can just as easily follow it by going to the public staging url https://dev.imbue.network/dapp

We also advise to use two completely different browsers (e.g. Chrome and Firefox) because you will be effectively using two different personas

(Initiator) Create the proposal

  1. Navigate to http://localhost:8081/dapp/proposals/draft
  2. The site will ask you to connect to your wallet, chose the required account who will act as the initiator for this project. Sign-in
  3. Enter all of the required information for the project and the required funds. Add at least one milestone. The "percent to unlock" for all of the milestones should add up to 100%. new-project
  4. Click "Save Draft Proposal Proposal" to start the process of submitting the transaction to the chain.
  5. Review the project and if acceptable click on Finalise! finalise
  6. Once you see the Proposal Created message, congratulations your proposal is now onchain! proposal-created

(ADMIN/COUNCIL) Schedule round

  1. The UI for a super user has not been built yet, but you can use polkadotJS to open the funding round, its fairly simple and can be followed here

(Contributor) Contribute

  1. To contribute you need to ensure you are using a different browser or incognito because initators of projects cannot contribute to their own projects
  2. Navigate to http://localhost:8081/dapp/proposals/
  3. You should the project see a list of projects that have been created via the UI project-list
  4. Click the project you want to fund and you will be navigated to the details page. Notice that contribution section will now be available contribute Enter the amount you want to contribute and click the Contribute button contribution-success

(ADMIN/COUNCIL) Approve Project

  1. The UI for a super user has not been built yet, but you can use polkadotJS to approve a project here

Please note the role of the council here to define what success looks like, answer questions around whether of not a fund raise can be considered successful if it only hit 70% or 80% of its target. The role of the council will be reduced once these thresholds are set

(Initiator) Submit Milestone

  1. Once a project has been approved, switch back to the initator - go to the details page and you will see that it has changed to reflect milestone submission submit-milestone

  2. Once the submission gets saved onchain, you should see confirmation of it and submit your first milestone. submit-milestone-success

(Contributor) Vote On Milestone

  1. Switch back to the contributor and you will see that you can now vote on the milestone vote-milestone

  2. Choose your vote and the milestone you want to vote on, and click vote. Once the vote gets saved on chain you should see the confirmation vote-success

(ADMIN/COUNCIL) Approve Milestone

  1. The UI for a super user has not been built yet, but you can use polkadotJS to approve a milestone here

Please note just like the funding decision, the council comes in here to define what a successful vote looks like. This is a form of protection while we work with the community build the foundations of what success looks like. Once thresholds are set we can reduce the role of the council

(Initiator) Withdraw Funds

  1. Switch back to the initator and now you can successfully withdraw the funds

Services

  • The "web" service is an nginx container that proxy_passes most requests to the webflow server, except for location /dist
  • The "api" service is a nodejs/express app configured to use dynamodb local storage.
  • The "dynamodb-local" service is a temporary sqlite-based dynamodb interface to stand in for an eventual AWS hosted version of the same.
  • The "imbue" service is a rococo-local test network (currently disabled in the docker-compose config)

The repo is split into api and web directories. In each of those, you will find a Dockerfile. To run the api without docker, use its Dockerfile as a guide.

To develop the website locally, using yarn run

yarn install

to install dependencies, and

yarn start

which starts webpack in "watch" mode. This is connected to the running nginx server via the docker-compose volumes directive, which is tied to the ./web/dist directory (where webpack outputs its bundle).

dapp's People

Contributors

dev-eth avatar mshankarrao avatar samelamin avatar takahser avatar tjb1982 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.