• Stars
    star
    535
  • Rank 82,940 (Top 2 %)
  • Language
    TypeScript
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Monorepo containing all the main components of Streamr Network.

Streamr

Network

Monorepo containing all the main components of Streamr Network.

Table of Contents

Packages

User-Facing

Internal

NPM scripts

Node.js 16.13.x is the minimum required version. Node.js 18.12.x, NPM 8.x and later versions are recommended.

The monorepo is managed using npm workspaces.

Installation on an Apple Silicon Mac requires additional steps, see install-on-apple-silicon.md.

Important: Do not use npm ci or npm install directly in the sub-package directories.

Bootstrap all sub-packages

The go-to command for most use cases.

To install all required dependencies and build all sub-packages (linking sub-packages together as needed):

# from top level
npm run bootstrap

Bootstrap a single sub-package

To install the required dependencies and build a specific sub-package:

# from top level
npm run bootstrap-pkg --package=$PACKAGE_NAME

Install dependencies only

To only install required dependencies and link sub-packages together (and skip build phase):

# from top level
npm ci

Build

To build all sub-packages:

# from top level
npm run build

Build a sub-package

To build a specific sub-package:

# from top level
npm run build --workspace=$PACKAGE_NAME

Clear caches and built files

To clear all caches and remove the dist directory from each sub-package:

# from top level
npm run clean-dist

Clean all

To removes all caches, built files, and node_modules of each sub-package, and the top-level node_modules:

# from top level
npm run clean

Add a dependency into a sub-package

Manually add the entry to the package.json of the sub-package and run npm run bootstrap-pkg $PACKAGE_NAME.

Alternatively, run:

npm install some-dependency --workspace=$PACKAGE_NAME

List active versions & symlinks

Check which sub-packages are currently being symlinked.

# from top level
npm run versions

This lists sub-packages & their versions on the left, linked sub-packages are columns. If the package on the left links to the package in the column, it shows a checkmark & the semver range, otherwise it shows the mismatched semver range and prints a warning at the end. It prints the version ranges so you can double-check that they're formatted as you expect e.g. ^X.Y.Z vs X.Y.Z

image

Environment variables

Variable Description Packages
BROWSER_TEST_DEBUG_MODE Leaves the Electron window open while running browser tests utils, proto-rpc, dht, network-node, client
STREAMR_DOCKER_DEV_HOST Sets an alternative IP address for streamr-docker-dev in end-to-end tests client, broker
LOG_LEVEL Adjust logging level all
DISABLE_PRETTY_LOG Set to true to disable pretty printing of logs and print JSONL instead all
LOG_COLORS Set to false to disable coloring of log messages all
NOLOG Set to true to disable all logging all
NODE_DATACHANNEL_LOG_LEVEL Adjust logging level of node-datachannel library network-node
BUNDLE_ANALYSIS Whether to produce a bundle analysis when building client package for browser client (compile time)
STREAMR__BROKER__ Wildcard set of variables used to configure broker broker

Release

utils, test-utils, protocol, network-tracker, network-node, client, cli-tools

All the above packages are released at the same time.

  1. git checkout main && git pull
  2. (skip if beta) Read CHANGELOG, decide new version, and edit file.
  3. ./update-versions.sh <SEMVER> E.g. ./update-versions.sh 7.1.1
  4. npm run clean && npm install && npm run build && npm run versions
    • Ensure output does not contain yellow or red markers
  5. Add files to staging git add . -p
  6. ./release-git-tags.sh <SEMVER> E.g. ./release-git-tags.sh 7.1.1
  7. Wait for pushed commit to pass CI validation
  8. Publish packages ./release.sh <NPM_TAG>
    • Use argument beta if publishing a beta version
    • Use argument latest if publishing a stable version
  9. Update client API docs if major or minor change:
cd packages/client
npm run docs
aws s3 cp ./docs s3://api-docs.streamr.network/client/vX.Y --recursive --profile streamr-api-docs-upload

broker

Broker is released independently of other packages because it follows its own versioning for the time being.

git checkout main && git pull
cd packages/broker
# Read CHANGELOG.md, decide new version, and edit file
npm version <SEMVER_OPTION>
git add package.json ../../package-lock.json CHANGELOG.md
git commit -m "release(broker): vX.Y.Z"
git tag broker/vX.Y.Z
git push --atomic origin main broker/vX.Y.Z

npm run build
npm publish

Docker release

After pushing the broker tag, GitHub Actions will build and publish the Docker image automatically if tests pass.

Tag latest

GitHub Actions will not update the latest tag. This must be done manually. Keep in mind that latest should always refer to the latest stable version.

To update latest do the following.

  1. Remove potentially existing latest tag locally with docker manifest rm streamr/broker-node:latest

  2. Find out the sha256 digests of both the amd64 and arm64 builds for a vX.Y.Z tag. This can be done via command-line docker buildx imagetools inspect streamr/broker-node:vX.Y.Z or you can check this from docker hub website under https://hub.docker.com/r/streamr/broker-node/tags.

  3. Then we shall create the manifest by running the below. Remember to replace <SHA-AMD64> and <SHA-ARM64> with real values.

docker manifest create streamr/broker-node:latest \
    --amend streamr/broker-node@sha256:<SHA-AMD64> \
    --amend streamr/broker-node@sha256:<SHA-ARM64>
  1. Then we publish the manifest with
