MCPcopy Index your code
hub / github.com/Joystream/joystream

github.com/Joystream/joystream @v12.2004.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v12.2004.0 ↗ · + Follow
9,278 symbols 32,762 edges 895 files 1,723 documented · 19%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Joystream

This is the main code repository for all Joystream software. In this mono-repo you will find all the software required to run a Joystream network: The Joystream full node, runtime and all reusable substrate runtime modules that make up the Joystream runtime. In addition to all front-end apps and infrastructure servers necessary for operating the network.

Overview

The Joystream network builds on the substrate blockchain framework, and adds additional functionality to support the various roles that can be entered into on the platform.

Development

For best results use GNU/Linux with minimum glibc version 2.28 for nodejs v18 to work. So Ubuntu 20.04 or newer.

You can check your version of glibc with ldd --version

The following tools are required for building, testing and contributing to this repo:

  • Rust toolchain - required
  • nodejs >= v14.18.x - required (However volta will try to use v18.6)
  • yarn classic package manager v1.22.x- required
  • docker and docker-compose v2.20.x or higher - required
  • ansible - optional

If you use VSCode as your code editor we recommend using the workspace settings for recommend eslint plugin to function properly.

After cloning the repo run the following to get started:

Install development tools

./setup.sh

If you prefer your own node version manager

Install development tools without Volta version manager.

./setup.sh --no-volta

For older operating systems which don't support node 18

Modify the root package.json and change volta section to use node version 16.20.1 instead of 18.6.0

"volta": {
    "node": "16.20.1",
    "yarn": "1.22.19"
}

Run local development network

# Build local npm packages
yarn build

# Build joystream/node docker testing image
RUNTIME_PROFILE=TESTING yarn build:node:docker

# Start a local development network
yarn start

Software

Substrate blockchain

Server Applications - infrastructure

Front-end Applications

  • Pioneer v2 - Main UI for accessing Joystream community and governance features
  • Atlas - Media Player

Tools and CLI

Testing infrastructure

Running a local full node

git checkout master
WASM_BUILD_TOOLCHAIN=nightly-2022-11-15 cargo build --release
./target/release/joystream-node -- --pruning archive --chain joy-mainnet.json

Learn more about joystream-node.

A step by step guide to setup a full node and validator on the Joystream main network, can be found here.

Pre-built joystream-node binaries

Look under the 'Assets' section:

Mainnet chainspec file

Integration tests

# Make sure yarn packages are built
yarn build

# Build the test joystream-node
RUNTIME_PROFILE=TESTING yarn build:node:docker

# Run tests
yarn test

Contributing

We have lots of good first issues open to help you get started on contributing code. If you are not a developer you can still make valuable contributions by testing our software and providing feedback and opening new issues.

A description of our branching model will help you to understand where work on different software components happens, and consequently where to direct your pull requests.

We rely on eslint for code quality of our JavaScript and TypeScript code and prettier for consistent formatting. For Rust we rely on rustfmt and clippy.

The husky npm package is used to manage the project git-hooks. This is automatically installed and setup when you run yarn install.

When you git commit and git push some scripts will run automatically to ensure committed code passes lint, tests, and code-style checks.

During a rebase/merge you may want to skip all hooks, you can use HUSKY_SKIP_HOOKS environment variable.

HUSKY_SKIP_HOOKS=1 git rebase ...

RLS Extension in VScode or Atom Editors

If you use RLS extension in your IDE, start your editor with the BUILD_DUMMY_WASM_BINARY=1 environment set to workaround a build issue that occurs in the IDE only.

BUILD_DUMMY_WASM_BINARY=1 code ./joystream

Authors

See the list of contributors who participated in this project.

License

All software under this project is licensed as GPLv3 unless otherwise indicated.

Acknowledgments

Thanks to the whole Parity Tech team for making substrate and helping in chat with tips, suggestions, tutorials and answering all our questions during development.

Extension points exported contracts — how you extend this code

Config (Interface)
Pallet Configuration [6 implementers]
runtime-modules/project-token/src/lib.rs
WeightInfo (Interface)
Weight functions needed for forum. [17 implementers]
runtime-modules/forum/src/weights.rs
Config (Interface)
'Proposal discussion' substrate module Trait [7 implementers]
runtime-modules/proposals/discussion/src/lib.rs
Config (Interface)
The _Group_ main _Config_ [6 implementers]
runtime-modules/working-group/src/lib.rs
Config (Interface)
Storage trait. [12 implementers]
runtime-modules/storage/src/lib.rs
Config (Interface)
Module configuration trait for Content Directory Module [11 implementers]
runtime-modules/content/src/lib.rs
WorkingGroupAuthenticator (Interface)
Working group interface to work with its members - workers and leaders. [19 implementers]
runtime-modules/common/src/working_group.rs
LockComparator (Interface)
Config for (dis)allowing certain stake locks combinations. [16 implementers]
runtime-modules/staking-handler/src/lib.rs

Core symbols most depended-on inside this repo

into
called by 2163
runtime-modules/storage/src/lib.rs
get
called by 1764
storage-node/src/services/logger.ts
clone
called by 1472
analyses/bench/src/tempdb.rs
push
called by 226
analyses/bench/src/core.rs
assert
called by 226
tests/network-tests/src/utils.ts
iter
called by 218
analyses/bench/src/tempdb.rs
error
called by 217
query-node/mappings/src/common.ts
createType
called by 180
types/src/index.ts

Shape

Function 3,941
Method 3,554
Class 1,201
Interface 496
Enum 86

Languages

Rust59%
TypeScript41%
Python1%

Modules by API surface

types/src/augment/types-lookup.ts349 symbols
runtime-modules/storage/src/tests/mod.rs227 symbols
runtime-modules/content/src/tests/fixtures.rs191 symbols
runtime-modules/content/src/tests/channels.rs169 symbols
tests/network-tests/src/Api.ts131 symbols
tests/network-tests/src/QueryNodeApi.ts127 symbols
runtime-modules/bounty/src/tests/mod.rs127 symbols
runtime-modules/working-group/src/tests/mod.rs125 symbols
runtime-modules/proposals/engine/src/tests/mod.rs107 symbols
runtime-modules/storage/src/lib.rs103 symbols
runtime-modules/content/src/tests/videos.rs101 symbols
runtime-modules/project-token/src/types.rs100 symbols

Datastores touched

squid-archiveDatabase · 1 repos

For agents

$ claude mcp add joystream \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact