sendi/.env.example
jmcqueen d0a0dda2b8 Initial commit: Sendi 2.0 SMS gateway (Webex + Twilio)
Sendi is a Webex to Twilio SMS gateway written in TypeScript that runs
directly on Node 22.18+ via native type-stripping (no bundler/transpiler).
Each Webex space represents one external SMS contact; inbound MMS is
proxied both ways, with delivery-status cards for outbound sends.

Highlights:
- Express 5 HTTP surface for Twilio /sms and /callback (signature-validated)
- webex-node-bot-framework in websocket transport mode for bot control plane
- Prisma 6 + SQLite via better-sqlite3 driver adapter
- Zod-validated env with fail-fast startup and pino secret redaction
- Pino logging: pretty in dev, structured JSON in prod
- 13 vitest unit tests (phone normalization, Twilio signature validation,
  card action dispatch)
- Native --require preload patches Node 22's read-only globalThis.navigator
  so @webex/internal-media-core (transitive) can load

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 11:10:44 -04:00

35 lines
1.3 KiB
Text

# --- Webex ---
# Bot access token from https://developer.webex.com (My Webex Apps -> your bot)
WEBEX_TOKEN=your_webex_bot_token_here
# Bot email (the @webex.bot address). Used for self-membership and identification.
WEBEX_BOT_EMAIL=yourbot@webex.bot
# --- HTTP server (Express) ---
# Port the Express app listens on (Twilio webhooks + media serving)
PORT=1337
# Public base URL where this server is reachable from the internet.
# Used for Twilio statusCallback and outbound MMS media URLs.
WEBEX_PUBLIC_URL=https://your-domain.example/sendi
# Optional override for Twilio status callback. Defaults to ${WEBEX_PUBLIC_URL}/callback.
# CALLBACK_URL=https://your-domain.example/sendi/callback
# --- Twilio ---
TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_AUTH_TOKEN=replace_me
# E.164 number used as the default FROM when creating new contact spaces
# (until the create-contact card lets the user pick one).
TWILIO_DEFAULT_FROM=+12892067080
# --- Database ---
# SQLite (default, fine for low-volume self-host)
DATABASE_URL=file:./prisma/dev.db
# Postgres example for later:
# DATABASE_URL=postgresql://user:pass@localhost:5432/sendi?schema=public
# --- Admin / misc ---
ADMIN_EMAIL=you@example.com
# --- Runtime ---
# 'development' enables pino-pretty; 'production' emits JSON logs
NODE_ENV=development
LOG_LEVEL=info