docker manifest push streamr/broker-node:latest
  1. Then we are ready. It would be wise to double-check this by checking https://hub.docker.com/r/streamr/broker-node/tags.

More Repositories

1

core-api

Streamr Core backend (being phased out in favour of decentralization)
Groovy
52
star
2

marketplace-contracts

Ethereum smart contracts (truffle) for marketplace
JavaScript
50
star
3

monoplasma

Unidirectional payment distribution channel with monotonically increasing balances (now obsolete)
JavaScript
40
star
4

streamr-client-javascript

JS library for interacting with Streamr APIs: publishing and subscribing to data, creating streams, etc.
TypeScript
35
star
5

core-frontend

Streamr Hub frontend
TypeScript
33
star
6

chat

A proof-of-concept chat application built on the Streamr network.
TypeScript
21
star
7

network-old

Minimal and extendable implementation of the Streamr Network network node in JavaScript (Node.JS)
TypeScript
16
star
8

examples

Streamr code examples and important resources to get you started.
JavaScript
12
star
9

broker

A full-featured broker node implementation for the Streamr Network. Supports data persistence via Apache Cassandra and foreign protocol support for MQTT, WebSockets, and HTTP.
TypeScript
12
star
10

DATAv2

The second incarnation of the DATA token
JavaScript
11
star
11

network-explorer

Streamr Network Explorer
TypeScript
11
star
12

streamr-client-react

React toolkit for Streamr.
TypeScript
11
star
13

network-contracts

Smart contracts and subgraphs used by the Streamr Network
TypeScript
10
star
14

streamr-docker-dev

Tool for quickly setting up a copy of the Streamr stack for development and testing
Shell
10
star
15

ruuvi-streamr

Library for easily getting data from Ruuvi sensors to Streamr
JavaScript
9
star
16

streamr-client-python

Python library for accessing Streamr API
Python
9
star
17

data-api

Deprecated in favor of the next-generation network components (see repos broker and network)
JavaScript
8
star
18

esports-dapp

DApp for esports betting, using Streamr to stream data of esports matches datamined from pandascore
JavaScript
6
star
19

streamr-client-java

Java library for interacting with Streamr APIs: publishing and subscribing to data, creating streams, etc.
Java
5
star
20

old-streamr-web3

Streamr-Ethereum bridge
JavaScript
5
star
21

streamr-ethereum-watcher

Old utility to informs centralized API of events emitted by Streamr Marketplace smart contract. Now obsolete.
TypeScript
4
star
22

streamr-nifi

NiFi processors for subscribing and publishing to Streamr
Java
4
star
23

streamr-docker-dev-action

Start Streamr Docker stack as a part of your GitHub Actions workflow.
Shell
4
star
24

streamr-specs

This repository contains different technical specifications for the Streamr API and protocol.
4
star
25

data-union

Smart contracts for Data Unions 2.0
TypeScript
4
star
26

mqtt-streamr

Command-line utility for bridging data from MQTT to Streamr
JavaScript
3
star
27

cli-tools

Command line tool for interacting with Streamr
JavaScript
3
star
28

stylelint-config-streamr

Standard shareable stylelint config used in Streamr's projects
JavaScript
2
star
29

crypto-github-stats

Polls commit metadata from a selection of cryptocurrency GitHub projects and pushes the data to Streamr streams.
JavaScript
2
star
30

streamr-filetransfer-cli

Enabling file transfers via CLI through Streamr Network
TypeScript
2
star
31

airtraffic

Marketplace airtraffic stream integration script for ADS-B USB dongle + raspberry pi 3 b+
JavaScript
2
star
32

coldchain-demo

Cold-chain monitoring contract for Ethereum workshop
JavaScript
2
star
33

nginx

nginx
Shell
2
star
34

eslint-config-streamr

Streamr's Eslint config
JavaScript
2
star
35

data-integration-hackathon

Data integration Hackathon
JavaScript
2
star
36

zapier-streamr

Zapier template for sending data to Streamr stream
JavaScript
2
star
37

streamr-client-protocol-js

Streamr protocol implementation in JS. Includes shared code used by other Streamr packages.
TypeScript
2
star
38

iata-hackathon-2018

2
star
39

data-union-admin-tools

A selection of command-line tools for administering Data Unions
JavaScript
1
star
40

countdown-script

Countdown Script
JavaScript
1
star
41

cloud-broker

Deprecated in favor of the next-generation network components (see repos broker and network)
Java
1
star
42

smart-citizens

JavaScript
1
star
43

pacifics

JavaScript
1
star
44

streamr-apache-flink-integration

Example code and documentation on how to integrate Streamr with Apache Flink
Java
1
star
45

redis

Redis noSQL database
Dockerfile
1
star
46

node-datachannel-performance-diagnostics

C++
1
star
47

documentation

TypeScript
1
star
48

go-streamr-client

Go library for accessing the Streamr API
Go
1
star
49

open-ethereum-poa

Shell
1
star
50

node-red-streamr-client-node

Node-red Streamr client node
JavaScript
1
star
51

helium-mqtt-adapter

Helium to Streamr MQTT Integration
TypeScript
1
star
52

design-assets

1
star
53

streamr-ganache

Locally run Ethereum client for developing the Streamr services
JavaScript
1
star
54

smart-contracts-init

Init scripts for contracts on the private chain in streamr-docker-dev environment
JavaScript
1
star
55

streamr-dashboard-creator

TypeScript
1
star