Skip to content

Latest commit

 

History

History
211 lines (142 loc) · 12.4 KB

README.md

File metadata and controls

211 lines (142 loc) · 12.4 KB

DAO Bounty Board

Project Page: https://www.notion.so/bankless/Bounty-Board-318dc164cc5640cca17e0fb5f484fd90

Specifications:

For full details on running the project locally, please see the 'getting started' section below.

Project Overview

Problem

Currently, Bankless DAO bounties are not in a centralized location causing confusion and makes it challenging for members, new and old, to contribute. Also Level 0's do not have intuitive ways to get involved and earn $BANK other than buying in the secondary markets.

Solution

For the DAO to grow, we need a way to attract, retain and coordinate talent. The bounty board, accessible to members and non-members will connect the DAO to a continually expanding talent pool.

In addition, we need a way to codify meaningful units of work. Given the diversity of jobs to be done in a DAO, the bounty board allows bounty creators to define and specify the scope of tasks along with expected deliverables.

Finally, we need a way to formalize the flow of capital, beyond an informal, organic tipping culture that exists to formally recognize contributors for their knowledge, skills and abilities.

The bounty board will be a key mechanism for coordinating talent, tasks and capital.

Minimal Viable Product 1.0

Bounty Card Definition

For the MVP, we are focusing on the bare requirements for a Bounty Card to be created by a user via DEGEN and/or Frontend UI, with the following key fields:

  • Title: Bounty Titles should be like headlines
  • Description: Provides space to flesh out the scope, deliverables and timeline for the bounty.
  • Criteria: When is a task considered "done" or "complete"?
  • Reward: Bounty creator indicates amount (i.e., 10000) and currency (i.e., $BANK) to be paid for completing the work.
  • HashId: Auto-generated ID for each bounty.
  • CreatedBy / RequestedBy: Bot automatically enters bounty creator's discordHandle.
  • ClaimedBy: Bot automatially notes discordHandle claiming the bounty.
  • SubmittedBy: Bot automatically notes discordHandle submitting the bounty.

User Experience Discord: Creating a Bounty with DEGEN

