https://github.com/linnovate/dfa
DAML/Distrubuted Flight Approval project
https://github.com/linnovate/dfa
Last synced: 8 days ago
JSON representation
DAML/Distrubuted Flight Approval project
- Host: GitHub
- URL: https://github.com/linnovate/dfa
- Owner: linnovate
- License: mit
- Created: 2021-08-11T07:06:31.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-20T20:49:10.000Z (over 3 years ago)
- Last Synced: 2025-07-01T18:52:07.996Z (3 months ago)
- Language: JavaScript
- Size: 86.3 MB
- Stars: 3
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Welcome to _Distrubuted Flight Approval_ (DFA)
## Overview
The DFA is intended to model collaberative / multi-partner-approval based workflows and make them accessible through the DAML UI and react components which are displayed and managed with Wordpress and Elementor.
## Usage
Use Makefile commands for development.
Use docker-compose for production.
Before you can run the application, you need to install the
[Node](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) package manager for JavaScript and [Daml](https://docs.daml.com/getting-started/installation.html).There are two steps to build the project.
First, we need to generate TypeScript code bindings for the compiled Daml model.
At the root of the repository, run:
```sh
cd daml-one/
daml build
daml codegen js .daml/dist/dfa-0.1.0.dar -o ./daml.js
```The latter command generates TypeScript packages in the `daml.js` directory.
Next, navigate to the `ui` directory and install the dependencies and build the app by running:
```sh
cp daml-one/daml.js ui/ -r
cd ui
npm i
npm run-script build
```The last step is not absolutely necessary but useful to check that the app compiles.
To start the application, go back do the main directory and start a Daml ledger:
```sh
cd daml-one/
daml start
```And to start the UI server open a new terminal and from the _ui_ directory run:
```sh
npm start
```When you see the message on the second terminal open the url shown.
## Uploading to damlhub
The dfa project has a test environment in damlhub - currently we need to upload the artifact files manually to damlhub
We build these artifacts in to the /target subdirectory```
# building daml
daml build -o target/create-daml-app.dar#building the ui
daml codegen js target/create-daml-app.dar -o ui/daml.js
cd ui && npm install && npm run-script build
zip -r ../target/create-daml-app-ui.zip build
```
Then go to damlhub and upload create-daml-app.dar and create-daml-app-ui.zip## Wordpress
So ow does wordpress fit in? We want to use wordpress to show and manage various react components that are connected to the json-api and to manage them with elementor### Starting wordpress
We use docker-compose tomanage the wordpress
run
```
docker-compose up -d
The wordpress is in http://localhost:8080
```