Giter Club home page Giter Club logo

blockchain's Introduction

Learn Blockchain

This repository contains the code for the LearnBlockchain.Academy, a project in active development by Supertype.

๐Ÿ”— Live Site: Learn Blockchain | Academy

๐Ÿ’– Motivation

We wanted to create an interactive workbook that help the average reader learn about the engineering marvel of blockchain, the Bitcoin protocol, and the cryptographic ideas that made the Bitcoin protocol possible. It is created to facilitate a self-learning approach guided by interactive quizzes, live code editors, and other interactive elements to help the reader acquire theoretical knowledge through experimentation.

Among the features include:

  • Content authored in MDX
  • GraphQL-powered and GraphiQL integration
  • Dark / Light theme switcher
  • Syntax Highlighting with Prism
  • Directly editable through GitHub integration
    • If you spot a typo or error, hit "Edit" and submit the edit directly on GitHub
  • Progressive Web App (Works Online, Offline, even in Airplane mode)
  • Sidebars on both sides, prev / next navigation
  • Search integration with Algolia
  • Google Analytics integration
  • Live code editor with react-live
  • Beautiful, interactive React UX components with Ant Design
  • Beautiful, interactive Charts with Chart.js
  • LaTeX support through react-katex
  • Full integration with crypto-js, a library of crypto standards

The workbook inherits from the hasura/gatsby-gitbook-starter template but are updated so support the latest version of React (17.0.2) and Gatsby (4.3.0).

๐ŸŽ Blockchain Topics

  • Symmetric and Asymmetric Key Cryptograpgy
  • Encryption and Decryption with RSA
  • Secure Hash Algorithms (SHA-256, Keccak)
  • Merkle Tree and Merkle Proof
  • Consensus Mechanism
  • Proof of Work
  • Bitcoin's Block Generation
  • Coinbase Transaction
  • Mining Reward
  • Ethereum's Smart Contract
  • Transactions

๐Ÿš€ Development

Get started by running the following commands:

$ git clone [email protected]:onlyphantom/blockchain.git
$ cd blockchain
$ npm install
$ npm start

Using yarn (recommended):

$ git clone [email protected]:onlyphantom/blockchain.git
$ cd blockchain
$ yarn install
$ yarn start

Visit http://localhost:8000/ to view the app.

๐Ÿ”„ Refreshing Data

Some of the data used in this material may be periodically refreshed. Data are stored in the /etc/ subdirectory.

Sources

๐Ÿ”ง Configure

Content is written using MDX and stored in the content folder.

Open config.js for templating variables. Broadly, configuration is available for gatsby, header, sidebar and siteMetadata.

  • gatsby config for global configuration:

    • pathPrefix - Gatsby Path Prefix
    • siteUrl - Gatsby Site URL
    • gaTrackingId - Google Analytics Tracking ID
  • header config for site header configuration:

    • title - The title that appears on the top left
    • githubUrl - The Github URL for the docs website
    • helpUrl - Help URL for pointing to resources
    • tweetText - Tweet text
    • links - Links on the top right
    • search - Enable search and configure Algolia
  • sidebar config for navigation links configuration:

    • forcedNavOrder for left sidebar navigation order. It should be in the format "/<filename>"
    • frontLine - whether to show a front line at the beginning of a nested menu.(Collapsing capability would be turned of if this option is set to true)
    • links - Links on the bottom left of the sidebar
    • ignoreIndex - Set this to true if the index.md file shouldn't appear on the left sidebar navigation. Typically this can be used for landing pages.
  • siteMetadata config for website related configuration

    • title - Title of the website
    • description - Description of the website
    • ogImage - Social Media share og:image tag
    • docsLocation - The Github URL for Edit on Github
  • For sub nesting in left sidebar, create a folder with the same name as the top level .md filename and the sub navigation is auto-generated. The sub navigation is alphabetically ordered.

๐Ÿ”Ž Algolia Search

To setup Algolia, go to config.js and update the search object to look like the one below:

	"search": {
		"enabled": true,
		"indexName": "MY_INDEX_NAME",
		"algoliaAppId": process.env.GATSBY_ALGOLIA_APP_ID,
		"algoliaSearchKey": process.env.GATSBY_ALGOLIA_SEARCH_KEY,
		"algoliaAdminKey": process.env.ALGOLIA_ADMIN_KEY
	},

LearnBlockchain.Academy is deployed on Netlify, so these environment variables are stored there. You may have to use dotenv (npm install dotenv) or different configuration, such as Docker, to get this working.

โœˆ๏ธ Progressive Web App

On a mobile browser (such as Chrome on Android, Safari on iOS), you can add this to the homepage of your device. LearnBlockchain.Academy can run even in offline / airplane mode.

๐Ÿ™ Support

I work on this in my spare time out of my home in Indonesia, but I do make an effort to be as available as possible. If you have ideas to improve this project, or make blockchain education more accessible in less-privileged parts of the world, please reach out to me. Please also feel free to suggest ideas or report bugs by opening an issue. PR and collaborators welcomed!

If you wish to make a donation or explore sponsorships / brand partnerships on the main site, please reach out to me on LinkedIn, Facebook or through the contact form at Supertype. I usually respond within 1-2 hours.

blockchain's People

Contributors

