GithubHelp home page GithubHelp logo

rsksmart / devportal Goto Github PK

View Code? Open in Web Editor NEW
31.0 22.0 69.0 405.77 MB

Rootstock+RIF Developers Portal

Home Page: https://dev.rootstock.io

License: MIT License

HTML 24.55% Ruby 0.97% CSS 11.87% JavaScript 43.04% TypeScript 9.76% SCSS 9.81%
developers devportal documentation rootstock rsk rif

devportal's Introduction

Rootstock-logo

Rootstock + RIF Developer Portal

This repo contains the Rootstock + RIF Developer Portal:https://dev.rootstock.io. The Developer Portal is the home for Rootstock (RSK) documentation for end users and developers. Check out our quickstarts, tutorials, API reference, and code examples.

Start your journey to building dApps on Rootstock, see the quick start guide or see setup instructions, or the contributing guide for how to contribute to the Rootstock Developer Portal.

🚀 Send us feedback

🚀 Join the Join the global Rootstock community on Discord

Table of Contents

Requirements

Set up

Clone this repository, and run the following commands in the root directory:

nvm use
yarn install

Usage

Production build

yarn run build

Compiles your site for production so it can be deployed. Note: It should be run from the project root.

You will now find a site ready for production in src.

Development mode

yarn run develop

The develop command compiles and serves a development build of the DevPortal, this reflects any source code changes in the browser in real time. Note: It should be run from the project root.

Edit src/pages/index.tsx to see your site updates in real-time! This update will be served at http://localhost:8000/. Each time you save a file, the site will get regenerated.

Preview Site

yarn run serve

The serve command serves the production build of the site for testing prior to deployment, and can be viewed via: http://localhost:9000/.

Cleaning Cache

yarn run clean

Note: This is useful as a last resort when your local project seems to have issues or content does not seem to be refreshing.

Test build outputs

To run tests that check whether there are any errors in the site:

NA

This runs tests that check whether there are any errors in the site. Currently uses the Gatsby Remark check links plugin to runs the following basic checks:

  • Detects broken links to pages and headings

Contributing

  • For changes to general content, site pages, images, etc. See the content folder.
  • For changes to the logic, or looking adding new features to the devportal. Refer to gatsby-config.ts, gatsby-node.ts, /src pages.

Writing original documentation

Steps:

  1. Locate the content folder
  2. Create a markdown file in the section you wish to add the docs.
  3. Add title, menu_title, tags, description, and menu_order attributes to the front matter as appropriate - see below for more details.
  4. If the new page is within a collection, and it is named index.md, add a section_title, menu_title. Ensure that you set a permalink attribute in the front matter, with a trailing /.

See example below:

---
layout: rsk
section_title: Rootstock Blockchain
menu_title: About Rootstock Blockchain
title: Rootstock Blockchain
tags: rsk
description: What is Rootstock?
menu_order: 2
permalink: /rsk/
---

Replicating existing documentation

This applies if you have documentation in other git repositories which need to be replicated here. This is expected to be used sparingly, only for libraries with existing documentation.

Steps:

  1. Create a markdown file which contains only front matter.
  2. Edit /.git-cached-copy.config.json to specify the details of files from other git repositories that should be copied.

Tips:

  • Test the build output to ensure that the following common errors are fixed
    • Hyperlinks to anchors by ID attribute are correct
    • Referenced image files are also copied

Moving existing documentation

This applies when you have documentation already published on the devportal, but wish to move or rename it.

  1. Do not use git mv to move/ rename the file
  2. Instead create a new file in the target location/ file path, and leave the previous one there.
  3. In the new file, copy all the contents from the previous file.
  4. In the previous file, delete all contents, and replace the front matter with redirection instructions. Note that both URLs should be absolute and end with /. For example:
---
layout: redirect
permalink: /develop/apps/tools/stats/
redirect: /tools/
---

Why: This is done because when a page is published at a certain URL, that URL may be linked to externally. By renaming/ moving a page, the URL changes, and any external links may get a "404 Page Not Found" error. In this scenario, a redirect is preferred as it is much more user friendly, and search engine friendly.

