You'll need some values on your .env file, update the values accordingly:
export NODE_ENV=test
export NEXT_PUBLIC_ORIGIN="http://localhost:3000"
export NEXT_PUBLIC_DEFAULT_NETWORK_ENV="testnet"
# # pw-server.pulsemarkets.testnet
export NEAR_SIGNER_PRIVATE_KEY="..." # get this key string after creating a sub-account via NEAR CLI
# # pulsemarkets.testnet
export NEAR_OWNER_PRIVATE_KEY="..." # get this key string after creating an account via NEAR CLI
export REPLICATE_API_TOKEN="..." # https://replicate.ai/
export NEXT_PUBLIC_WEBSOCKETS_PORT=8000
By now, you should be able to run:
yarn dev:debug
and you'll see the app running in http:localhost:3003
A good place to start is at the app/src/pages/index.tsx file. This file renders the homepage at http://localhost:3003
Contract Controllers
All the Rust contracts that you see under ./contracts/ have their corresponding Typescript files. For example, for ./contracts/prompt-wars/contract.rs there are: