Skip to content

alastria/alastria-identity-entity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alastria Identity Entity

This is an example of Entity in Alastria. You can try the demo online accessing to Entity Frontend.

This repository contains two main dockers, entityBackend and entityFrontend.

This is an example of a Entity with Alastria.

Components

entityBackend

Backend that interacts with the Alastria Identity Lib. This library interacts with the Smart Contracts from Alastria.

entityFrontend

Frontend of the Entity.

Mongo Database

Data Base of the entity.

Mongo-Express

A tool to monitorize the mongo database.

Notes

If you want to develop, first of all you need to have the database started, to do this you have to run this command in the directory of alastria-identity-entity.

docker-compose up -d mongo-express

How to run the Entity

Requirements

You need to install npm, docker and docker-compose.

Replacements

In the file node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js

replace in the last line node: false

with node: { crypto: true, stream: true, buffer: true }

Install entityFrontend

First of all, you need to install some packages for the Frontend to work. In order to do that, move to the frontend directory cd entityFrontend, then:

npm install

After that, build and compile the project:

npm run build --configuration=docker

Run the Entity

Before running the Entity, you can change the blockchain node IP in the file docker-compose.yaml. At the moment, you can choose one of this (only one):

- NODE_ENDPOINT=alastria
#- NODE_ENDPOINT=localEndpoint

In the example above, a ganache will run locally, so you will need to deploy the smart contracts manually.

Finally, just run the dockers. For this step, you need to stay in the root directory:

docker-compose up -d