Links

  1. When adding links, prefer absolute links - e.g. links beginning with /, over relative links - e.g. links beginning with ./ or ../
  2. Run ?? to identify any broken links - this includes both links to other pages within devportal, and links to anchor references within devportal pages, however does not include links to external pages (not within devportal).

Findability

When you add new documentation, you should check that a visitor is able to find it through both the navigation bar, and the search functionality.

Navigation menu

  • If your new pages are within a collection
    • The reader may use "previous" and "next" links to go through the pages in a sequence
    • Ensure that all pages within the collection have a unique value for menu_order in their front matter - use positive whole numbers only
    • Ensure that the sequence is in a correct order - it starts from lowest menu_order and ends at highest menu_order
    • Look at _quick-start/*.md for a good example of this

Search results

  • A reader may find your new pages through the search feature available at /search/index.html
  • To maximize the quality of the search results, ensure that you add all of the following to the front matter for each new page
    • title: This is the title of the page which is also displayed to the reader. Avoid using special characters, unicode characters, or emoji, as readers are less likely to use these in search. menu_title: The menu title appears in the navigation menu, ensure to add this on each page for easy navigation.
    • tags: Use this to set the categories, labels, or other keywords which you think a reader would search for when looking for this page.
    • description: If this is not present, it defaults to the first 200 words in the content. It is a good idea to set this to include any words or phrases which you think a reader would search for when looking for this page.

Updating RSKj

When a new version of RSKj is released:

  • Update the version numbers list in the public nodes page:
    • rsk/node/reproducible.md
  • Update the version numbers and checksums in the installation instructions pages:
    • rsk/node/install/java.md
    • rsk/node/contribute/linux.md
    • rsk/node/contribute/macos.md
    • rsk/node/install/ubuntu.md
  • Update the version numbers and checksums in the reproducible builds page:
    • rsk/node/reproducible.md
  • Update to add/ remove/ update any RPC methods, if relevant, in the RPC page
    • rsk/node/architecture/json-rpc.md

Issues

We encourage you to report issues. When you open an issue, you should be given the option to choose a category. Choose the most appropriate one.

Next, the description should be automatically populated from a template. Fill it in accordingly. Note that What and Why sections are compulsory, and the Refs section is optional.

Pull Requests

You can also contribute to the Developer's portal by sending a PR.

When you open a pull request, the description should be automatically populated from a template. Fill it in accordingly. Note that What and Why sections are compulsory, and the Refs section is optional.

Please run ?? to test the build output of your branch prior to creating a new pull request, or pushing more commits to an existing one. Don't introduce any regressions!

devportal's People

Contributors

adauto82 avatar alebanzas avatar alepc253 avatar alexjavabraz avatar antomor avatar bguiz avatar denk0 avatar dulcedu avatar ginowine avatar heitorfm avatar ilanolkies avatar ivegabr avatar javiesses avatar jonathansmirnoff avatar julianmrodri avatar max-barrera-2148 avatar mortelli avatar nagarev avatar owans avatar rcoscali avatar rmoreliovlabs avatar santicomp2014 avatar shenshin avatar solangegueiros avatar taniebrand avatar vjgene avatar vojtechsimetka avatar wilsoniovlabs avatar zdaodu-iov avatar zgraya-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devportal's Issues

RIF Storage documentation

This issue is for the RIF Storage documentation crew to keep track of different documentation pages and states. The structure is as follows:

Storage tree

  • storage
    • base/core (unified API)
      • upload
      • download
    • Swarm
      • swarm specific docs
    • IPFS
      • ipfs specific docs

Tasks:

  • storage architecture diagram
  • Node docs
  • diagram
  • references
  • operations/use-cases
  • SDK/libs repo
  • Roadmap
  • Tutorials

JSON-RPC page is not updated

What

  • JSON-RPC compatibility page is out-of-date. It doesn't show changes included in version 1.1.0

Why

  • To show real interface.

Refs

fix: standardise terms

What

  • Standardise on the following:
    • Testnet
    • Mainnet
    • 2-way peg
    • hashing power
    • RSK Federation

Why

  • Documentation should be internally consistent to avoid reader confusion
  • We currently have several variations in spelling - e.g. TestNet vs Testnet

feat: how to setup rLogin for a single network

What

  • explain how to use rLogin to work with a single network. This will make the user avoid some steps

Why

  • rLogin default instance is for multiple networks. The use chooses the network before connecting, for example, to a hardware device. We want dapps to be able to avoid this extra unnecessary step by configuring the tool
  • we need a guide because many apps have this use case

Refs

Automatically pop new tab for external links

What

  • Current behavior: external links must be redirected to new tab manually
  • Desired behavior: all external links should automatically redirect to new tab

Why

  • Most external links appear on steps. If the user clicks external link on a step, he/she looses the current page.

feat: lack of explanation

What

  • The reproducible build page is not explaining how to download the builds from the docker image after building.

Why

  • Should explain how to download the files because otherwise is pointless.

bug: invalid byte sequence in UTF-8 (ArgumentError) in Macbook (Intel)

What

Hi guys, just wondering if somebody has ever seen this error when trying to follow the readme of devportal: /Library/Ruby/Gems/2.6.0/gems/jekyll-last-modified-at-1.3.0/lib/jekyll-last-modified-at/determinator.rb:38:in []': invalid byte sequence in UTF-8 (ArgumentError)`

Why

  • I want to run it locally. I am using MacBook Intel Core

image (5)
image (6)

Re-organize menu items and left nav bar

The menu items on left navigation bar should be
Quick Start
Port Ethereum Dapps
Libraries & Tools
Node Setup
Wallet Integrations (Currently called Connect to RSK section)

Other pages such as RSK Introduction and Improvement Proposals do not need to be listed on the menu.

OpenRPC for RSK JSON RPC Specification

What

A few days ago, ethereum started using this online tool to describe and document their official json rpc specification, maybe we can do something similar with our current json rpc spec.
https://github.com/ethereum/eth1.0-apis

I don't know if it should be part of the devportal but it might be a good place.

Why

  • It's a useful an easy tool to quickly interact with the rsk node
  • Improves UX and also bug discovering

feat: how to add web3modal compatible providers to rLogin

What

  • This guide should explain that you can add any of these to the rLogin https://github.com/Web3Modal/web3modal#provider-options
  • We should also explain that these are not tested yet (the ones that are not in our list) and they might need extra configuration to work on RSK, because they are Ethereum based wallet providers

Why

  • rLogin is built on top of web3modal on purpose, to allow this

Refs

https://github.com/rsksmart/rLogin/blob/develop/src/controllers/providers.ts#L2

Code examples outdated or not complete

Reading the architecture section of the documentation I encountered some outdated web3 code and unhandled promises.

For example:

var registrarInstance = web3.eth.contract(registrarAbi)
 var registrar = registrarInstance.at(registrarAddress)

in web3 1.2.2 should be written as:

const registrarInstance = new web3.eth.Contract(registrarAbi, registrarAddress)

var sha3 = web3.sha3(label) should be const sha3 = web3.utils.sha3(label)

And the contract methods should invoke the call or send method, and to avoid unhandled promises there should be a async/await or a .then().catch()

For example:

const status = registrar.entries(sha3)

should be

const status = await registrar.methods.entries(sha3).call()
// or 
registrar.methods.entries(sha3).call().then(status => { }).catch(error => { })

Please let me know if you agree with this points, I would like to make a PR handling this issue.

Cheers

By: @sebastinez

Indicate external link on left nav bar

image
As shown in screenshot, external link currently looks the same as internal pages and when user click on it they are directed to an external website.

It's better to

  1. Indicate external link with a logo on the right of the same line
  2. All use target="_blank" to open a new tab.

Inconsistent link highlighting behavior

What

  • Current Behavior:

    • Hovering in the whitespace to the right of a link will cause the link to change color.
    • Moving the mouse between two links that are next to each other will result in the link being hovered over turning green and the other link staying black.
  • Expected Behavior:

    • Hovering in whitespace next to links should not influence link color.
    • One link being highlighted should not change the color of another link.

Why

  • No reason for links to be changing color randomly as a user is navigating through a page.

Refs

weird_highlighting

Search isn't working properly

If you try to search anything, you won't get what you want. It isn't clear the way it get's the results. A small tooltip would be helpful, in order to show the way the search it's done

For example, if you try to search for anything related to Lumino project, lets say "lumino light client", you'll get this results:

Android Library
Deed
Libraries & Tools
Javacript Library
MyCrypto
Name Resolver
rns-artifacts - Price Subdomain Registrar
Python Library
RNS Manager
RSK Resolver
rns-artifacts - Registrar Interface
Registrar
Resolver
Reverse Registrar
Reverse suite

No one it's related to lumino project.

bug: bundling development takes too long

What

  • Currently development bundling takes too long. ~1 minute

Why

  • I think is due to meta processor. See
      Regenerating: 1 file(s) changed at 2020-11-30 19:23:27
                    rif/identity/about.md
       Jekyll Feed: Generating feed for posts
rouge code fence language aliases...
                    ...done in 38.095302 seconds.

I would remove this part of the build for dev env

feat: Quick search and advanced search

What

  • Current: In order to search for anything you need to go to the search page
  • Expected: There should be a search input at the top of the sidebar, for quick searches, and a search page with advanced options (by default simple options)
    page.

Why

It'll save clicks and improve user experience for quick search. Plus, if the user wants a more advanced one, it can do it at the search page.

feat: document RSK precompiled contracts

What

  • Addresses
  • ABIs
  • Brief explanation
  • Links to implementation

Why

  • This is info not centralized in devportal yet
  • Bitcoin header feature is cool stuff in RSK network

Refs

Duplicate entries in the navigation

Problem

In the current dev portal, the navigation has a duplicate entries - one for opening and closing the navigation and second for the actual page. This makes it quite cumbersome and confusing as seen below.
Screenshot 2019-11-17 at 17 24 35

Suggestion

Solution 1:

Make the actual page have generic title e.g. about.

pros:

  • solves the issue cheaply :)

cons:

  • this could be very limiting

Solution 2:

Make the actual open/close navigation entry clickable and contain the relevant page. Only the + and - symbols would then be used to open/close the navigation.

pros:

  • much more understandable to the users

cons:

  • all the navigation items would have to have content

RNS JS - How to integrate a dApp

What

dApps could use RNS to delegate subdomains to users and resolve that address

  • New article explaining how a dApp should integrate subdomain delegation
  • New article explaining how a dApp could use that domain to resolve addresses

Why

  • This is a main use case for the library

Refs

  • Explain how to use rns.subdomains
  • Explain hot to use rns.addr

Portal does not work in some browsers

In some browsers, the developers portal does not work. Navigating around gives blank page for any URL until hard refresh clearing local cache. Clicking on any link again goes to blank page.

Observed on Mac:

  • Brave - Version 0.70.122 Chromium: 78.0.3904.87 (Official Build) (64-bit) and newer. (reported by @vojtechsimetka , works in chrome though) Error:

Screenshot 2019-12-10 at 21 46 49

  • Chrome - Version 78.0.3904.108 (Official Build) (64-bit) and newer (reported by @AuHau). Error:
    WhatsApp Image 2019-12-10 at 21 51 35

The Monitor the blockchain link leads nowhere

What

  • At Node Contribute - Clicking the Monitor the blockchain link will take you to https://github.com/rsksmart/rskj/wiki/Monitor-the-blockchain, which only contains a circular reference telling the user that This page was moved: https://developers.rsk.co/.

Why

  • If we have a tutorial on how to monitor the blockchain, then we should probably link to it here. Otherwise, this link is just confusing.

Refs

confusing_link

RNS JS - How to integrate a wallet

What

  • New article explaining how the library should be integrated in an RSK wallet
  • New article explaining how the library should be integrated in another blockchain wallet

Why

  • This is the most important use case for the library

Refs

  • It should explain how to use rns.addr() properly

feat: Search feature impprovement

What

  • Current: search feature only search's for titles
  • Expected: should search for any match, not only titles.

Why

It's easier to find what you want.

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.