Skip to content

Latest commit

 

History

History
64 lines (52 loc) · 2.14 KB

File metadata and controls

64 lines (52 loc) · 2.14 KB

Cloudflare Architecture

Overview

The application is split into three components:

  1. Frontend (Cloudflare Pages)

  2. Main Worker (bolt-echo)

    • Primary API endpoint
    • Handles main application logic
    • Communicates with Anthropic API
    • Status: Active
  3. Tail Worker (bolt-echo-tail)

How They Work Together

  1. Users access the frontend through Cloudflare Pages
  2. Frontend makes API calls to the main Worker
  3. For streaming operations (like chat):
    • Main worker initiates the request
    • Tail worker handles the streaming response
    • Frontend receives real-time updates

Required Environment Variables

The following environment variables must be set in Cloudflare Pages:

  1. ANTHROPIC_API_KEY

    • Required for API communication
    • Must be a valid Anthropic API key
  2. VITE_LOG_LEVEL

    • Controls application logging
    • Recommended value: debug

How to Set Environment Variables

  1. Go to Cloudflare Dashboard
  2. Navigate to Pages > bolt-echo > Settings > Environment variables
  3. Add both required variables:
  4. Trigger a new deployment

Project Configuration

  • Build command: pnpm run build
  • Build output directory: build/client
  • Node.js version: 20.15.1
  • Package manager: pnpm@9.4.0
  • Framework: Remix with Cloudflare Pages Functions

Custom Domains

  • Production: bolt.echocog.org
  • Preview: staging.echocog.org

Useful Links