SvelteKit frontend.
Mud based.
- creating and entering trips is done through the server
- the server executes the LLM calls
- chain calls are done from admin account on behalf of the player
- server maintains websocket connections to the players for alerts
- using sanity.io
- stores the system prompts for the LLM calls
- requires authentication to read
- using sanity.io
- stores trip images
- stores trip and outcome statistics
- publicly accessible
Misc. utility scripts.
Install foundry
Package manager: pnpm
Node version: 20
A number of variables are required for the project to build and run.
Copy .env.example to .env and fill in the values.
PUBLIC_SANITY_CMS_ID(required): Public CMS ID for Sanity. Needed to fetch trip images and other metadata.PUBLIC_DEVELOPMENT_SERVER_HOST(required): Host of the development server.PUBLIC_BASE_SEPOLIA_SERVER_HOST(not required): Host of the base sepolia server.NETLIFY_AUTH_TOKEN(not required): Netlify authentication token. Needed to deploy clients to Netlify.DOCS_ID(not required): ID of netlify deployment for docs.
PRIVATE_KEY(required): Private key of deploy account. Pre-filled with anvil account #1
PRIVATE_KEY(required): Private key of admin/deploy account. Pre-filled with anvil account #1CHAIN_ID(required): Chain ID of the network to deploy to. Pre-filled with anvil chain IDANTHROPIC_API_KEY(required): API key for AnthropicPRIVATE_SANITY_CMS_ID(required): Private CMS ID for Sanity. Needed to retrieve the system prompts.PRIVATE_SANITY_CMS_TOKEN(required): Private CMS token for Sanity. Needed to retrieve the system prompts.PUBLIC_SANITY_CMS_ID(required): Public CMS ID for Sanity. Used to store in-game statistics and metadata.PUBLIC_SANITY_CMS_TOKEN(required): Public CMS token for Sanity. Used to store in-game statistics and metadata.REPLICATE_API_TOKEN(required): API token for Replicate. Needed to generate trip images.
Not crucial for local development. If needed, same values as for server.
- Install dependencies:
pnpm i - Build contracts:
cd packages/contracts && pnpm build(to not have dev script fail on first run) - Run dev script:
pnpm dev