Skip to content

Commit

Permalink
Merge pull request #212 from datasci4health/faguim-update-readme
Browse files Browse the repository at this point in the history
Faguim update readme
  • Loading branch information
lealfp authored Sep 2, 2020
2 parents 2d6de22 + 9268b6f commit 4bde7a6
Showing 1 changed file with 34 additions and 80 deletions.
114 changes: 34 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

# Harena Space
Web-based client platform that includes: authoring environment, player engine and the Versum narrative scripting language translator.

Web-based front-end module of [Harena](https://github.com/datasci4health/harena) environment.

Harena is available at https://harena.ds4h.org/.

<!-- platform that includes: authoring environment, player engine and the Versum narrative scripting language translator. -->

<!--
## Table of Contents
* [Getting Started](#getting-started)
Expand All @@ -16,8 +22,7 @@ Web-based client platform that includes: authoring environment, player engine an
* [Option 3: Running locally](#option-3-running-locally)
* [Digital Content Component Playground](#digital-content-component-playground)
* [Directory Map](#directory-map)

<!-- * [System Requirements](#system-requirements)
* [System Requirements](#system-requirements)
* [For running as Docker containers](#for-running-as-linuxwindows-docker-containers)
* [For running locally](#for-running-locally)
* [Configuration](#configuration)
Expand All @@ -29,20 +34,13 @@ Web-based client platform that includes: authoring environment, player engine an

## Getting Started

### Option 1: Access our instance running at cloud

The link below starts the authoring environment running in our cloud
We provide a docker container to locally run `harena-space` code. Containers guarantee the required minimal configuration to run the code. Read [docker](https://docs.docker.com/install/) e [docker-compose](https://docs.docker.com/compose/install/) documentations to install docker and learn further about containers.

* http://cloud.lis.ic.unicamp.br/case-notebook/v1/web/author/author.html
> In order to execute `docker` without `sudo`, read this link: https://docs.docker.com/engine/install/linux-postinstall/, which shows another optional and valuable configurations in docker environment.
### Option 2: Running as Docker containers
### Instructions (for Linux users)

#### For developers

If you want to contribute to harena-space, we provide a Docker container to develop environments.
This is the recomended way of run the harena-manager code, since it guarantees the default configuration of the development environment, dispensing a manual configuration.

Clone the harena manager repository, get into it, checkout development branch, and build the manager docker image:
Clone harena-manager repository, get into it, checkout development branch, and build manager docker image:
```bash
git clone https://github.com/datasci4health/harena-manager.git
cd harena-manager
Expand All @@ -53,100 +51,56 @@ docker build . -t manager
cd ..
```

Clone the harena space repository, get into it and checkout development branch, and build the space docker image:
Clone harena-space repository, get into it, checkout development branch and pull the latest code version:
```bash
git clone https://github.com/datasci4health/harena-space.git
cd harena-space
git checkout -b development
git pull origin development
docker build . -t space

```

Then, up the docker<sup>1</sup> container:

Start up the docker container:
```bash
docker-compose -f docker-compose-dev.yml up
```
<sub><sup>1</sup>Make sure you have [docker](https://docs.docker.com/install/) and [docker-compose command](https://docs.docker.com/compose/install/) already installed on your system.</sub>

After starting the container, go to http://localhost:10010/author to see the authoring environment.

If you want to get the command line of the container, then run the command:

Wait for some 5 minutes, then Press `Ctrl+c` to stop the container. Then, re-start the container:
```bash
docker exec -it harena-space_harena-space_1 bash
docker-compose -f docker-compose-dev.yml up
```

#### Just run the docker container

If you do not want get the code, just run the docker container, then :
Once the start up process is done, access http://localhost:10010/ to check if the system is working.

If you want to get the command line of the container, then run the command:
```bash
docker-compose --url https://github.com/datasci4health/case-notebook/blob/master/docker-compose-dev.yml up
```

After starting the container, go to http://localhost:10010/author to see the authoring environment.

### Option 3: Running locally
Install nodejs and npm:
```
# updating and installing curl
sudo apt-get update && sudo apt-get install -y curl
# installing/updating nodejs/npm LTS
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs npm gcc g++
```

Update npm, install packages and run adonisjs:

docker exec -it harena-space_harena-space_1 bash
```
sudo npm i npm
# installing adonis cli
sudo npm i -g @adonisjs/cli

cd src/adonisjs
cp .env.example .env
## Contributing

# installing npm packages
npm install
### Branch organization
* `master`:
* The code used by our production cloud server: https://harena.ds4h.org/
* Protected. Must use _pull request_ to merge evolutions from _development_ branch
* `development`:
* The latest code contaning the most recent updates made by the development team
* [Changelog file](https://github.com/datasci4health/harena-space/blob/development/CHANGELOG.md) show unreleased features which will be merged into `master` from `development` branch in the next release
* Version running at http://harena.ds4h.org/development .
* Protected. Must use _pull request_ to merge new features.

# running adonis
adonis serve --dev
```
Go to http://127.0.0.1:3333/author/author.html
## Change log

Release updates can be found at [CHANGELOG.md file](https://github.com/datasci4health/harena-space/blob/development/CHANGELOG.md).

---
## Harena Technologies

# References and Playgrounds

## Versum Translator
### Versum Translator

Versum [Syntax and Object Representation](https://github.com/datasci4health/harena-docs/blob/master/versum/syntax.md).

Learn how the Versum translator works and its correspondent output in Versum Object Representation as well as HTML in the [Translator Playground](https://ds4h.org/harena-space/src/adonisjs/public/translator/playground/).

## Digital Content Components
### Digital Content Components

Digital Content Components [Reference and Examples](http://datasci4health.github.io/harena-space/src/adonisjs/public/dccs/).

Learn and try to instantiate and customize Digital Content Components (DCCs) at the [DCC Playground](http://datasci4health.github.io/harena-space/src/adonisjs/public/dccs/playground/).


# Directory Map

* **author** - Front-end of the authoring environment that runs in the client side. The `author.html` plus the `js/index.js` files are the main modules. The Javascript files of the module are in the `[js]` directory.

* **dccs** - Digital Content Components (DCCs) library. The authoring environment and the generated cases use web components to execute active web tasks, e.g., buttons, animations, inputs, etc. These web components follow the DCC standard and are stored in this directory.

* **infra** - Contains infrastructure related modules, which are shared by the Author and Player platforms -- e.g., the bus service.

* **lib** - External javascript libraries adopted by both platforms (author and player).

* **player** - Kernel of the HTML cases player. This kernel is used by the `translator` module to produce the final HTML version of the cases, which have the player kernel inside them.

* **translator** - Translates the markdown document of a case to the final case executed in the player using HTML, CSS, and Javascript. In the process, it produces an intermediary object representation of the case.

0 comments on commit 4bde7a6

Please sign in to comment.