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.
Backend that interacts with the Alastria Identity Lib. This library interacts with the Smart Contracts from Alastria.
Frontend of the Entity.
Data Base of the entity.
A tool to monitorize the mongo database.
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
You need to install npm
, docker
and docker-compose
.
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 }
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
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