Coder Social home page Coder Social logo

erak / hypedao Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hypedao/hypedao

0.0 0.0 0.0 10.37 MB

Monorepo for the HypeDAO website

Home Page: https://www.hypedao.xyz

TypeScript 61.35% JavaScript 10.67% CSS 27.77% Batchfile 0.07% Shell 0.15%

hypedao's Introduction

HypeDAO

Welcome to the HypeDAO monorepo!

This repository contains the infrastructure needed to run HypeDAO and is meant to become a template project that others can use to spin up their own DAOs! Its' organized in yarn workspaces and currently consists of the following packages:

Eventually, this repository will contain other packages in the future like smart contracts and a server.

If you have any questions the best way to reach us is our Telegram.

Initial Steps

Required: Node plus Yarn and Git

Clone the repo:

git clone https://github.com/HypeDAO/HypeDAO.git

Install dependencies:

yarn install

Getting Started With the Next.js Frontend

Next.js frontend, running our website at hypedao.xyz.

Run this command from the root folder:

yarn next:app dev

Open http://localhost:3000 with your browser to see the result.

Note: To add libraries/dependencies you must cd into the next-frontend directory and then use the command:

yarn add <name>

How data caching with dao-stats works

The frontend contains components which rely on on-chain data that cannot be queried in realtime, yet. Therefor we built dao-stats, a tool available via CLI that acts as a pseudo-indexer, fetching, indexing / aggregating and storing cached data in human-readable format.

The mechanism we set up contains the following components:

  • a JSON file stored on a separate branch called cache
  • a set of scripts (scripts/dao-stats/ and scripts/cache/) that build dao-stats and call it to initialize and update that JSON file
  • a Github action that makes use of those scripts to automate everything (configured in .github/workflows/cache.yml)

Steps to set up a file cache

In case you want reproduce and or customize the cache update, please make sure to run these steps:

  1. Create empty branch, e.g. cache
  2. Checkout that branch into a subdirectory
  3. Build dao-stats by calling scripts/tools/dao-stats/init.sh
  4. Customize arguments passed to dao-stats in scripts/cache/init.sh and run /scripts/cache/init.sh
  5. Copy the newly created JSON file cache dao-stats-* to the folder containing the cache branch, commit and push changes
  6. Customize arguments passed to dao-stats in scripts/cache/update.sh

General Contribution Steps

After getting your environment all set up make sure to branch off of main.

git branch -b <branch-name>

Please stick to these general branch naming conventions:

feature/task-description - Feature branches are for all new feature work. Keep the task description short and sweet (and use "kabob-case")

fix/task-description - Fix branches should be leveraged for bug fixes on existing features

Commit your code regularly with clear commit messages that describe the step you've just taken: git add . (if you've added a new file) and/or git commit -am "<message>"

When you are ready to merge your code back to the main branch make sure to pull in the latest code and resolve any merge conflicts that may have come up (I would also recommend doing this every day if you are working on a larger feature)

git pull origin main

After this you can push your code up with git push. If it is your first time pushing you may get some helper text directing you on the proper command lines.

Follow the link from the cli to GitHub and if all looks well create your PR. Please use the description space to outline what you've done as well as note any new packages you've installed.

After an admin has approved the pr they will merge in the code for you.

If you wanna take on another task please branch back to main git branch main and pull from origin main again before making a new branch.

Lastly pat yourself on the back!

You've contributed to a revolutionary concept, pushed the boundaries of creative tech and helped many artists get the recognition and compensation they deserve. Thank you!

Known hurdles connecting people to NEAR

  • Chrome (and potentially other browsers) has trouble using NEAR wallets, especially with Ledger devices. Solution: Use Firefox

  • Signing in with a wallet requires 2FA being set up, this requires at least 4 NEAR in your wallet

hypedao's People

Contributors

erak avatar ev3reth 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.