Skip to content

this repository contains the source code of the ACTUS Demo App - a lightweight web-application showcasing the ACTUS standards

License

Notifications You must be signed in to change notification settings

martini-source/actus-webapp

 
 

Repository files navigation

Actus demo web app

This demo will show you a simple application of the actus-core library to evaluate demo contracts.

Getting started

These instructions will get you a copy of the demo up and running on your local machine for testing purposes.

Requirements

  • java: 8(+)
  • mongodb: 5(*)
  • Node
  • npm
  • maven: 3(+)
  • gradle: 11(+)
  • actus-core 1.0 (+)

Build the actus-core library

  • Request an auth-token for access to the actus-core library through Actusfrf.org.
  • Build actus-core dependency and add to your local maven repository

Linux:

# actus-core/
mvn clean install

Windows:

# actus-core/
mvn clean install

Set up local environment

First, clone the actus-webapp repository than continue with the steps for your os.

Linux:

Start services and set up the database for running the app locally by running the start script in your terminal (needs sudo privileges)

# actus-webapp/
sudo sh ./scripts/start.sh

Windows:

  • Install MongoDB as a service.
  • Add the MongoDB bin folder to the PATH environment variable.
  • On installation nodejs will add itself to the PATH environment variable. If npm can't be run in PowerShell or CMD add it to the PATH variable.

Start services and set up the database for running the app locally by running the start script in your terminal

# actus-webapp/
.\scripts\start.bat

Build and run the app

Build and run the app through the following commands in your terminal

Linux:

# actus-webapp/
chmod +x gradlew
./gradlew build
./gradlew bootRun

Windows:

# actus-webapp/
.\gradlew.bat build
.\gradlew.bat bootRun

Yey, you made it to the first level - the backend to the ACTUS App is now running!

Test REST endpoints

In a fresh terminal execute the following commands (Linux and Windows)

# Fetch demo data for PAM contract
curl -i -H "Accept: application/json" localhost:8080/demos/meta/PAM

Build and run the frontend

Welcome to level 2! Now you are going to build and run the frontend to the ACTUS App. Note that the instructions in this step work for both Linux and Windows.

First, navigate to the frontend root folder

# /actus-webapp
cd ./frontend

Then, install the NPM packages required to build and run the frontend. This process can take a while.

# /frontend
npm install

Finally, build and start the frontend

# /frontend
npm run build
npm start

Now, open your browser and the app through url http://localhost:3000.

About

this repository contains the source code of the ACTUS Demo App - a lightweight web-application showcasing the ACTUS standards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 70.6%
  • Java 19.5%
  • CSS 5.4%
  • HTML 2.5%
  • R 1.4%
  • Shell 0.3%
  • Batchfile 0.3%