The follow description is of Serendipity in the Bankless Bot Garage, but is intended to mirror how DEGEN works in production.

  1. Create: Bounty creator creates new bounty with /bounty create, inputing title and reward. DEGEN will dm you to input a description, requirements for completion and a due date (yyyy-mm-dd). DEGEN takes your input and returns a card with three options: 👍 publish, 📝 edit or ❌ delete

  2. Create Multiple Bounties: Bounty creator creates new bounty with /bounty create, inputing title and reward. Then, hit tab to see an optional copies feature to create multiple bounties at once.

  3. Edit: Select 📝 to edit. DEGEN provides a link to the frontend to edit any field. DEGEN then re-shows a newly edited card (and automatically publishes to #🧀-bounty-board channel)

  4. Publish/Open: Bounty creator clicks thumbs up emoji 👍 or /bounty publish in Discord, bounty published to #🧀-bounty-board channel and website (url provided); status is now Open on website.

  5. Claim/In Progress: Within #🧀-bounty-board Bounty claimer click black flag 🏴 or /bounty claim, entering the BountyId to 'start', card changes color in Discord, Bounty creator receives message that bounty has been claimed; Bounty card on website now has Claimed By; card status is now "In Progress".

  6. Submit/In Review: Bounty claimer hits red mail box emoji 📮 in Discord, receives auto-generated message from DEGEN notifying the bounty is ready for review. They should reach out to the person who submitted the bounty. Alternatively, user can submit directly through a new bot command /bounty submit, entering HashId; card status is now "In Review".

  7. Complete/Completed: Bounty claimer can signal completion ✅ on the post in the #🧀-bounty-board channel or directly through a new bot command /bounty complete true; card status is now "Completed".

Degen Commands

  1. NOTE: DEGEN is available for use on any channel within the Bankless DAO discord (08/31/2021)
  2. Enter / and see a list of commands pop up.

The following commands (and input fields) are available for DEGEN:

/bounty claim (bounty-id) /bounty complete (bounty-id) /bounty create (title)(reward) /bounty publish (bounty-id) /bounty list (list-type) /bounty delete (bounty-id) /bounty submit (bounty-id) /help bounty

Refer to the Bounty Board Commands and Workflow Notion Page for in-depth details.

User Experience Frontend: Claiming a Bounty

Note: Currently, the frontend mirrors the interaction with DEGEN in discord and displays changes in card status. Frontend interactions are suited for those wishing to claim bounties.

  1. Claim: Click on any card that says Open. To claim, click the Claim it button. You will be re-directed to #🧀-bounty-board channel. Within #🧀-bounty-board Bounty click black flag 🏴 emoji. DEGEN present a link back to the frontend and a prompt to reach out to the Bounty Creator.

  2. Frontend Status: In Progress: A link back to the frontend shows card status as "In Progress" and "Claimed By" claimer's discord handle.

  3. Discord/Bot: Submit: Bounty claimer hits red mail box emoji 📮 in Discord to submit, receives auto-generated message from DEGEN indicating "bounty in review" and a link back to the frontend where status is now "In Review".

  4. Discord/Bot: Complete: Bounty claimer can signal completion ✅ on the post in the #🧀-bounty-board channel. Bounty creator receives message to tip bounty completer.

  5. Frontend Status: Completed: Back at the frontend, the bounty card status is now "Completed".

  6. Discord/Bot: Draft: Bounty creator creates new bounty with /bounty create new; status is now "Draft" and not shown in Discord. Bounty creator must publish the bounty before it is available on the frontend.

  7. Frontend Status: Open: Bounty creator clicks thumbs up emoji 👍 or /bounty create publish in Discord, bounty published to #🧀-bounty-board channel and website (url provided); status is now Open on the frontend.

  8. Discord/Bot: Claim: Now that a bounty card is Open, we can click "Claim It".

  9. Frontend Status: In Progress: Within #🧀-bounty-board Bounty click black flag 🏴 or /bounty claim to 'claim'. A link back to the frontend shows card status as "In Progress" and "Claimed By" claimer's discord handle.

  10. Discord/Bot: Submit: Bounty claimer hits red mail box emoji 📮 in Discord, receives auto-generated message from Bot indicating "bounty in review".

  11. Frontend Status: In Review: Card status on the frontend is "In Review".

  12. Discord/Bot: Complete: Bounty claimer can signal completion ✅ on the post in the #🧀-bounty-board channel. Bounty creator receives message to tip bounty completer.

  13. Frontend Status: Completed: Work is done.

Getting Started

With Docker

To run the project, copy the local .env.local file by copying the .env.qa for most variabled. Update the MONGODB_URI with the following URI

MONGODB_URI=mongodb://mongo:27017/bountyboard

To start the instance, you can run the following command

$ docker-compose up

Docker containerizes all the commands given below and helps you get started with the project without any hassle

Without Docker

In order to run a local instance of the application you will need to configure a few things.

Install Packages

You can either run the application from this top-level monorepo, or change into the packages/react-app directory. You will need the yarn package manager installed then run

$ yarn
$ yarn dev 

Which will install packages and run the application on port 3000. The package.json file in the respective repo gives a full list of commands.

Configure local .env file

The react application looks for an environment variables file named .env.local on starting. You can copy the .env.qa file for most of the variables. You will need to add the MONGODB_URI and DISCORD_BOUNTY_BOARD_WEBHOOK as covered below.

Setup MongoDB

Connection to MongoDB is handled through the Mongoose DRM. You can either connect to a hosted instance of MongoDB, or run a local development copy.

If running locally, your .env.local will contain something like:

MONGODB_URI=mongodb://localhost:27017/bountyboard

If connecting to a remote mongo server, your connection string will be in the format:

MONGODB_URI=mongodb://username:password@host:port/bountyboard

Please refer to the Mongoose docs for more information.

For help setting up MongoDB locally, see their installation instructions.

Setting Up Data in MongoDB

The app expects a MongoDB db bountyboard with the collection bounties, as specified in the json files within mongo/bounties, you can either maintain an instance of mongo manually, or use the prebuilt docker image (recommended).

Using Docker

Ensure you have docker and docker-compose installed (and running) on your desktop.

All the revelant files are in the mongo/ folder of the monorepo, to run the container:

cd mongo
docker-compose up

This should start the database on port 27017, and automatically seed with test data. The application will restart with fresh seed data everytime you run the docker compose command, so don't worry about messing it up.

The seed data handles:

  • Loading bounty data with correct object ids
  • Loading customer data with correct object ids
  • Attaching the correct text index to the bounty data

Troubleshooting

I want to make changes to the data

Just edit the seed_customers.json or bboard_[version].json file, alternatively edit the seed.sh script and change the JSON file to load from.

mongo_seed exited with code 127

Indicates the seed script cannot be found, usually a problem with windows. Ensure line breaks are set as 'LF'

data is not updating

force Rebuild the container:

docker-compose up --build

Manually (Not recommended)

Use this approach if you do not want to use docker, or are having troubles installing it. Be mindful that this approach will be more error prone, you may instead want to request test access to the DB.

If you're firing up a fresh instance of Mongo, you will need to seed the database from the command line or discord, as the board does not currently have an 'add bounty` functionality.

If you're adding from command line, you can use the mongoimport utility to import one of the JSON files in the mongo/bounties folder.

Note: As of MongoDB 4.4 mongoimport is now a part of the MongoDB Database Tools package and must be downloaded seperately. For installation see the MongoDB Database Tools

$ mongoimport\
    --db bountyboard\
    --collection bounties\
    --file path/to/mongo/bounties/file.json\
    --jsonArray # only needed if loading an array

If you've made it this far, the application should run and should be showing a bounty on the main screen. You can directly query the API backend through the app at localhost:3000/api/bounties

Setting Up the Discord Webhook

The DISCORD_BOUNTY_BOARD_WEBHOOK is not required to start the app, but can be fetched from a member of the bounty board development team. Add it to your .env.local file once you have it.