# @tlaukkan/aframe-dataspace

> A-Frame Dataspace

Latest version **0.0.13** (published 2018-12-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install @tlaukkan/aframe-dataspace
pnpm add @tlaukkan/aframe-dataspace
yarn add @tlaukkan/aframe-dataspace
bun add @tlaukkan/aframe-dataspace
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.13 |
| Published | 2018-12-09 |
| First published | 2018-10-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 21 |
| Unpacked size | 219.7 KB |
| Known vulnerabilities | 0 (+5 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Tommi Laukkanen |
| Maintainers | tlaukkan |
| Keywords | aframe, dataspace |

## Links

- npm: https://www.npmjs.com/package/@tlaukkan/aframe-dataspace
- Repository: https://github.com/tlaukkan/aframe-dataspace
- Homepage: https://github.com/tlaukkan/aframe-dataspace#readme
- Issues: https://github.com/tlaukkan/aframe-dataspace/issues
- npm.io page: https://npm.io/package/@tlaukkan/aframe-dataspace

## Dependencies (21)

- [uuid](https://npm.io/package/uuid.md) ^3.2.1
- [config](https://npm.io/package/config.md) ^1.30.0
- [xml-js](https://npm.io/package/xml-js.md) ^1.6.8
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.371.0
- [ts-node](https://npm.io/package/ts-node.md) ^7.0.1
- [websocket](https://npm.io/package/websocket.md) ^1.0.26
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.21
- [typescript](https://npm.io/package/typescript.md) ^3.1.1
- [@types/node](https://npm.io/package/@types/node.md) ^10.11.4
- [@types/uuid](https://npm.io/package/@types/uuid.md) ^3.4.4
- [es6-promise](https://npm.io/package/es6-promise.md) ^4.2.5
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.4.0
- [@tlaukkan/tsm](https://npm.io/package/@tlaukkan/tsm.md) ^0.8.5
- [console-stamp](https://npm.io/package/console-stamp.md) ^0.2.6
- [@types/websocket](https://npm.io/package/@types/websocket.md) 0.0.40
- [isomorphic-fetch](https://npm.io/package/isomorphic-fetch.md) ^2.2.1
- [@types/mime-types](https://npm.io/package/@types/mime-types.md) ^2.1.0
- [@types/es6-promise](https://npm.io/package/@types/es6-promise.md) ^3.3.0
- [@types/jsonwebtoken](https://npm.io/package/@types/jsonwebtoken.md) ^8.3.0
- [@types/console-stamp](https://npm.io/package/@types/console-stamp.md) ^0.2.32
- [typescript-collections](https://npm.io/package/typescript-collections.md) ^1.3.2

## Recent versions

- 0.0.13 (latest) — 2018-12-09
- 0.0.12 — 2018-12-09
- 0.0.11 — 2018-12-09
- 0.0.10 — 2018-12-08
- 0.0.9 — 2018-10-27
- 0.0.8 — 2018-10-12
- 0.0.7 — 2018-10-07
- 0.0.6 — 2018-10-07
- 0.0.5 — 2018-10-06
- 0.0.4 — 2018-10-04
- 0.0.3 — 2018-10-04
- 0.0.2 — 2018-10-04
- 0.0.1 — 2018-10-04

## README

# Reality Space Readme

This is work in progress...

code-reality framework enables building networked extended reality (XR) experiences with A-Frame.

reality-space servers provide a shared space to store and transmit scene data between code-reality clients.

# Build

## Docker
On windows prepare docker tools:
docker-machine env

Build docker image:

docker build -t reality-space .

## Test image
docker run --read-only -p 0.0.0.0:8080:8889 --env CLUSTER_CONFIGURATION_URL=https://cdn.jsdelivr.net/gh/tlaukkan/reality-space@0.0.28/config/public-test-cluster.json --env PROCESSOR_URL=wss://rs-test-processor-0-0-0.herokuapp.com/ --name reality-space-processor reality-space:latest
docker stop reality-space-processor
docker rm reality-space-processor

# Testing

## Default cluster (for testing)

### Test users

#### Admin

Issuer: test-issuer
ID: test-admin
Name: Test Admin

Id Token with 100 years life time: 

eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0LWlzc3VlciIsImlkIjoidGVzdC1hZG1pbiIsImp0aSI6IjhlYzg5ODA5LTM1ZjYtNGM4ZS04NWJjLWM3NTNjMDZjODk3OSIsIm5hbWUiOiJUZXN0IEFkbWluIiwiZXhwIjo0Njk3OTM4ODUzLCJpYXQiOjE1NDQzMzg4NTN9.EZUj65lAwbNE9iUeXZLNWHlRq23OK5iA8Vul51abuejHDuc6IhuIZCswsUIdPxHGkOsvy6FSm2su5ePpIs1xO1gwQ_u-Nc_Po2BNBqwqIs-sDn9qNVD13Nd5W7_SzxeEWIm7pQft6YP9uvbVV8d-8Nbz8U8KYA5DPLZGodsCQotRL1aBZPbQdc6QB9-rMr2YqpXPQGxAQjjArnl97QPRTig8UxfA9zQWecdNYRXsxtfNFlAnM76uPjN00er4omCxGrWG8vhAAiIQDchwQ7IndRnTyhjybNyWLS2siONFXQ7azfcPa17cM-s_mRfzw4nGZnhEpbYGz1VfVylFC4ivyg

#### Modifier

Issuer: test-issuer
ID: test-modifier
Name: Test Modifier

Id Token with 100 years life time: 

eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0LWlzc3VlciIsImlkIjoidGVzdC1tb2RpZmllciIsImp0aSI6IjcwMTQ2MzdjLWMzYTItNGI3NC04YmExLTZiZDMxN2JhZGE0NSIsIm5hbWUiOiJUZXN0IE1vZGlmaWVyIiwiZXhwIjo0Njk3OTM4OTkzLCJpYXQiOjE1NDQzMzg5OTN9.PgjRUGEWCL4OEk8C-zMcZIeBpPM_ky-dDeX_IPAs_C7qR38-fEPzXLFz90IyYxxSLY4-Imwr88Ir65b1cA_eMx6B_8PGAhJ__V4uppBtSOfonlZ402f47kSrUkLZ--IrbDQhM-O1F0cWNtrXTEQXPepsmzMPtclL993RVlJTmyXk-yjbiSLTzp4CA2O3DsLUSXeD1dO58j1rPkMfhLez1zjs7CeWUdzBuzHav0t-hAfWMZTIDywm2UZphAqu724WGbeL4eLP--QBimnyqn9J266u34BmtMSID7VZUWSzWAMteBQVNrOfFZrqS_NkA1jTbmdPO-VkfPmOlGJlCoFN1w

#### User

Issuer: test-issuer
ID: test-user
Name: Test User

Id Token with 100 years life time: 

eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0LWlzc3VlciIsImlkIjoidGVzdC11c2VyIiwianRpIjoiYjAxMmFmYjgtNTVlOS00Y2QyLWE4OTctYjk0YmI2NmZlMWJmIiwibmFtZSI6IlRlc3QgVXNlciIsImV4cCI6NDY5NzkzOTA5OCwiaWF0IjoxNTQ0MzM5MDk4fQ.bSah4e0TON77zeuVTrZAAwVz-L4G9YZYjlUsXs7nfB4LjfR7CrWHSj1blNUH9jbPCBjDb06BAigMOiiDuN0Uqh-q7m68NgMh2devGYTaeo2eN8onkehkk0OMd4i72MFtETBwt1kkBdVrs5miVfgu4iDJ2j4XICSHR_iT-_Gl92WYOmpMCxQaW3AqLtW9zchtScjSSkSYpXOSWohssNBqOGNKtw4rVtZpJ8SZLFBZJwyRJbcLdjwtmuAz6PVK90X3E4kdDtDkzh6i3Zw81VOmQ-pN1TR0VUnOqd99HntYpaj0m-xgwoQfEsFTTqZ7tflMGD3cpVCQ0Ekv39rWVWc7XA

#### Viewer

Issuer: test-issuer
ID: test-viewer
Name: Test Viewer

Id Token with 100 years life time: 

eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0LWlzc3VlciIsImlkIjoidGVzdC12aWV3ZXIiLCJqdGkiOiJhZmZkMGIxNS0wZWYyLTRjYjctYjQxMy1lY2VmZDRkNjA1ZjkiLCJuYW1lIjoiVGVzdCBWaWV3ZXIiLCJleHAiOjQ2OTc5MzkxNTgsImlhdCI6MTU0NDMzOTE1OH0.cSebSzQXijB6_TS7K_av1B2DV8ItpWvtMcNjZDgJkx8f6zF3BbGC3B_IHegJl0PoHaOriePAlocfCmUe9hvAVXyCuk_3RZjUOtxGbN7qH2MqHylPnxBOEaZPSIoOh_QC8kRm6GlpUJhrQEbRf7kutcjBEmPKBk732blpSwlfA7dvDMPDeOTnwzCQmksIQ7SsR2dr_AxSPzEUN5nEywgdfQzNxlQcZ6fP0f3xUDihF2SaDkp3jX3nJiTixhnMV2ch1mLzP646k1g_ppVpwZOXZ_QxUtWeyhyp5V7DeXsSwOFotTxnTigDo6sWLcFeOITJaECtLnhBV__rKzdg8VcVUw

#### Stranger

Issuer: test-issuer
ID: test-stranger
Name: Test Stranger

Id Token with 100 years life time: 

eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0LWlzc3VlciIsImlkIjoidGVzdC1zdHJhbmdlciIsImp0aSI6Ijg5MWViMjg3LTI0YWYtNGM0MC05NTYwLTVmZGNlN2U3ZGQzNCIsIm5hbWUiOiJUZXN0IFN0cmFuZ2VyIiwiZXhwIjo0Njk3OTM5MTk2LCJpYXQiOjE1NDQzMzkxOTZ9.Ry8XZ_rwxZlRdC1AtZAb1BI195kHqt_1mIOcl4dX72z1FdSYr3XkMOvh28MNt6K4mTxY2Qj5g4yxQXjChG03MaP0rC5c66PrJ35IpcSaZjX1u41cQr0HflY-iEPtFanz63uE3hFu1DaqivyUbI88M7oFy5MTzkuKe4uJukoVylsp89rtJR-iyDuBrDskg7GjJTEDOHYub1_5roqpODPaNNlkhwBUswDeucg0kDABbVq1Z7phwdrYnj-4b_TUmvR5rINaQwFlCW2I0iC1-xH6CFahSmtXogObjR5Xe3uEal7Dk92Is_gbaU7k6hIPnqe-qxep5NQQ500q-Ak8MzRxOQ

#### Anonymous

Issuer: test-issuer
ID: anonymous
Name: anonymous

Id Token with 100 years life time: 

eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0LWlzc3VlciIsImlkIjoiYW5vbnltb3VzIiwianRpIjoiZDU5Y2Q1NTktNTQ5ZS00MThhLWEzMzMtZWZkYmYxMmY3OWNmIiwibmFtZSI6ImFub255bW91cyIsImV4cCI6NDY5NzkzOTI2OSwiaWF0IjoxNTQ0MzM5MjY5fQ.i179C6fgMMlRtyaoiQZLRlCc7xHU4DGfchzdrKxiB50zD50XzlFiztOUdZIVXTsX2TttHm1jKnw0iF4Vjj6BpGvn8IFggrq5qzjUNO_unFKSHNhLNjXHln7QOIJfJqxfg7feKYswOm0uEEW181fckDsRN0txWvXr9LUGlw1H5bg18G64R1eXXdwCe7lGo7eSNgk3Z5XttrePZl1YJP1wQzneJvFYonjQFEiLAteMgv1k4R4YTnSkMy4ROJYnwvy5WH3NmREWhUdEfIRf6m-5qZ0qW-VfYRKchUU3VHViQ41c8uH1dRwaBjkjzfWxnrf_veI-96oRAfgSS9hpcmNbLQ

## Karma

karma start karma.config.js  --browsers ChromeHeadless

# Publish package

## First publish

---
    npm publish --access public
---

## Update

---
    npm version patch
    npm publish
---hewr

# Deployment

## Deploying processor and storage to Heroku

### Preparation 

* Checkout this project from github.
* Install heroku cli.

### Commands

    git clone https://github.com/tlaukkan/reality-space.git
    cd reality-space
    heroku create --region eu <your-heroku-account>-reality-space

    git push heroku master
    heroku logs -t
    heroku logs -t --dyno=web

To setup storage cluster configuration with AWS S3

    heroku create --region eu rs-test-storage
    heroku config:set CLUSTER_CONFIGURATION_URL=https://cdn.jsdelivr.net/gh/tlaukkan/reality-space@0.0.31/config/public-test-cluster.json 
    heroku config:set STORAGE_URL=https://rs-test-storage.herokuapp.com/api/ 
    heroku config:set STORAGE_TYPE=S3
    heroku config:set AWS_REGION=eu-central-1
    heroku config:set AWS_PUBLIC_BUCKET=dataspace-eu
    heroku config:set AWS_ACCESS_KEY_ID=
    heroku config:set AWS_SECRET_ACCESS_KEY=
     
To setup main processor cluster configuration 

    heroku create --region eu rs-test-processor
    heroku config:set CLUSTER_CONFIGURATION_URL=https://cdn.jsdelivr.net/gh/tlaukkan/reality-space@0.0.31/config/public-test-cluster.json
    heroku config:set PROCESSOR_URL=wss://rs-test-processor.herokuapp.com/

To setup 0-0-0 processor cluster configuration 

    heroku create --region eu rs-test-processor-0-0-0
    heroku config:set CLUSTER_CONFIGURATION_URL=https://cdn.jsdelivr.net/gh/tlaukkan/reality-space@0.0.31/config/public-test-cluster.json
    heroku config:set PROCESSOR_URL=wss://rs-test-processor-0-0-0.herokuapp.com/


### Health check
Processor and storage provide 200 OK healthcheck at URL path: /health.

Example: http://127.0.0.1:8080/health

---
_Source: https://npm.io/package/@tlaukkan/aframe-dataspace · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
