MCPcopy Index your code
hub / github.com/dappforce/subsocial-offchain

github.com/dappforce/subsocial-offchain @substrate-2.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release substrate-2.0.1 ↗ · + Follow
362 symbols 1,049 edges 197 files 5 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Subsocial Faucet by DappForce

Subsocial is a set of Substrate pallets with web UI that allows anyone to launch their own decentralized censorship-resistant social network aka community. Every community can be a separate Substrate chain and connect with other communities via a Polkadot-based relay chain.

You can think of this as decentralized versions of Reddit, Stack Exchange or Medium, where subreddits or communities of Stack Exchange or blogs on Medium run on their own chain. At the same time, users of these decentralized communities should be able to share their reputation or transfer coins and other values from one community to another via Polkadot relay chain.

To learn more about Subsocial, please visit Subsocial Network.

Supported by Web3 Foundation

Web3 Foundation grants badge

Subsocial is a recipient of the technical grant from Web3 Foundation. We have successfully delivered all three milestones described in Subsocial's grant application. Official announcement.

Setup

# Install Node.js dependencies
yarn

# Compile TypeScript
yarn build

# Run
yarn start

Available scripts

  • clean - remove coverage data, Jest cache and transpiled files,
  • build - transpile TypeScript to ES6,
  • start - run subscribe and express-api servers,
  • api - run only express-api server,
  • subscribe - run only subscribe server

Building from Docker

Easiest start

To start Subsocial offchain storage separately (you should have docker-compose):

cd docker/
./compose.sh

It will start 3 containers: postgres, elasticsearch and offchain itself.

Start all parts of Subsocial at once with Subsocial Starter

License

Subsocial is GPL 3.0 licensed.

Extension points exported contracts — how you extend this code

IQueryParams (Interface)
(no doc)
src/postgres/types/getCountOfUnreadNotifications.queries.ts
IQueryParams (Interface)
(no doc)
src/postgres/types/insertAccountFollower.queries.ts
IQueryParams (Interface)
(no doc)
src/postgres/types/insertActivityForPost.queries.ts
IQueryParams (Interface)
(no doc)
src/postgres/types/deletePostFollower.queries.ts
IQueryParams (Interface)
(no doc)
src/postgres/types/fillNewsFeedWithSpaceFollowers.queries.ts

Core symbols most depended-on inside this repo

newPgError
called by 37
src/postgres/utils.ts
runQuery
called by 33
src/postgres/utils.ts
resolveSubsocialApi
called by 29
src/connections/subsocial.ts
encodeStructId
called by 26
src/substrate/utils.ts
resolvePromiseAndReturnJson
called by 19
src/express-api/utils.ts
setPrettyPreviewString
called by 14
src/parser/parse-preview.ts
informTelegramClientAboutNotifOrFeed
called by 11
src/express-api/events.ts
countHandler
called by 9
src/express-api/handlers/pgHandlers.ts

Shape

Function 319
Interface 33
Method 7
Class 2
Enum 1

Languages

TypeScript100%

Modules by API surface

src/express-api/handlers/pgHandlers.ts36 symbols
src/express-api/email/utils.ts11 symbols
src/substrate/normalizers.ts10 symbols
src/substrate/utils.ts9 symbols
src/ipfs/ipfsCluster.ts9 symbols
src/substrate/subscribe.ts8 symbols
src/postgres/queries/feed-and-notifs.ts8 symbols
test/queries/queries.ts7 symbols
src/search/indexer.ts7 symbols
src/express-api/handlers/ipfsHandlers.ts6 symbols
src/express-api/email/jobs.ts6 symbols
src/substrate/api-wrappers.ts5 symbols

For agents

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

⬇ download graph artifact