diff --git a/.env.example b/.env.example index 73adfe5..50bec30 100644 --- a/.env.example +++ b/.env.example @@ -5,8 +5,28 @@ AUTH_SECRET=replace-me DATABASE_URL=postgres://user:pass@host:5432/db # EGBE LiteLLM proxy — auto-injected by app-deploy.sh from the deploying instance -EGBE_AI_API_URL=https://proxy.gcp.egbe.dev/v1 +EGBE_AI_API_URL=https://litellm.gcp.egbe.dev EGBE_AI_API_KEY= # Public origin of this app — auto-injected by app-deploy.sh NEXT_PUBLIC_BASE_URL=http://localhost:3000 + +# --- analytics (umami) --- +# Auto-injected by app-deploy.sh after `analytics-site-create.sh ""` +NEXT_PUBLIC_UMAMI_SCRIPT_URL= +NEXT_PUBLIC_UMAMI_WEBSITE_ID= + +# --- billing (payment gateway) --- +# Auto-injected by app-deploy.sh from the deploying instance +EGBE_PAYMENT_GATEWAY_URL=https://payments.gcp.egbe.dev +EGBE_GATEWAYS_TOKEN= +EGBE_PAYMENT_GATEWAY_WEBHOOK_SECRET= +EGBE_PAYMENT_GATEWAY_WEBHOOK_HEADER=x-egbe-payment-signature + +# Stripe price ID for the Pro plan — set per-product after creating the product via +# the payment gateway API. Without it the upgrade button returns 501. +PRO_STRIPE_PRICE_ID= + +# App slug used in the webhook URL when creating checkout sessions. Must match the +# slug you passed to app-deploy.sh. +APP_SLUG=chatbot diff --git a/README.md b/README.md index f164e63..14cc904 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,59 @@ # EGBE Chatbot Template -Next.js chatbot wired to the EGBE LiteLLM proxy. Based on [vercel/chatbot](https://github.com/vercel/chatbot) (Apache 2.0), stripped of Vercel-specific bits and rewired for our infra. +Next.js chatbot wired to the EGBE infra. Based on [vercel/chatbot](https://github.com/vercel/chatbot) (Apache 2.0). -## Stack +## What's wired -- **Next.js 16** (App Router, standalone output) -- **AI SDK** + `@ai-sdk/openai-compatible` → routes to `EGBE_AI_API_URL` (our LiteLLM) -- **NextAuth** (credentials + guest) -- **Drizzle ORM** + Postgres (DB gateway) -- **shadcn/ui** + Tailwind +- **AI** via `@ai-sdk/openai-compatible` → `EGBE_AI_API_URL` (LiteLLM proxy) +- **Auth** — NextAuth credentials + guest mode +- **DB** — Drizzle ORM + Postgres (provisioned by app-deploy.sh) +- **Analytics** — Umami `