Skip to content

Mushroom-Lab/hackathon-ethglobal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CREMINI

This is a one-stop repo for ETHOnline 2022 hackathon. A write-up for using Ceramic is here.

CREMINI empowers user to express Discord activeness on-chain through Ceramic, leveraging the technology of DID session to create data availability while preserving user's ownership.

More about CREMINI project.

SYSTEM DESCRIPTION

Features

  • SEEK a time-sensitive, revokable authorization from a user for generating a ceramic DID
  • CREATE a public user profile on ceramic which bind user’s public address, user_id and guild_id
  • SUBSCRIBE to discord data and make update to user XP (as user send messages) and popularity (as user receive emoji) within a guild.
  • COMMIT update on user profile on ceramic at specific data check-points.
  • RE-SYNC user data on ceramic to discord for recovery or account-rebind.
  • OPEN up a transparent layer of guild-based user data.

Overview

Untitled

Tech Stacks

We approach our goal with the mindset of using micro-services, and modular software engineering with explicit separation of duties. Thus 5 repos/pieces of individual software are created to work together to achieve the intended system design. Each piece of software is a little process that does simple, straight-forward tasks.

1. Discord Bot

This repo is a modified version of https://github.com/KumosLab/Discord-Levels-Bot from KumosLab. On top of the simple XP system using mongoDB, we incorporated the concept of “popularity” that counts the emoji reactions from other users(capped at 1 from each other user on each message). We also added a new bot command that user can use to initialize the Ceramic DID authorization process.

2. Discord Redirect

This repo is a minimal HTTP server using Flask, that offer discord redirection. This exist to improve the UX experience as user would receive custom DM when they initialize the DID authorization process. We also incorporated the Discord official Oauth workflow, to strengthen user’s awareness of authorization.

3. Discord Http Service

This repo is a minimal HTTP server using Flask, that offers a few bundled discord API services by using restFUL endpoints. This server exists to complement the subscription-based discord bot and provide a gateway to push data on behalf the discord bot. Some features are direct-message to users, role-assignment etc.

4. Core Backend

This repo is an implementation of backend on nest.js. This is the process that interacts with Ceramic storage layer. For example, Discord bot would make call to this backend for updating profile on-chain, and syncing user profile to discord. The Ceramic DID session key is strictly and ONLY consumed in this service. This backend also has its own postgreDB that handles its’ ceramic specific data requirement, separated from any business logic in the discord layer.

5. Frontend

This repo is an implementation of frontend on next.js.

Regarding Ceramic:

We rely on Ceramic’s DIDs Toolkit to preserve user’s ownership of the data.

First user creates a did:pkh account fully controlled by the Ethereum address. With this did account, user would sign for a DID session, with which we can update their profile. User could also enable other Dapp to make update to their profile by sharing the DID

Potential Integration with ComposeDB

In future, (or the next hackathon) We would use ComposeDB to index user’s onchain profile and combine with other data models (e.g. Gitcoin Passport) to create a logic-oriented data aggregation layer on top of Ceramic.

About

a one-stop repo for ETHGobal2022

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •