Skip to content

Hybrid real-estate app with blockchain and Ethereum smart contracts

License

Notifications You must be signed in to change notification settings

kopylash/blockchain-real-estate-v1

Repository files navigation

Blockchain real-estate app

Proof of concept of a hybrid real-estate app with blockchain and Ethereum smart contracts.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

You need Node.js >= 8.0.0.

Install Truffle

npm install -g truffle

Install Ganache or ganache-cli to run local Ethereum blockchain.

npm install -g ganache-cli

Installing

Clone the repo

git clone https://github.com/kopylash/blockchain-real-estate-v1.git

Install dependencies

npm install

Database

We use Sequelize for database manipulation. Project is preconfigured to use PostgreSQL. To connect to the database setup environmental variable DATABASE_URL in format:

DATABASE_URL = "postgres://<user>:<password>@<host>:<port>/<database_name>"

IMPORTANT: Postgres should have POSTGIS extension installed. And you should enable it in your database by running:

CREATE EXTENSION POSTGIS;

Database is automatically synchronized with Models definition.

Run

Before starting the app start local ethereum blockchain with Ganache. For this either open Ganache app or run:

npm run start:eth

NOTE: we use next mnemonic for development purposes, some configs are predefined.

candy maple cake sugar pudding cream honey rich smooth crumble sweet treat

Compile smart contracts.

cd ethereum/
truffle compile

Deploy the contracts onto your network of choice (default "development"). Check Truffle docs for details.

truffle migrate

Then run server with

npm start

API

The complete API reference is published to Postman. You can import it and use for testing.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Hybrid real-estate app with blockchain and Ethereum smart contracts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published