# Coves Local Development Environment Configuration # Copy this to .env.dev and fill in your values # # Quick Start: # 1. cp .env.dev.example .env.dev # 2. Generate OAuth key: go run cmd/genjwks/main.go (copy output to OAUTH_PRIVATE_JWK) # 3. Generate cookie secret: openssl rand -hex 32 # 4. make dev-up # Start Docker services # 5. make run # Start the server (uses -tags dev) # ============================================================================= # Dev Mode Quick Reference # ============================================================================= # REQUIRED for local OAuth to work with local PDS: # IS_DEV_ENV=true # Master switch for dev mode # PDS_URL=http://localhost:3001 # Local PDS for handle resolution # PLC_DIRECTORY_URL=http://localhost:3002 # Local PLC directory # APPVIEW_PUBLIC_URL=http://127.0.0.1:8081 # Use IP not localhost (RFC 8252) # # BUILD TAGS: # make run - Runs with -tags dev (includes localhost OAuth resolvers) # make build - Production binary (no dev code) # make build-dev - Dev binary (includes dev code) # ============================================================================= # PostgreSQL Configuration # ============================================================================= POSTGRES_HOST=localhost POSTGRES_PORT=5435 POSTGRES_DB=coves_dev POSTGRES_USER=dev_user POSTGRES_PASSWORD=dev_password # Test database POSTGRES_TEST_DB=coves_test POSTGRES_TEST_USER=test_user POSTGRES_TEST_PASSWORD=test_password POSTGRES_TEST_PORT=5434 # ============================================================================= # PDS Configuration # ============================================================================= PDS_HOSTNAME=localhost PDS_PORT=3001 PDS_SERVICE_ENDPOINT=http://localhost:3000 PDS_DID_PLC_URL=http://plc-directory:3000 PDS_JWT_SECRET=local-dev-jwt-secret-change-in-production PDS_ADMIN_PASSWORD=admin PDS_SERVICE_HANDLE_DOMAINS=.local.coves.dev,.coves.social PDS_PLC_ROTATION_KEY= # ============================================================================= # AppView Configuration # ============================================================================= APPVIEW_PORT=8081 FIREHOSE_URL=ws://localhost:3001/xrpc/com.atproto.sync.subscribeRepos PDS_URL=http://localhost:3001 APPVIEW_PUBLIC_URL=http://127.0.0.1:8081 # ============================================================================= # Jetstream Configuration # ============================================================================= # User profile indexing - wantedCollections filters to profile events only JETSTREAM_URL=ws://localhost:6008/subscribe?wantedCollections=social.coves.actor.profile # ============================================================================= # Identity Resolution # ============================================================================= IDENTITY_CACHE_TTL=24h PLC_DIRECTORY_URL=http://localhost:3002 # ============================================================================= # OAuth Configuration (MUST GENERATE YOUR OWN) # ============================================================================= # Generate with: go run cmd/genjwks/main.go OAUTH_PRIVATE_JWK= # Generate with: openssl rand -hex 32 OAUTH_COOKIE_SECRET= # OAuth Confidential Client Configuration (optional, for testing) # If both are set, Coves becomes a confidential OAuth client with 90-day session lifetime # (Public clients are limited to 14 days by the auth server) # Generate keys with: go run ./cmd/tools/generate-oauth-key # P-256 private key in multibase format (z-prefixed base58btc) # OAUTH_CLIENT_PRIVATE_KEY=z... # Key identifier (arbitrary string, used in JWT header) # OAUTH_CLIENT_KEY_ID=coves-dev-key-1 # ============================================================================= # Development Settings # ============================================================================= ENV=development NODE_ENV=development IS_DEV_ENV=true LOG_LEVEL=debug LOG_ENABLED=true # Security settings (ONLY for local dev - set to false in production!) SKIP_DID_WEB_VERIFICATION=true AUTH_SKIP_VERIFY=true HS256_ISSUERS=http://localhost:3001 # ============================================================================= # Image Proxy Configuration # ============================================================================= # On-the-fly image resizing with disk caching # Defaults to enabled - falls back to direct PDS URLs if proxy fails IMAGE_PROXY_ENABLED=true IMAGE_PROXY_BASE_URL=http://127.0.0.1:8081 IMAGE_PROXY_CACHE_PATH=./cache/images IMAGE_PROXY_CACHE_MAX_GB=5 # Optional: CDN URL for production (leave empty for local dev) # IMAGE_PROXY_CDN_URL= IMAGE_PROXY_FETCH_TIMEOUT_SECONDS=30 IMAGE_PROXY_MAX_SOURCE_SIZE_MB=10 # ============================================================================= # OpenTelemetry Observability (Optional) # ============================================================================= # Disabled by default. Enable for local Jaeger: docker compose --profile observability up OTEL_ENABLED=false # OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 # OTEL_SERVICE_NAME=coves-appview-dev