Giter VIP home page Giter VIP logo

anbapdan / rec-platform-transactions Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 110 KB

๐Ÿ“ This Repository is a microservice called Transactions that enables payments using Hedera Hashgraph relateed to energy exchanges in a Peer-to-Peer Renewable Energy Community

JavaScript 1.81% Dockerfile 0.51% TypeScript 97.68%
grpc hedera-hashgraph hedera-sdk nestsjs prisma-orm renewable-energy-communities solidity typescript web3

rec-platform-transactions's Introduction

LinkedIn

Disclaimer

This microservice was necessary for me to graduate in the Master's Degree in Cybersecurity. If interested, check MSC Daniel Andrade to know more!

REC Platform - Transactions Microservice

The Renewable Energy Community Platform consists in a microservices API to enable and enhance Peer-to-Peer energy Transactions between Prosumers and consumers of a community.

This Repo is responsible for issuing transactions on Hedera Hashgraph, as well as creating new accounts and verifying newly created payments.

Why building a REC Platform using microservices:

  • The project was developed together with other devs
  • Changes in one particular module forced to shutdown/reboot the whole API.
  • This is part of a research program, therefore multiple experimental ideas, frameworks, and scripts were used.

(Back to Top)

Built With

To make the API work, these are the core features of the Gateway:

(back to top)

Getting Started

The Transactions microservice requires Gateway to be operational as well as the REC market microservice to convert its objects and issue transactions.

Note: The gRPC protos import is missing, therefore it will not work!

Prerequisites

To get it started:

  • npm
    npm install npm@latest -g

There is a secure communication between this microservice and the Market one, therefore ensure that a '.pem' certificate is stored as a secret (MarketCrt)! For more info check docker compose on REC Platform - Gateway

Installation

  1. Clone the repo
    git clone https://github.com/AnBapDan/REC-Platform-Transactions.git
  2. Install NPM packages
    npm install
  3. Enter the Profobuf repo in package.json on the dependencies tab
        "grpc-protos": "git+REPOSITORY",

(back to top)

Deployment

The all microservices structure is supposed to be deployed using Docker Swarm. Below are the steps to achieve it correctly.

  1. Create a network that hosts all the stack

    docker network create --driver=overlay --attachable RECNetwork
  2. Run every Dockerfile to create its image

    docker build -t <img_name>:<version>
  3. Deploy the whole Docker stack

    docker stack deploy -c docker-compose.yml RECNetwork

The commands below are auxiliary if you need to debug some microservice:

docker ps -f "label=com.docker.swarm.service.name=RECNetwork_gateway" --format "{{.ID}}"
docker stack services RECNetwork
docker service logs <service_name>
docker exec -it <HASH_name> command

Contact

Daniel Andrade - [email protected]

Project Link: https://github.com/AnBapDan/REC-Platform-Transactions.git

(back to top)

rec-platform-transactions's People

Contributors

anbapdan avatar

Watchers

 avatar

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.