Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
chore: add local dev script for Gateway + Desktop with Telegram bot
Jiayuan Zhang005908710ea8
diff --git a/.env.example b/.env.examplenew file mode 100644index 0000000000..ea1360bbc9--- /dev/null+++ b/.env.example@@ -0,0 +1,9 @@+# Telegram Bot+# Get a token from @BotFather on Telegram+TELEGRAM_BOT_TOKEN=++# Optional: webhook secret token for production+# TELEGRAM_WEBHOOK_SECRET_TOKEN=++# Optional: webhook URL (if not set, uses long-polling mode for local dev)+# TELEGRAM_WEBHOOK_URL=https://your-domain.ngrok-free.dev/telegram/webhookdiff --git a/package.json b/package.jsonindex 568bff9e59..345fe5ac4a 100644--- a/package.json+++ b/package.json@@ -18,6 +18,7 @@"dev:desktop:onboarding": "pnpm --filter @multica/desktop dev:onboarding","dev:gateway": "pnpm --filter @multica/gateway dev","dev:web": "pnpm --filter @multica/web dev",+ "dev:local": "bash scripts/dev-local.sh","dev:all": "concurrently \"pnpm dev:gateway\" \"pnpm dev:web\"","build": "turbo build","build:desktop": "pnpm --filter @multica/desktop build",diff --git a/scripts/dev-local.sh b/scripts/dev-local.shnew file mode 100755index 0000000000..85d856f501--- /dev/null+++ b/scripts/dev-local.sh@@ -0,0 +1,50 @@+#!/usr/bin/env bash+#+# Local development: Gateway (with Telegram bot) + Desktop+#+# Usage:+# pnpm dev:local+#+# Reads TELEGRAM_BOT_TOKEN from .env at the repo root.+# Gateway runs in long-polling mode (no TELEGRAM_WEBHOOK_URL needed).+# Desktop connects to the local Gateway at http://localhost:3000.++set -euo pipefail++SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"+ROOT_DIR="$SCRIPT_DIR/.."+ENV_FILE="$ROOT_DIR/.env"++# Load .env+if [ ! -f "$ENV_FILE" ]; then+ echo "Error: .env file not found at $ENV_FILE"+ echo "Copy .env.example to .env and fill in TELEGRAM_BOT_TOKEN"+ exit 1+fi++set -a+source "$ENV_FILE"+set +a++if [ -z "${TELEGRAM_BOT_TOKEN:-}" ]; then+ echo "Error: TELEGRAM_BOT_TOKEN not set in .env"+ exit 1+fi++echo "Starting local dev environment..."+echo " Gateway: http://localhost:3000 (Telegram long-polling mode)"+echo " Desktop: connecting to local Gateway"+echo ""++# Build shared packages first+pnpm turbo build --filter=@multica/types --filter=@multica/utils --filter=@multica/core++# Start everything+exec pnpm concurrently \+ -n types,utils,core,gateway,desktop \+ -c blue,green,yellow,magenta,cyan \+ "pnpm --filter @multica/types dev" \+ "pnpm --filter @multica/utils dev" \+ "pnpm --filter @multica/core dev" \+ "pnpm --filter @multica/gateway dev" \+ "GATEWAY_URL=http://localhost:3000 pnpm --filter @multica/desktop dev"