Code Monkey home page Code Monkey logo

dash-apps's Introduction

Summary

This repo contains 6 packages.

@klimadao/app -> app.klimadao.finance, a standalone single-page-app for protocol interactions.

@klimadao/carbon-projects -> A Sanity CMS that contains curated data for Verra projects, deployed to carbon-projects.sanity.studio, and referenced by the Carbonmark frontend and backend. NOTE: Unlike the other packages, this one is not included as an NPM workspace from the root package.json. To work with the CMS you need to run sanity install from inside the carbon-projects folder.

@klimadao/carbon -> data.klimadao.finance site (formerly carbon.klimadao.finance)

@klimadao/lib -> Components and utilities that are shared between packages.

@klimadao/site -> klimadao.finance homepage, content and cms-powered pages.

Requirements

Take note, this repo utilizes newer features from Node, NPM and TypeScript 4.5.

Install dependencies

From the klimadao/ root folder, not from individual packages: npm install

Development

A set of NPM Workspace commands are provided, and can be run from the root folder.

Other scripts you should know about:

  • npm run build-all: build all workspaces.
  • npm run format-all: Format all files with prettier.
  • npm run extract-strings:dev: Extract translation files for the source language "en".

Type Generation

Typescript types for Carbonmark and Carbonmark API are generated via the generate:types script in each respective project.

Regenerate types in any of the following changes:

  1. Models in the API (.model files)
  2. Change to any of the dependant subgraphs (see codegen.constants.ts)
  3. API Version targeted by Carbonmark

Translations

For Developers

This repo uses lingui in combination with translation.io.

We follow these rules:

  • Don't use ids, except for very long strings.
  • Extract the source translation with npm run extract-strings:dev
  • Commit source language files "en" only

For translators

Setup

  • Create an account on translation.io
  • Request access to the project atmosfearful/klimadao in the #content-translation KlimaDAO discord server

Translating

  • Log in translation.io
  • Select the appropriate project klimadao-site or klimadao-app
  • Make sure you select the appropriate language in the top menu
  • Start translating!
  • Select an item to translate in the left column
  • On the bottom right you will notice the source text (in English) and the place to translate the text beneath.
  • You can prefill this by selecting an entry in the Suggestion area above.

Pledge Dashboard

Klima Infinity pledge dashboard is backed by a firebase database. Follow the following to set up your dev environment if you'd like to contribute to the project.

Diagrams

See this page in the wiki of this repo for architecture and other diagrams.

Contributing

The DAO is looking for react/typescript devs as well as experienced Solidity devs! Enjoy a flexible work schedule and work on something truly ambitious and meaningful. Monthly compensation available based on your level of experience and degree of contribution.

If you'd like to just take a ticket or fix a bug, go for it (always better to ask first, though).

If you'd like to become a regular contributor to the DAO, join the KlimaDAO discord and follow the application instructions.

📚Check out the contribution & style guide.

dash-apps's People

Contributors

0xaurelius avatar archimedescrypto avatar biwano avatar chazschmidt avatar cujowolf avatar jamesattwood1910 avatar milos1991 avatar originalpkbims avatar sprrwhwk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dash-apps's Issues

Add total retirements chart across all on-chain assets

'total retirements' across all on-chain carbon assets for the past year (with a graph showing daily/weekly/monthly, etc).

we can ignore which pool they came from so we can include non-aggregator retirements in this

Carbon Dashboard - Export CSV

The purpose of this issue is too provided the capability for a user to export the carbon pool table data in a csv format.

Alternatively or in addition support copying from tables so they paste into excel cleanly.

Add fallback dataset for Verra

In the event that Verra's API rate limits us or changes suddenly, we need to have a fallback dataset somewhere that we can load if the Verra API errors out for some reason

We can also use this to avoid pulling the real Verra dataset during testing

Enable pool-level retirement charts using KlimaRetire entity

Since we can't tell whether a given TCO2 retirement came from a specific pool with the current retirement flow, we can just track retirements made via the retirement aggregator and indicate that this only includes retirements made via that tool since we can be sure they came from a specific pool.

Find a way to display selective retirement costs

Since many users will want to redeem or retire a specific project, we need a way to display the effective cost of retiring a specific project from a given pool

