MCPcopy Index your code
hub / github.com/creaton-io/creaton

github.com/creaton-io/creaton @v0.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.1 ↗ · + Follow
149 symbols 347 edges 56 files 1 documented · 1% updated 3mo ago★ 441 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Creaton

Creaton is a decentralized content sharing platform. Powered by Ethereum, IPFS, Superfluid and Textile, Creaton allows a streaming based subscription system where subscribers support their favorite creators with stablecoins in real-time. Utilizing p2p encryption, Creaton makes sure of exclusive permission-less content delivery to subscribers and eliminates the need for unnecessary middlemen or centralized services. Check out our DApp here:

Creaton live dev build

Demo video

Setup

requirements :

docker and docker-compose

docker and docker-compose are used to setup the external services (an ethereum node, an ipfs node and a subgraph node)

If you prefer (or do not have access to docker/docker-compose) you can run them independently.

node

This app requires node.js (tested on v12+)

intall dependencies :

npm install

This will recursively install dependencies in each sub folder too, ensuring all is setup once npm install finishes

Development

The following command will start everything up.

npm run shell:start

This will run each processes in their own terminal window/tap. Note that you might need confiugration based on your system.

On linux it uses xterm by default (so you need that installed).

On windows it use cmd.exe by default.

If you need some other terminal to execute the separate processes, you can configure it in .newsh.json.

This command will bring 5 shells up

  1. docker-compose: running the ethereum node, ipfs node and subgraph node.
  2. common-lib: watching for changes and recompiling to js.
  3. web app: watching for changes. Hot Module Replacement enabled. (will reload on common-lib changes)
  4. contracts: watching for changes. For every code changes, contract are redeployed, with proxies keeping their addresses.
  5. subgraph: watch for code or template changes and redeploy.

Once docker-compose is running, you can stop the other shells and restart them if needed via

npm run shell:dev

Alternatively you can call the following first : this will setup the external services only (ipfs, ethereum and graph nodes)

npm run setup

and then run npm run shell:dev to bring up the rest in watch mode.

You can also always run them individually

You can also run them all in one process : npm run start (no separate terminal window/tab) but this means all the log output is in the same window.

Basically the shell: version will execute each parallel processes in a new terminal window/tab while the non-shell version will execute all in one process sharing the same log output.

production

web

To export the web app (ipfs ready) execute the following:

npm run production:web:build

full deployment

You need to gather the following environment variables :

  • THEGRAPH_TOKEN=<graph token used to deploy the subgraph on thegraph.com>
  • INFURA_TOKEN=<infura token to talk to a network>
  • IPFS_DEPLOY_PINATA__API_KEY=<pinata api key>
  • IPFS_DEPLOY_PINATA__SECRET_API_KEY=<pinata secret key>
  • MNEMONIC=<mnemonic of the account that will deploy the contract>

Note that pinata is currently the default ipfs provider setup but ipfs-deploy, the tool used to deploy to ipfs support other providers, see : https://github.com/ipfs-shipyard/ipfs-deploy

For production and staging, you would need to set MENMONIC too in the respective .env.production and .env.staging files.

You can remove the env if you want to use the same as the one in .env

You'll also need to update the following for staging and production :

  • CHAIN_ID=<id of the chain where contracts lives>
  • SUBGRAPH_NAME=<thegraph account name>/<subgraph name>
  • VITE_THE_GRAPH_HTTP=https://api.thegraph.com/subgraphs/name/<thegraph account name>/<subgraph name>

you then need to ensure you have a subgraph already created on thegraph.com with that name: https://thegraph.com/explorer/dashboard

Furthermore, you need to ensure the values in web/application.json are to your liking. Similar for the the web/public/preview.png image that is used for open graph metadata. The application.json is also where you setup the ens name if any.

finally execute the following for staging :

npm run staging

for production:

npm run production

For webapp:build you can also use fleek so that building and ipfs deployment is done automatically. The repo provide a .fleek.json file already setup for staging.

The only thing needed is setting up the environment variables (VITE_THE_GRAPH_HTTP, VITE_CHAIN_ID). You can either set them in fleek dashboard or set them in .fleek.json

Extension points exported contracts — how you extend this code

Creator (Interface)
(no doc)
react-app/src/Utils.tsx
ImportMeta (Interface)
(no doc)
web/src/declaration.d.ts
params (Interface)
(no doc)
react-app/src/Creator.tsx
Window (Interface)
(no doc)
web/src/declaration.d.ts
Values (Interface)
(no doc)
react-app/src/Grant.tsx
FileMetadata (Interface)
(no doc)
web/src/stores/textileStore.ts
Values (Interface)
(no doc)
react-app/src/Signup.tsx
EncryptedFileMetadata (Interface)
(no doc)
web/src/stores/textileStore.ts

Core symbols most depended-on inside this repo

log
called by 9
web/public/sw.js
_set
called by 9
web/src/_graphql/queryStore.ts
encrypt
called by 5
react-app/src/NuCypher.tsx
decrypt
called by 5
react-app/src/NuCypher.tsx
fetch
called by 4
web/src/_graphql/queryStore.ts
resolve
called by 4
web/src/_routing/utils/createrouter.ts
run_command
called by 3
command.py
npmInstall
called by 3
.setup.js

Shape

Function 67
Method 53
Interface 19
Class 8
Enum 2

Languages

TypeScript97%
Python3%

Modules by API surface

web/src/stores/textileStore.ts30 symbols
react-app/src/stores/textileStore.ts26 symbols
react-app/src/NuCypher.tsx11 symbols
react-app/src/Creator.tsx10 symbols
web/src/js-sdk/Framework.js6 symbols
web/src/_graphql/queryStore.ts6 symbols
react-app/src/WalletConnect.tsx6 symbols
web/src/_routing/utils/createrouter.ts5 symbols
command.py5 symbols
react-app/src/Upload.tsx4 symbols
contracts/scripts/superfluid.ts4 symbols
subgraph/src/mapping.ts3 symbols

For agents

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

⬇ download graph artifact