No description
Find a file
dmitry.galkin 3e21c2334c Initial commit: EGBE chatbot template
Stripped from vercel/chatbot (Apache 2.0):
- Dropped @vercel/* packages and AI Gateway
- Removed artifacts feature (code/text/sheet/image side panel)
- Switched AI provider to @ai-sdk/openai-compatible -> EGBE LiteLLM
- Replaced Vercel Blob upload with data URLs
- Dropped Redis resumable streams and rate limiter (in-memory now)
- Added Dockerfile (Next.js standalone) + entrypoint that runs migrations
- Wired DATABASE_URL, EGBE_AI_API_URL/KEY, NEXT_PUBLIC_BASE_URL for app-deploy.sh
2026-05-25 14:54:04 +04:00
.vscode Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
app Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
components Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
hooks Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
lib Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
public Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
.dockerignore Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
.env.example Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
.gitignore Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
biome.jsonc Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
components.json Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
docker-entrypoint.sh Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
Dockerfile Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
drizzle.config.ts Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
LICENSE Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
next.config.ts Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
package.json Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
pnpm-lock.yaml Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
postcss.config.mjs Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
proxy.ts Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
README.md Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00
tsconfig.json Initial commit: EGBE chatbot template 2026-05-25 14:54:04 +04:00

EGBE Chatbot Template

Next.js chatbot wired to the EGBE LiteLLM proxy. Based on vercel/chatbot (Apache 2.0), stripped of Vercel-specific bits and rewired for our infra.

Stack

  • 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

Available models (via LiteLLM)

claude-sonnet, claude-haiku, gpt-5.4, gpt-5.4-mini, kimi-k2.6, minimax-m2.7, qwen3-coder.

Edit lib/ai/models.ts to add or remove.

Deploy (from inside an OpenClaw instance)

${SKILLS_DIR}/scripts/app-deploy.sh <slug> chatbot-template

app-deploy.sh auto-injects:

  • DATABASE_URL (per-app Postgres)
  • EGBE_AI_API_URL, EGBE_AI_API_KEY (instance LiteLLM key)
  • NEXT_PUBLIC_BASE_URL (the deployed *.p.egbe.app host)

You also need AUTH_SECRET — set it via APP_ENV_JSON:

APP_ENV_JSON='{"AUTH_SECRET":"'$(openssl rand -base64 32)'"}' \
  ${SKILLS_DIR}/scripts/app-deploy.sh mychat chatbot-template

Local dev

cp .env.example .env.local
# fill in DATABASE_URL, EGBE_AI_API_KEY, AUTH_SECRET
pnpm install
pnpm db:migrate
pnpm dev

Tracking upstream

Pull new vercel/chatbot features manually — origin/upstream is not configured by default here. Add it back with:

git remote add upstream https://github.com/vercel/chatbot.git

License

Apache 2.0 — see LICENSE. Derivative work of Vercel, Inc.'s chatbot.