TOAD (Trustless Onchain Autonomous Delegate) is an AI-powered voting delegate system. This repo contains the UI and AI agent. The UI is built with Vercel AI SDK and the AI agent uses GOAT.
- Modify the .env.example file with your own information
- Rename .env.example to .env
- To run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev- Docker and Docker Compose installed
- A domain name with DNS access
- A server with ports 80 and 443 accessible
- Create a
docker-compose.yamlfile with the following content:
services:
traefik:
image: traefik:v2.10
container_name: traefik
restart: always
security_opt:
- no-new-privileges:true
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik/traefik.yml:/etc/traefik/traefik.yml:ro
networks:
- web
labels:
- "traefik.enable=true"
- "traefik.docker.network=home_web"
toad-ui-dao:
image: pupcakes/toad-ui
container_name: toad-ui-dao
restart: always
expose:
- "3000"
volumes:
- ./dao.env:/app/.env
networks:
- web
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 10s
timeout: 5s
retries: 3
start_period: 300s
labels:
- "traefik.enable=true"
- "traefik.docker.network=home_web"
- "traefik.http.routers.toad-ui-dao.rule=Host(`dao.domain.com`)"
- "traefik.http.routers.toad-ui-dao.entrypoints=web"
- "traefik.http.routers.toad-ui-dao.service=toad-ui-dao"
- "traefik.http.services.toad-ui-dao.loadbalancer.server.port=3000"
- "traefik.http.services.toad-ui-dao.loadbalancer.healthcheck.path=/"
- "traefik.http.services.toad-ui-dao.loadbalancer.healthcheck.interval=10s"
- "traefik.http.services.toad-ui-dao.loadbalancer.healthcheck.timeout=5s"
toad-wallet-dao:
image: pupcakes/toad-wallet
container_name: toad-wallet-dao
restart: always
volumes:
- ./dao.env:/usr/src/app/.env
networks:
web:
name: home_web
driver: bridge-
Configure your environment:
- Create a
dao.envfile with your environment variables - Update the domain in the docker-compose.yaml file (replace
dao.domain.comwith your actual domain)
- Create a
-
DNS Configuration:
- Point your domain's DNS A record to your server's IP address
- If using a subdomain (recommended), create a CNAME record pointing to your main domain
-
Deployment Steps:
# First, bring up the TOAD UI container docker compose up toad-ui-dao # Once the UI is running, bring up the rest of the services docker compose up -d
-
Verify the deployment:
- Access your TOAD UI at
http://dao.domain.com(replace with your actual domain) - Check the Traefik dashboard for service status
- Monitor container logs if needed:
docker compose logs -f
- Access your TOAD UI at
- Make sure to replace
dao.domain.comwith your actual domain in the docker-compose.yaml file - The deployment assumes you're using Traefik as a reverse proxy
- Health checks are configured to ensure service availability
- All services are configured to restart automatically in case of failure