One option would be a line chart multiplied by the selective redemption fee for that pool, but the fees can change over time so we would need to integrate this data into the Subgraph

A simpler option would be to only show selective retirement costs for the current pool price and current fee - to simplify we can use the retirement aggregator's pricing functions to get the selective redemption cost for each pool at a point in time

[carbon dashboard] ToC width to prevent title wrapping

Summary

On the carbon dashboard, the addition of the work "Digital" has resulted in the Digital Carbon Overview ToC item to wrap.

Requirements

Could we bump the ToC width enough to get Digital Carbon Overview on one line?

Add C3 section

Should have same top-level dashboard (C3T instead of TCO2) and per-pool pages as Toucan

Add KLIMA reference price and "KLIMA Ratio" field to each carbon pool

As a user of the carbon dashboard, I want to better understand the role of the KLIMA token as a reference basket of the most liquid carbon credit classes, and have a useful reference for assessing the relative value of the KLIMA token and the carbon pool tokens that back it

[Carbon Dashboard] Carbon pool page updates

This workstream relates to enhancements and changes to the Carbon Pools page on the Carbon Dashboard.

Requirements:

  • Change navigation title from Carbon Pools to Carbon Pricing
  • In each pool price box include:
  • -Spot price
  • -Selective cost (with tool tip)
  • -Current supply
  • -Figma mock/sketch
  • Clean up the price boxes design
  • Add a second graph under the spot price graph to show liquidity changes over time (@marcus Aurelius to provide data for this [THIS WILL BE A NEW TICKET]
  • Add UBO and NBO to the price boxes and graphs
  • Add a standard footer to all the pages with a last updated time stamp [THIS WILL BE A NEW TICKET]

[Analytics] GTM tag installation (Carbon Dashboard)

Need the following tasks done to complete our GTM installation for the Carbon Dashboard:

  • Paste this code as high in the of the page as possible:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-KWFJ9R2');</script>
<!-- End Google Tag Manager -->
  • Additionally, paste this code immediately after the opening tag:
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KWFJ9R2"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

[carbon dashboard] Competitor review of Senken analytics dashboard

Review the Senken dashboard for design inspiration and feature ideation.
Capture the analysis as a set of design sketches and / or feature requirements.

Description

Senken have launched a beta analytics feature (https://www.senken.io/analytics-carbon)
We should review their dashboard and look for opportunities to match or improve on our carbon dashboard application.

Some initial ideas to consider:

  1. Switch price charts to candle
  2. Add top-level stats for each pool like they have under "Top Movers"
  3. Update subgraph to include top-level stats for each pool
  4. Other opportunities?

Add more detail to the BCT pool page

We should have many of the same charts from the main page filtered down to just BCT on the BCT Pool page

A detail table that shows each individual TCO2 should also be added, including a column with a link to the Verra project page: https://registry.verra.org/app/projectDetail/VCS/<project_id>

[carbon dashboard] Apply updated font/style changes across all pages

The purpose of this ticket is to consistently apply recommended style and font changes across the Carbon Dashboard site.

These are the requirements and should be applied to all relevant components across all of the pages:

  • For the header cards, please use the following:
Width: 100%
padding top and bottom: 20px

Font: “Desktop/H2” - 48px Bold

font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 48px;
line-height: 48px;
  • For the number cards, please use the following:

padding top and bottom: 20px
make the labels font “Desktop/H5”

font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 20px;
line-height: 28px;

The space between the labels and their corresponding numbers should be 12px
Make the numbers font:

font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 24px;
  • For the graph cards, please use the following:

padding-all: 20px
Graph titles:

font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 20px;
line-height: 28px;
  • Space between cards within a chain grouping (for example all the cards relating to the polygon on chain carbon), should be 20px. Space between chain groupings should be 40 px. (So the ethereum title card should be 40 px below the bottom polygon graph card, etc)

Carbon Dashboard Loading Error

Dionysus is reporting a recurring issue where both the production and staging versions of the Carbon Dashboard do not load properly. Error message below:
image

It's a bit frustrating when trying to show this to potential partners.
It seems like it happens in the morning EU time... I don't know if that's useful information at all.

Add a breakdown table of carbon supply and retirements by chain

For each chain (right now just Ethereum and Polygon, soon we'll add Celo and Regen) we should show:

  1. Total carbon supply on the chain (need to be careful not to double count credits that have been bridged)
  2. Total retirements issued on that chain
  3. % of retirements made via KlimaDAO aggregator

For Celo we need to be careful not to report until we add a subgraph that tracks MCO2 retirements issued from Celo (although I think the volumes are quite small)

Add error handling to Subgrounds data fetches

We need to handle subgraphs being unavailable more gracefully than we currently do - ideally wrap each subgrounds query in a try/except that ensures something is passed back from the data fetching functions, for instance None

And then in the process of rendering each chart, we check if the dataset we're using is None - and if so simply display a generic "This dataset is not available at the moment" message

Carbon dashboard - Next iteration (v2) UX & Design

This work stream is related to defining the user journey and designs for the next iteration (v2) of the Carbon Dashboard.

Related design issue: KI User Journey Design Review (#478)

Roadmap card here: https://www.notion.so/klima-dao/Carbon-Dashboard-Next-Iteration-v2-84581acfbc7d4d339e9dc93d9332463f

Notes from design ideation meeting:

  • The Carbon Dashboard is meant to be a reference for industry, press, academic, etc
  • The home/landing page is meant to act as a total executive summary
    • Some users will just want the summary and not want to drill into the detailed reporting
  • Concepts that will help tell the story of tokenized carbon:
    • Mentioning the on the ground project
    • Nature vs mitigation credits
    • Top retired project
  • Design ideas to try and incorporate
    • Over time view
    • Representation of the percentage change
    • Tie the stats to real world impact, for ex:
      • hectares of forest
      • cars off the road
      • liters of gasoline saved
      • etc
  • Full liberty to suggest design changes to the landing page, lean towards more visual, possible use of infographics, animated gifs, etc.
    • Note: beyond the landing page, the other pages have limitations given the graphing library being used

Add liquidity depth indicators to carbon pools page

In addition to pool prices, on the Carbon Pools page there should also be an indication of liquidity depth for each pool, expressed as, say, "size of order resulting in +/- 2% slippage" - ideally displayed over time as a chart

Add UBO and NBO price charts and switch to Subgraph-based price feeds

We probably want to get away from CoinGecko too and start pull on-chain prices from a Subgraph

Requires us to put up a subgraph with the various prices for carbon assets (and potentially also KLIMA)

I'm thinking we want a dedicated markets Subgraph that just has prices from Sushi/Quickswap for the various tokens in our ecosystem

Add HTTP Security Headers

Not sure if this will be possible with DOAP, might need to tackle after we move to k8s hosting

from gordob:

NO http security headers set, TLS 1-TLS 1.1 enabled, Obsolete CBC ciphers enabled.

we can set CORS on DOAP, and we can in theory set custom headers on the Dash app as outlined here: plotly/dash-renderer#75

Log scale option on line graphs

Where applicable and across all the pages, include a log scale option for the line graphs.

This will help better visualize the data when the graph includes outlier/extreme values that mute the rest of the chart, for example.
Screenshot 2023-03-28 at 9 34 10 AM

Add top-level "State of Tokenized Carbon" page

High-level data story that walks the user through key metrics across the entire on-chain market:

  • total tonnes bridged vs. size of off-chain market
  • breakdown of volume by bridge
  • overall map of where credits are coming from
  • comparison of on-chain and off-chain prices (with explanation of how each tokenized pool maps onto off-chain assets like GEO, N-GEO

Clarify pool vs. project on retirement trends page

Right now we just have a "Pool" column that either shows a pool name or a TCO2 address

Instead, we should have a separate "Project" column that links directly to the Verra project page (or maybe the project page on Carbonmark?) and then Pool would be blank or N/A for retirements made directly via TCO2

Add MCO2 page

Since MCO2 is "homogeneous" we can just hard-code data based on the total amount of MCO2 and the known set of projects composing MCO2

For volumes, we can either evenly divide the total amount of MCO2, or we simply treat them as a single block and don't show volume breakdowns by project

We can still have a "detail" table with the links to the individual projects, just sans volumes

https://mco2token.moss.earth/

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.