{"id":28374051,"url":"https://github.com/parse-community/parse-blockchain","last_synced_at":"2025-06-25T18:31:20.537Z","repository":{"id":37058110,"uuid":"402676534","full_name":"parse-community/parse-blockchain","owner":"parse-community","description":"Blockchain (Ethereum) dApps development made easy with Parse Server (alpha)","archived":false,"fork":false,"pushed_at":"2023-03-03T16:45:00.000Z","size":4918,"stargazers_count":37,"open_issues_count":47,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-06T01:05:52.029Z","etag":null,"topics":["api","blockchain","dapps","ethereum","graphql","hacktoberfest","parse","parse-server","rest","sdk"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/parse-community.png","metadata":{"funding":{"github":"parse-community","patreon":null,"open_collective":"parse-server","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null},"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}},"created_at":"2021-09-03T06:57:28.000Z","updated_at":"2024-06-17T12:52:37.000Z","dependencies_parsed_at":"2023-07-18T07:52:21.444Z","dependency_job_id":null,"html_url":"https://github.com/parse-community/parse-blockchain","commit_stats":{"total_commits":66,"total_committers":3,"mean_commits":22.0,"dds":0.303030303030303,"last_synced_commit":"5823e868f28e4f024b52f5e4dd2d2bc3acab3bff"},"previous_names":["parse-community/parse-server-blockchain"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/parse-community/parse-blockchain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parse-community%2Fparse-blockchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parse-community%2Fparse-blockchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parse-community%2Fparse-blockchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parse-community%2Fparse-blockchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parse-community","download_url":"https://codeload.github.com/parse-community/parse-blockchain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parse-community%2Fparse-blockchain/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260222455,"owners_count":22977020,"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","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":["api","blockchain","dapps","ethereum","graphql","hacktoberfest","parse","parse-server","rest","sdk"],"created_at":"2025-05-29T21:07:48.435Z","updated_at":"2025-06-25T18:31:20.530Z","avatar_url":"https://github.com/parse-community.png","language":"TypeScript","funding_links":["https://github.com/sponsors/parse-community","https://opencollective.com/parse-server"],"categories":[],"sub_categories":[],"readme":"![parse-repository-header](https://user-images.githubusercontent.com/5673677/139276658-d6fa5e86-da3e-446e-9daa-f717469d4c7a.png)\n\n---\n\n\u003ch2 align=\"center\"\u003e\n  Blockchain (Ethereum) dApps development made easy with \u003ca href=\"https://github.com/parse-community/parse-server\"\u003eParse Server\u003c/a\u003e\n\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  This mono repository contains packages that aim to simplify the development of blockchain dApps via \u003ca href=\"https://github.com/parse-community/parse-server\"\u003eParse Server\u003c/a\u003e auto-generated APIs. Currently, only Ethereum networks are supported.\n\u003c/p\u003e\n\n---\n\n- [Packages](#packages)\n- [How It Works](#how-it-works)\n- [Getting Started](#getting-started)\n  - [Running an Ethereum Development Network](#running-an-ethereum-development-network)\n  - [Creating the Project Folder](#creating-the-project-folder)\n  - [Deploying the Smart Contracts](#deploying-the-smart-contracts)\n  - [Running the Database](#running-the-database)\n  - [Running Parse Server](#running-parse-server)\n  - [Creating your first object](#creating-your-first-object)\n  - [Reading the object](#reading-the-object)\n- [Learn More](#learn-more)\n- [Feedback and Contribution](#feedback-and-contribution)\n\n## Packages \n\n| Package | Name | Version\n|--------|-----|------------|\n| [Blockchain](https://github.com/parse-community/parse-server-blockchain/tree/master/packages/parse-blockchain-base) | [@parse/blockchain-base](https://www.npmjs.com/package/@parse/blockchain-base) | [![NPM Version](https://badge.fury.io/js/%40parse%2Fblockchain.svg)](https://www.npmjs.com/package/@parse/blockchain-base) |\n| [Ethereum](https://github.com/parse-community/parse-server-blockchain/tree/master/packages/parse-blockchain-ethereum) | [@parse/blockchain-ethereum](https://www.npmjs.com/package/@parse/blockchain-ethereum) | [![NPM Version](https://badge.fury.io/js/%40parse%2Fethereum.svg)](https://www.npmjs.com/package/@parse/blockchain-ethereum) |\n\n## How It Works\n\nUsing these packages in aggregation to Parse Server, it is possible to easily create hybrid dApps in which part of the data is saved on blockchain and part of the data is saved on the cloud.\n\nParse Server generates the APIs that you need to save and read data on the cloud (PostgreSQL or MongoDB). When setting up these packages, it is possible to select which objects must also be saved on blockchain.\n\nParse Server saves a copy of the blockchain objects on cloud and make sure they are sent to special smart contracts (ready to deploy versions are included in these packages) via blockchain transactions. Parse Server stores the status of the blockchain transactions and their receipts.\n\nAt anytime it is possible to query data on cloud via Parse Server APIs (including the transactions receipts) and verify the data on blockchain via smart contracts.\n\nThe dApps frontend can easily integrate to the APIs, via [REST](https://docs.parseplatform.org/rest/guide/), [GraphQL](https://docs.parseplatform.org/graphql/guide/), or one of the technology specific [SDKs](https://parseplatform.org/#sdks).\n\n## Getting Started\n\n### Running an Ethereum Development Network\n\nYou will need an Ethereum development network. With [Ganache](https://github.com/trufflesuite/ganache), it can be easily done using the command below:\n\n```sh\nnpm install ganache-cli --global\nganache-cli --networkId 1000000000000 # it can be any id\n```\n\nGanache will automatically start a development Ethereum network on your local machine which will listen on port 8545 by default. Once it is done, it will also automatically create and print a set of test accounts with 100 development ETH each. Copy the address and the private key of one of them to use for your smart contracts deployment and execution.\n\n### Creating the Project Folder\n\nCreate a folder for your project and initialize the npm package:\n\n```sh\nmkdir my-project\ncd my-project\nnpm init\n```\n\nInstall the required packages:\n\n```sh\nnpm install express parse-server @parse/blockchain-base @parse/blockchain-ethereum web3 --save\n```\n\n### Deploying the Smart Contracts\n\nThe @parse/blockchain-ethereum package (installed on the previous step) contains all smart contracts that you need to deploy. We will use [Truffle](https://github.com/trufflesuite/truffle) for the deployment.\n\nFirst, you need to install Truffle:\n\n```\nnpm install truffle @truffle/hdwallet-provider --global\n```\n\nSecond, you need to create a `truffle-config.js` file in your project root folder with the following content:\n\n```js\nconst path = require('path');\nconst HDWalletProvider = require('@truffle/hdwallet-provider');\n\nmodule.exports = {\n  contracts_directory: path.resolve(__dirname, './node_modules/@parse/blockchain-ethereum/contracts'),\n  contracts_build_directory: path.resolve(__dirname, './node_modules/@parse/blockchain-ethereum/build/contracts'),\n  migrations_directory: path.resolve(__dirname, './node_modules/@parse/blockchain-ethereum/migrations'),\n  networks: {\n    parseserverblockchaindev: {\n      provider: () =\u003e\n        new HDWalletProvider(\n          'THE ACCOUNT PRIVATE KEY', // Copy to here the private key of one of your Ganache auto-generated accounts\n          'ws://127.0.0.1:8545'\n        ),\n      network_id: '1000000000000', // The same network id that you used on Ganache\n      from: 'THE ACCOUNT ADDRESS', // Copy to here the address of one of your Ganache auto-generated accounts\n    },\n  },\n};\n```\n\nNow, you are ready to deploy your smart contracts. From your project root folder, run:\n\n```sh\ntruffle migrate --config ./truffle-config.js --network parseserverblockchaindev\n```\n\nTruffle will deploy the smart contracts to the development Ethereum network and will print out two contract addresses (one for Parse and another for Migration). Please copy the Parse contract address.\n\n### Running the Database\n\nWe will use MongoDB as the database. An easy way to run MongoDB for development purposes is via [mongodb-runner](https://github.com/mongodb-js/runner):\n\n```sh\nnpm install mongodb-runner --global\nmongodb-runner start\n```\n\nmongodb-runner will automatically start a development MongoDB instance on your local machine which will listen on port 27017 by default.\n\n### Running Parse Server\n\nCreate an `index.js` file in your project root folder with the following content:\n\n```js\nconst express = require('express');\nconst { default: ParseServer } = require('parse-server');\nconst { SimpleMQAdapter, bridge, worker } = require('@parse/blockchain-base');\nconst { EthereumAdapter } = require('@parse/blockchain-ethereum');\nconst Web3 = require('web3');\n\nconst app = express();\n\nconst parseServer = new ParseServer({\n  serverURL: 'http://localhost:1337/parse',\n  appId: 'someappid',\n  masterKey: 'somemasterkey',\n  databaseURI: 'mongodb://localhost:27017/parseserverblockchaindev',\n});\n\nconst mqAdapter = new SimpleMQAdapter();\n\nconst web3 = new Web3('ws://127.0.0.1:8545');\nweb3.eth.accounts.wallet.add(\n   'THE ACCOUNT PRIVATE KEY', // Copy to here the private key that you used to deploy the contracts\n);\n\nbridge.initialize(\n  ['SomeBlockchainClass'], // Pass here the name of the classes whose objects you want to send to blockchain\n  mqAdapter\n);\nworker.initialize(\n  new EthereumAdapter(\n    web3,\n    'THE CONTRACT ADDRESS', // Copy to here the Parse contract address that you copied after deploying it\n    'THE ACCOUNT ADDRESS', // Copy to here the address that you used to deploy the contracts\n  ),\n  mqAdapter\n);\n\napp.use('/parse', parseServer.app);\n\napp.listen(1337, () =\u003e {\n  console.log('REST API running on http://localhost:1337/parse');\n});\n```\n\nFrom your project root folder, start the server:\n\n```sh\nnode index.js\n```\n\nA Parse Server instance will start on your local machine listening on port 1337.\n\n### Creating your first object\n\nYou can easily create an object using the REST API:\n\n```sh\ncurl -X POST \\\n-H \"X-Parse-Application-Id: someappid\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\"someField\":\"some value\"}' \\\nhttp://localhost:1337/parse/classes/SomeBlockchainClass\n```\n\nThis object will be sent to Parse Server, which will store it on MongoDB and send to the Ethereum development network.\n\n### Reading the object\n\nYou can now query your objects using the REST API to see the status changes and the transaction receipt once it is confirmed.\n\n```sh\ncurl -X GET \\\n-H \"X-Parse-Application-Id: someappid\" \\\nhttp://localhost:1337/parse/classes/SomeBlockchainClass\n```\n\n## Learn More\n\nLearn more about Parse Server and its capabilities:\n\n[Parse Platform Web-Site](https://parseplatform.org/)\n\n[Parse Server Repository](https://github.com/parse-community/parse-server)\n\n[Parse Community](https://community.parseplatform.org/)\n\n## Feedback and Contribution\n\nThis is a work in progress repository. Please let us know your feedback via issues and feel free to open a PR to improve any code or documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparse-community%2Fparse-blockchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparse-community%2Fparse-blockchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparse-community%2Fparse-blockchain/lists"}