{"id":15659406,"url":"https://github.com/amazingandyyy/blockchain-in-node","last_synced_at":"2025-10-24T05:01:48.442Z","repository":{"id":82578284,"uuid":"126100022","full_name":"amazingandyyy/blockchain-in-node","owner":"amazingandyyy","description":"This is an afternoon-project, a blockchain built in node, supporting PoW.","archived":false,"fork":false,"pushed_at":"2018-03-22T07:46:12.000Z","size":66,"stargazers_count":21,"open_issues_count":1,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T19:54:19.017Z","etag":null,"topics":["amazingandyyy","blockchain","chain","chaincode","javascript","nodejs"],"latest_commit_sha":null,"homepage":"http://amazingandyyy.com/blockchain-in-node/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amazingandyyy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-21T00:25:59.000Z","updated_at":"2024-01-02T11:30:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"89c100b9-9d0a-46f4-acb7-30bb4111e2a6","html_url":"https://github.com/amazingandyyy/blockchain-in-node","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/amazingandyyy/blockchain-in-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amazingandyyy%2Fblockchain-in-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amazingandyyy%2Fblockchain-in-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amazingandyyy%2Fblockchain-in-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amazingandyyy%2Fblockchain-in-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amazingandyyy","download_url":"https://codeload.github.com/amazingandyyy/blockchain-in-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amazingandyyy%2Fblockchain-in-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269819032,"owners_count":24480087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazingandyyy","blockchain","chain","chaincode","javascript","nodejs"],"created_at":"2024-10-03T13:16:40.623Z","updated_at":"2025-10-24T05:01:48.355Z","avatar_url":"https://github.com/amazingandyyy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blockchain-in-node [![Build Status](https://travis-ci.org/amazingandyyy/blockchain-in-node.svg?branch=master)](https://travis-ci.org/amazingandyyy/blockchain-in-node)\n\nThis is an afternoon-project, a blockchain built in node, supporting PoW.\n\n### Why Node\nNode itself is a more beautiful, flexible and powerful language for internet project, again, I want to show my love to js.\n\n### Why a Blockchain from scratch\nWhen it comes to blockchain, most developers only learn **how to do Dapp** with ethereum, neo, or other existing infrastructure-completed project... They are fine, but using them will only let you know what you can do with them, as a result, you cannot really get the idea what you can do with blockchain itself, and what you can apply the blockchain mindset to other software projects. I think there is a better way to understand blockchain itself - to build a chain from scratch\n\n## This is a lovely demo for \n- A general Idea of how Blocks, Chain, Mining, Nodes, Transaction work with each others.\n- How to do them in Node\n- How to resolve basic conflicts in blockchain\n- How to use sha256 to do PoW(Proof of Work)\n- Not a demo for\n  - signatures\n  - address\n  - production setup\n  - making you a blockchain expert\n\n## Run it on your machine\n```\n$ npm clone https://github.com/amazingandyyy/blockchain-in-node.git\n$ npm i\n$ npm run dev // default on port 3000\n\n\u003c!-- to run more nodes --\u003e\n$ npm run nodes // default on port 3000\n$ npm run nodes 3000 // listening on port 3000\n$ npm run nodes 3001 // listening on port 3001\n$ npm run nodes 3002 // listening on port 3002\n```\n\n## HTTP Endpoints\n```\nGET /blockchain // see the link-list itself\nPOST /blockchain/mine // find the next special hash\nPOST /blockchain/body // add new data to the chain \n\nGET /blockchain/nodes // get a list of all nodes\nGET /blockchain/nodes/resolve // fetch the longest chain\nPOST /blockchain/nodes/register // add nodes urls\n```\n\n### There are many can be done: \nPlease feel free to [fork](https://github.com/amazingandyyy/blockchain-in-node#fork-destination-box), clone or send me [PR](https://github.com/amazingandyyy/blockchain-in-node/pulls)\n\n\n- use `socket` instead of http, to broadcast state\n- implement signature, public key, private key, user address system\n- proof of work and rewarding system\n- new PoW algorithm\n- location based sharding?\n- hide IPs / make it private!?\n- PoS, or other dBFT methods\n- dockernized, easy to run a node\n- interactive wrappers, helper libraries(python, golang, java)...\n\n\n### Author \nAndy Chen([amazingandyyy](https://github.com/amazingandyyy))\n\n### LICENSE\n[MIT](https://github.com/amazingandyyy/blockchain-in-node/blob/master/LICENSE)\n\n[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famazingandyyy%2Fblockchain-in-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famazingandyyy%2Fblockchain-in-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famazingandyyy%2Fblockchain-in-node/lists"}