Skip to content

๐Ÿ“ This Repository is a Gateway of a Renewable Energy Community Platform API, built using microservices to enable energy exchanges and their payments

Notifications You must be signed in to change notification settings

AnBapDan/REC-Platform-Gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

LinkedIn

REC Platform - Gateway API

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 contains the entrance point of all the API requests.

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 Gateway does not work by itself, it needs the other microservices to work.

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

Prerequisites

To get it started:

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repo
    git clone https://github.com/AnBapDan/REC-Platform-Gateway.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 - dani.andrade@ua.pt

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

(back to top)

Acknowledgments

Below are the other devs that helped during the development of the RECPlatform ๐Ÿ˜„

(back to top)

About

๐Ÿ“ This Repository is a Gateway of a Renewable Energy Community Platform API, built using microservices to enable energy exchanges and their payments

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published