---
title: "HumanKind: getting started with Hedera and DragonGlass"
id: "16188"
type: "post"
slug: "humankind-getting-started-with-hedera-and-dragonglass"
published_at: "2020-07-27T09:30:00+00:00"
modified_at: "2025-12-10T04:56:12+00:00"
url: "https://hedera.com/blog/humankind-getting-started-with-hedera-and-dragonglass/"
markdown_url: "https://hedera.com/blog/humankind-getting-started-with-hedera-and-dragonglass.md"
excerpt: "By leveraging the resources available from Hedera and DragonGlass, HumanKind went from having no prior experience with Hedera Hashgraph, to building a robust, award-winning decentralized marketplace in a few short weeks. Learn more about the application they started building during..."
taxonomy_category:
  - "Uncategorized"
---

[Skip to content](#content)
blog

# HumanKind: getting started with Hedera and DragonGlass

July 27, 2020

The HumanKind Team

**What is HumanKind?**

Geographically dispersed, and hunkered down in the middle of a pandemic, over 800 developers recently converged online to compete in the intense six-week virtual hackathon, Hedera20, focused on building the ultimate, decentralized app of the future.

Seeing the current disparity in the world and wanting to create something that would have a lasting social impact, our team spent the first week brainstorming over a dozen ideas, eventually consolidating and narrowing them down into a single project spanning the most promising aspects of each, called **HumanKind**:

> HumanKind is a decentralized marketplace that aggregates, sponsors, and rewards altruistic behavior and random acts of kindness, giving back to the communities, businesses, and charities you care about. Essentially, the kinder you are, the more you – and the community you are a part of – get back.

Check out our [pitch video](https://hedera20-platform.bemyapp.com/#/projects/5edf92720d38ff001b6b06f6)
.

It’s like Facebook marketplace meets Groupon but every aspect has a charitable component that gives back.

**Simply Put: It Pays to Do Good Things**

With the goal of aligning with Hedera’s mission of being “the trust layer of the internet,” and create a new “**trust layer of social good**,” we got to work. Knowing we couldn’t create every feature we’d thought of, we focused on the core:

- **Creating Your HumanKind Identity** – Becoming “kind” isn’t as easy as it sounds Every HumanKind user is required to donate a small percentage of whatever they earn on the platform to their favorite causes and charities. We get them set up with all the traditional credentials, then ask them to create unique donation rules that will define where and how much they’d like to give back. Everyone also gets a kindness “score” that goes up based on how much they do on the platform.

- **Creating Marketplace Posts** – We only focused on a single post type for the hackathon, but HumanKind users have lots of ways to earn and take action, including items for sale, help wanted, charitable posts (kind of like GoFundMe) and more. Businesses and charities can post to the platform as well, creating coupons and offers that give back.

- **Taking Action and Buying Things** – You could decide you want to mow someone’s lawn, buy a pizza from Domino’s, or donate to a family in need. And even more ways to post are waiting in the wings.

- **Getting Rewarded** – Regardless of what you decide to do, every time you do something kind on the platform, you earn money for your causes and charities and add to your kindness score. Imagine buying a Domino’s pizza, and they give 20% of the total price to your favorite charities! On the HumanKind platform it’s always a win-win.

**Getting Started**

Wanting to take advantage of the trust, transparency and speed of Hedera Hashgraph, while also being conscious of off-ledger considerations, such as file storage and distributed identity and verifiable credential validation, our team took a hybrid architectural approach to building the solution, comprised of the following components:

- **React website** – frontend
- **Node.js service** – backend including interaction with **Hedera Consensus Service**
- **Java service** – backend for Hedera distributed identity and verifiable credentials
- **Postgres database** – database for off-ledger data storage and cache
- **Amazon S3 bucket** – off-ledger file storage referenced by on-ledger Hedera Files
- **Amazon SQS**– queue used for **DragonGlass real-time subscription service**

**Hedera Consensus Service**

Hedera’s Consensus Service (HCS) is an incredibly easy-to-use, decentralized publish/subscribe API that allows application developers to add verifiable timestamping and ordering of events to their solution in a matter of minutes. We used it with the following goals in mind:

- **Fair Ordering** – marketplace posts and activity should be fairly ordered by consensus of creation date/time

- **Proof of Action** – proof should be created that users took action on marketplace posts, such as requesting to participate or marking work on a help wanted post as complete

- **Audit Logs** – an auditable history of marketplace activity should be maintained, including a summary of donations that users could later reference for tax purposes

After reading the [Getting Started with HCS and Javascript](https://www.hedera.com/blog/get-started-with-hcs-and-javascript)
 article, our hackathon team integrated these features by creating a topic and submitting messages each time data for an entity was created or updated, from our Node.js backend with just two generic methods and a few lines of code:

HCS integration

HCS integration

```
// Create a Hedera Consensus Message to submit to our Hedera Consensus Topic

const submitHederaMessage = type => {

 try {

 const data = {

 entity: this.tableName(), // the entity’s type, such as a “post” or “donation”

 entityId: this.id, // the entity’s identifier

 operation: type, // the operation type: “create” or “update”

 data: this // the entity’s data

 }

 const message = new TextEncoder().encode(JSON.stringify(data))

 submitMessage(message)

 } catch (error) {

 // log error

 }

}

// Submit Hedera Consensus Message to our Hedera Consensus Topic

const submitMessage = async message => {

 const transaction = await new ConsensusMessageSubmitTransaction()

 .setTopicId(topicId)

 .setMessage(message)

 .build(HederaClient)

 .sign(topicSubmitPrivateKey)

 .execute(HederaClient)

 const receipt = await transaction.getReceipt(HederaClient)

 return receipt

}
```

**DragonGlass real-time subscription service**

Once we had messages getting submitted to our topic, we needed a way to get notified once the Hedera network gained consensus so we could update our local cache and fairly order marketplace posts and activity on the frontend. For this, we used a real-time subscription created through the [DragonGlass portal](https://app.dragonglass.me/)
, which automatically sets up an associated Amazon SQS queue filtered to specific topics to notify when consensus has been reached. In our Node.js backend, we added the [sqs-consumer npm package](https://www.npmjs.com/package/sqs-consumer)
, and setup a handler for updating the “consensusAt” timestamp for our entities. Again, after just a few lines of code, we were up and running:

DragonGlass Integration

DragonGlass Integration

```
const { Consumer } = require('sqs-consumer')

const AWS = require('aws-sdk')

const handler = require('./handler')

AWS.config.update({

 region: {awsRegion},

 accessKeyId: {awsKey},

 secretAccessKey: {awsSecret}

})

// since DragonGlass stores the message body data in hex, we need to convert

const convert = (from, to) => str => Buffer.from(str, from).toString(to)

const hexToUtf8 = convert('hex', 'utf8')

// setup Amazon SQS queue listener

const app = Consumer.create({

 queueUrl: {sqsUrl},

 handleMessage: async (message) => {

 // received SQS message

 if (message && message.Body) {

 const messageBody = JSON.parse(message.Body)

 if (messageBody && messageBody.data[0]) {

 const messageBodyData = messageBody.data[0]

 if (messageBodyData.message && messageBodyData.message.message) {

 try {

  // convert message to utf-8 encoding

 const hcsMessageData = hexToUtf8(messageBodyData.message.message)

 const data = JSON.parse(hcsMessageData)

 handler.onData({

 consensusAt: messageBodyData.consensusTime,

 consensusSequence: messageBodyData.message.topicSequenceNumber,

 data

 })

 } catch (e) {

 // log error

 }

 }

 }

 }

 },

 sqs: new AWS.SQS({ apiVersion: '2012-11-05' })

})

app.on('error', (err) => {

 handler.onError(err.message)

})

app.on('processing_error', (err) => {

 handler.onError(err.message)

})

app.on('timeout_error', (err) => {

 handler.onError(err.message)

})

// start listening

app.start()

// handler.js 
const onData = ({ consensusAt, consensusSequence, data }) => {

 try {

 const entity = data.entity

 const entityId = data.entityId

 // update local database table {entity} where id = {entityId}

 } catch (error) {

 // log error

 }

}
```

**What’s next?**

By leveraging the resources available from Hedera and DragonGlass, HumanKind went from having no prior experience with Hedera Hashgraph, to building a robust, award-winning decentralized marketplace in a few short weeks. To lead by example, we’ve donated a percentage of all prize winnings to our favorite charities, including the [John W. Brick Foundation](https://www.johnwbrickfoundation.org/)
 for mental health and [Heart-to-Heart International](https://www.hearttoheart.org/)
, which is providing worldwide COVID-19 relief to first responders.

We hope HumanKind becomes the first step toward making kindness a habit instead of an afterthought. Since the hackathon ended, we’ve been identifying key partners that believe in our vision of giving back and who would like to collaborate around our roadmap as we work towards go-live in the next few months.

If you or someone you know are part of a socially conscious business or charitable organization that might be interested in participating, please reach out directly at [team@humankind.ly](mailto:team@humankind.ly)
 or visit [https://humankind.ly/](https://humankind.ly/)
[https://humankind.ly](https://humankind.ly)
 to learn more.

[Back to Blog](/blog)

discover

See more articles

[View All](/blog)

September 24, 2026

### Hedera Contributes Hashgraph-Developed CLPR to Linux Foundation Decentralized Trust Labs

Donated by Hedera, CLPR, the cross-ledger protocol developed by Hashgraph, is now an open source lab under Linux Foundation Decentralized Trust – allowing the open-source community to help shape, test

[Read More](https://hedera.com/blog/hedera-contributes-hashgraph-developed-clpr-to-lfdt/)

September 22, 2026

### Atomic Batch Transactions No Longer Support Smart Contract Calls

Smart contract calls submitted as inner transactions of an Atomic Batch Transaction enter a six-month deprecation period, with removal planned for March 2027. Atomic batch transactions remain fully supported for

[Read More](https://hedera.com/blog/atomic-batch-transactions-no-longer-support-smart-contract-calls/)

September 16, 2026

### Scaffold-HBAR Template Bounty

Create a production-quality template that serves as the go-to starting point for Hedera developers and stand a chance to win one of five $2,000 prizes from a $10,000 pool.

[Read More](https://hedera.com/blog/scaffold-hbar-template-bounty/)

## Ready to get started?

Discover why Hedera is the trusted institutional-grade network powering the new digital economy.

[Start Building](/start-building)

[Contact](/contact)

We use cookies to deliver the best experience on our website and to analyze traffic. By continuing to use this site, you consent to our cookie policy.

Review our [Privacy Policy](/privacy)
 to understand how Hedera collects and uses information.

Accept All CookiesAccept Necessary Cookies
