{"id":13647925,"url":"https://github.com/streamr-dev/network","last_synced_at":"2025-05-14T04:10:26.901Z","repository":{"id":37042662,"uuid":"355643935","full_name":"streamr-dev/network","owner":"streamr-dev","description":"Monorepo containing all the main components of Streamr Network.","archived":false,"fork":false,"pushed_at":"2025-05-13T11:13:53.000Z","size":175185,"stargazers_count":580,"open_issues_count":17,"forks_count":41,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-05-13T11:34:31.692Z","etag":null,"topics":["decentralized","peer-to-peer","protocol","pubsub","streamr","streamr-client"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/streamr-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-07T18:23:22.000Z","updated_at":"2025-05-12T11:54:24.000Z","dependencies_parsed_at":"2023-10-14T18:47:34.482Z","dependency_job_id":"6d9caafb-8a5d-4f54-96a0-c6bdba378f57","html_url":"https://github.com/streamr-dev/network","commit_stats":{"total_commits":7457,"total_committers":37,"mean_commits":"201.54054054054055","dds":0.7363551025881722,"last_synced_commit":"989c1f4889863c77c7311cf0182ba33e650b49d0"},"previous_names":["streamr-dev/network-monorepo"],"tags_count":328,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamr-dev%2Fnetwork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamr-dev%2Fnetwork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamr-dev%2Fnetwork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamr-dev%2Fnetwork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamr-dev","download_url":"https://codeload.github.com/streamr-dev/network/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253938675,"owners_count":21987404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decentralized","peer-to-peer","protocol","pubsub","streamr","streamr-client"],"created_at":"2024-08-02T01:03:50.394Z","updated_at":"2025-05-14T04:10:21.886Z","avatar_url":"https://github.com/streamr-dev.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://streamr.network\"\u003e\n    \u003cimg alt=\"Streamr\" src=\"https://raw.githubusercontent.com/streamr-dev/network-monorepo/main/packages/sdk/readme-header.png\" width=\"1320\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Network\n\nMonorepo containing the main components of Streamr Network.\n\n## Table of Contents\n- [Packages](#packages)\n- [NPM scripts](#npm-scripts)\n- [Environment variables](#environment-variables)\n- [Release](#release)\n\n## Packages\n\n### User-Facing\n* [node](packages/node/README.md) (@streamr/node)\n* [sdk](packages/sdk/README.md) (@streamr/sdk)\n* [cli-tools](packages/cli-tools/README.md) (@streamr/cli-tools)\n\n### Internal\n* [browser-test-runner](packages/browser-test-runner/index.js) (@streamr/browser-test-runner)\n* [utils](packages/utils/README.md) (@streamr/utils)\n* [test-utils](packages/test-utils/README.md) (@streamr/test-utils)\n* [proto-rpc](packages/proto-rpc/README.md) (@streamr/proto-rpc)\n* [autocertifier-client](packages/autocertifier-client/README.md) (@streamr/autocertifier-client)\n* [dht](packages/dht/README.md) (@streamr/dht)\n* [autocertifier-server](packages/autocertifier-server/README.md) (@streamr/autocertifier-server)\n* [trackerless-network](packages/trackerless-network/README.md) (@streamr/trackerless-network)\n\n## NPM scripts\nNode.js version 20 is recommended.\n\nThe monorepo is managed using [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces).\n\nInstallation on an Apple Silicon Mac requires additional steps, see [install-on-apple-silicon.md](/internal-docs/install-on-apple-silicon.md).\n\n**Important:** Do not use `npm ci` or `npm install` directly in the sub-package directories.\n\n### Bootstrap all sub-packages\nThe go-to command for most use cases.\n\nTo install all required dependencies and build all sub-packages (linking sub-packages together as needed):\n\n```bash\n# from top level\nnpm run bootstrap\n```\n\n###  Bootstrap a single sub-package\n\nTo install the required dependencies and build a specific sub-package:\n\n```bash\n# from top level\nnpm run bootstrap-pkg --package=$PACKAGE_NAME\n```\n\n### Install dependencies only\n\nTo only install required dependencies and link sub-packages together (and skip build phase):\n\n```bash\n# from top level\nnpm ci\n```\n\n### Build\nTo build all sub-packages:\n```bash\n# from top level\nnpm run build\n```\n\n### Build a sub-package\nTo build a specific sub-package:\n```bash\n# from top level\nnpm run build --workspace=$PACKAGE_NAME\n```\n\n### Clear caches and built files\n\nTo clear all caches and remove the `dist` directory from each sub-package:\n\n```bash\n# from top level\nnpm run clean-dist\n```\n\n### Clean all\n\nTo removes all caches, built files, and **`node_modules`** of each sub-package, and the\ntop-level **`node_modules`**:\n\n```bash\n# from top level\nnpm run clean\n```\n\n### Add a dependency into a sub-package\n\nManually add the entry to the `package.json` of the sub-package and \nrun `npm run bootstrap-pkg $PACKAGE_NAME`.\n\nAlternatively, run:\n```bash\nnpm install some-dependency --workspace=$PACKAGE_NAME\n```\n\n### List active versions \u0026 symlinks\n\nCheck which sub-packages are currently being symlinked.\n\n```bash\n# from top level\nnpm run versions\n```\n\nThis lists sub-packages \u0026 their versions on the left, linked\nsub-packages are columns.  If the package on the left links to the package\nin the column, it shows a checkmark \u0026 the semver range, otherwise it\nshows the mismatched semver range and prints a warning at the end.  It\nprints the version ranges so you can double-check that they're formatted\nas you expect e.g. `^X.Y.Z` vs `X.Y.Z`\n\n![image](https://user-images.githubusercontent.com/43438/135347920-97d6e0e7-b86c-40ff-bfc9-91f160ae975c.png)\n\n### Generate package-lock.json from scratch\n\nOccasionally it can be useful to clear all the packages and generate\npackage-lock.json completely from scratch. To do this run the following.\n\n```bash\nnpm run clean\nrm -rf node_modules\nrm package-lock.json\nnpm cache clean --force\nnpm install\n```\n\n## Environment variables\n\n| Variable                     | Description                                                                        | Packages                                 |\n|------------------------------|------------------------------------------------------------------------------------|------------------------------------------|\n| `BROWSER_TEST_DEBUG_MODE`    | Leaves the Electron window open while running browser tests                        | utils, proto-rpc, dht, network-node, sdk |\n| `STREAMR_DOCKER_DEV_HOST`    | Sets an alternative IP address for streamr-docker-dev in end-to-end tests          | sdk, node                                |\n| `LOG_LEVEL`                  | Adjust logging level                                                               | _all_                                    |\n| `DISABLE_PRETTY_LOG`         | Set to true to disable pretty printing of logs and print JSONL instead             | _all_                                    |\n| `LOG_COLORS`                 | Set to false to disable coloring of log messages                                   | _all_                                    |\n| `NOLOG`                      | Set to true to disable all logging                                                 | _all_                                    |\n| `NODE_DATACHANNEL_LOG_LEVEL` | Adjust logging level of `node-datachannel` library                                 | network-node                             |\n| `BUNDLE_ANALYSIS`            | Whether to produce a bundle analysis when building sdk package for browser         | sdk (compile time)                       |\n| `STREAMR__BROKER__`          | Wildcard [set of variables](packages/node/configuration.md) used to configure node | node                                     |\n\n## Release\n\nAll packages are released at the same time under the same version.\n\n### Step 1: Edit the CHANGELOG\nYou can skip this step if releasing a beta version.\n\nRead and edit [CHANGELOG.md](CHANGELOG.md). Create a new section for the new version, move items from under\n\"Unreleased\" to this new section. Add any additional changes worth mentioning that may be missing from \"Unreleased\".\n\n\n### Step 2: Creating and pushing the version and tag\nIn the bash commands below, replace `\u003cSEMVER\u003e` with the version to be published _without_ the letter \"v\" infront.\n\n```\ngit checkout main\ngit pull\n./update-versions.sh \u003cSEMVER\u003e                                        # e.g. ./update-versions.sh 7.1.1\nnpm run clean \u0026\u0026 npm install \u0026\u0026 npm run build \u0026\u0026 npm run versions    # Check that the output has not red or yellow markers\ngit add -p .                                                         # or \"git add -all\"\n./release-git-tags.sh \u003cSEMVER\u003e                                       # e.g. `./release-git-tags.sh 7.1.1`\n```\n\n### Step 3: Publish NPM and release Docker image\n\nFirstly, wait for all tests to pass in GitHub Actions.\n\nTo publish the NPM packages, use [publish-npm workflow](https://github.com/streamr-dev/network/actions/workflows/publish-npm.yml).\nClick button \"Run Workflow\". Select the right branch and NPM tag to be used.\n\nTo publish the Docker image, use [release-docker workflow](https://github.com/streamr-dev/network/actions/workflows/release-docker.yml).\nClick button \"Run Workflow\". Select the right branch and you are good to go. The Docker tags are automatically chosen based on\nthe associated Git branch and tag.\n\n### Step 4: Releasing the docs\n\nFirstly, ask yourself whether the docs need to be released or not.\n\nTo publish the docs, use [Production Documentation workflow](https://github.com/streamr-dev/network/actions/workflows/deploy-docs.yml).\nClick button \"Run workflow\". Select the right branch and you are good to go.\n\n### Manually adjusting Docker image tag `latest`\n\nGitHub actions will update the `latest` tag if told to do so in the workflow dispatch drop-down menu.\nIf for whatever reason you want to manually change the `latest` tag, here are the instructions to do so.\nKeep in mind that `latest` should always refer to the latest _stable_ version.\n\nTo update `latest` do the following.\n\n1. Remove potentially existing latest tag _locally_ with `docker manifest rm streamr/node:latest`\n\n1. Find out the sha256 digests of both the amd64 and arm64 builds for a `vX.Y.Z` tag. This can be\ndone via command-line `docker buildx imagetools inspect streamr/node:vX.Y.Z` or you can check\nthis from docker hub website under https://hub.docker.com/r/streamr/node/tags.\n2. Then we shall create the manifest by running the below. Remember to replace `\u003cSHA-AMD64\u003e` and `\u003cSHA-ARM64\u003e`\nwith real values.\n```\ndocker manifest create streamr/node:latest \\\n    --amend streamr/node@sha256:\u003cSHA-AMD64\u003e \\\n    --amend streamr/node@sha256:\u003cSHA-ARM64\u003e\n```\n3. Then we publish the manifest with\n```\ndocker manifest push streamr/node:latest\n```\n4. Then we are ready. It would be wise to double-check this by checking\nhttps://hub.docker.com/r/streamr/node/tags.\n","funding_links":[],"categories":["Top Internet of Things (IOT)","TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamr-dev%2Fnetwork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamr-dev%2Fnetwork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamr-dev%2Fnetwork/lists"}