aceyoung9 avatar aminbenselim avatar atomicpages avatar cmacmillan avatar eatrey avatar hiteshsahu avatar jeong-sik avatar jmannfeld avatar karthikvt26 avatar kidunot89 avatar kpalatzky avatar lastnamearya avatar lo-tp avatar majcn avatar mingry avatar na3shkw avatar onlyphantom avatar praveenweb avatar rmatambo8 avatar spezzino avatar tanaypratap avatar thatzacdavis avatar thebliz avatar theowenyoung avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

blockchain's Issues

cant start

npm start

[email protected] start /home/user1/blockchain
gatsby develop

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘ โ•‘
โ•‘ Gatsby collects anonymous usage analytics โ•‘
โ•‘ to help improve Gatsby for all users. โ•‘
โ•‘ โ•‘
โ•‘ If you'd like to opt-out, you can use gatsby telemetry --disable โ•‘
โ•‘ To learn more, checkout https://gatsby.dev/telemetry โ•‘
โ•‘ โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
internal/modules/cjs/loader.js:905
throw err;
^

Error: Cannot find module 'graphql/polyfills/objectValues'
Require stack:

  • /home/user1/blockchain/node_modules/graphql-compose/lib/utils/schemaPrinter.js
  • /home/user1/blockchain/node_modules/graphql-compose/lib/ScalarTypeComposer.js
  • /home/user1/blockchain/node_modules/graphql-compose/lib/utils/typeHelpers.js
  • /home/user1/blockchain/node_modules/graphql-compose/lib/ListComposer.js
  • /home/user1/blockchain/node_modules/graphql-compose/lib/UnionTypeComposer.js
  • /home/user1/blockchain/node_modules/graphql-compose/lib/InterfaceTypeComposer.js
  • /home/user1/blockchain/node_modules/graphql-compose/lib/utils/typeByPath.js
  • /home/user1/blockchain/node_modules/graphql-compose/lib/InputTypeComposer.js
  • /home/user1/blockchain/node_modules/graphql-compose/lib/ObjectTypeComposer.js
  • /home/user1/blockchain/node_modules/graphql-compose/lib/TypeMapper.js
  • /home/user1/blockchain/node_modules/graphql-compose/lib/SchemaComposer.js
  • /home/user1/blockchain/node_modules/graphql-compose/lib/index.js
  • /home/user1/blockchain/node_modules/gatsby/dist/schema/types/derived-types.js
  • /home/user1/blockchain/node_modules/gatsby/dist/schema/types/sort.js
  • /home/user1/blockchain/node_modules/gatsby/dist/schema/types/node-interface.js
  • /home/user1/blockchain/node_modules/gatsby/dist/redux/reducers/inference-metadata.js
  • /home/user1/blockchain/node_modules/gatsby/dist/redux/reducers/index.js
  • /home/user1/blockchain/node_modules/gatsby/dist/redux/index.js
  • /home/user1/blockchain/node_modules/gatsby/dist/utils/get-static-dir.js
  • /home/user1/blockchain/node_modules/gatsby/dist/commands/develop-process.js
  • /home/user1/blockchain/.cache/tmp-21433-5BcR7Cc6Ea5B
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18)
    at Object. (/home/user1/blockchain/node_modules/graphql-compose/lib/utils/schemaPrinter.js:32:44)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/home/user1/blockchain/node_modules/graphql-compose/lib/utils/schemaPrinter.js',
    '/home/user1/blockchain/node_modules/graphql-compose/lib/ScalarTypeComposer.js',
    '/home/user1/blockchain/node_modules/graphql-compose/lib/utils/typeHelpers.js',
    '/home/user1/blockchain/node_modules/graphql-compose/lib/ListComposer.js',
    '/home/user1/blockchain/node_modules/graphql-compose/lib/UnionTypeComposer.js',
    '/home/user1/blockchain/node_modules/graphql-compose/lib/InterfaceTypeComposer.js',
    '/home/user1/blockchain/node_modules/graphql-compose/lib/utils/typeByPath.js',
    '/home/user1/blockchain/node_modules/graphql-compose/lib/InputTypeComposer.js',
    '/home/user1/blockchain/node_modules/graphql-compose/lib/ObjectTypeComposer.js',
    '/home/user1/blockchain/node_modules/graphql-compose/lib/TypeMapper.js',
    '/home/user1/blockchain/node_modules/graphql-compose/lib/SchemaComposer.js',
    '/home/user1/blockchain/node_modules/graphql-compose/lib/index.js',
    '/home/user1/blockchain/node_modules/gatsby/dist/schema/types/derived-types.js',
    '/home/user1/blockchain/node_modules/gatsby/dist/schema/types/sort.js',
    '/home/user1/blockchain/node_modules/gatsby/dist/schema/types/node-interface.js',
    '/home/user1/blockchain/node_modules/gatsby/dist/redux/reducers/inference-metadata.js',
    '/home/user1/blockchain/node_modules/gatsby/dist/redux/reducers/index.js',
    '/home/user1/blockchain/node_modules/gatsby/dist/redux/index.js',
    '/home/user1/blockchain/node_modules/gatsby/dist/utils/get-static-dir.js',
    '/home/user1/blockchain/node_modules/gatsby/dist/commands/develop-process.js',
    '/home/user1/blockchain/.cache/tmp-21433-5BcR7Cc6Ea5B'
    ]
    }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] start: gatsby develop
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/user1/.npm/_logs/2022-01-20T22_41_25_899Z-debug.log

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.