Two production-ready, Vercel-deployable implementations of the Groq Code Companion assistant, sharing the same persona and task modes.
| Folder | What it is | Deploy target |
|---|---|---|
web-nextjs/ |
Next.js 14 web app, streaming responses, Monaco editor, sidebar history | Vercel (recommended), any Node host |
telegram-bot/ |
Telegram bot, same persona, command-driven, per-chat memory | Vercel webhook, Docker, VPS polling |
cd web-nextjs
npm install
cp .env.example .env.local # paste GROQ_API_KEY
npm run dev # http://localhost:3000Deploy to Vercel: push to GitHub → import at https://vercel.com/new → add GROQ_API_KEY env var → Deploy.
cd telegram-bot
npm install
cp .env.example .env # paste GROQ_API_KEY + TELEGRAM_BOT_TOKEN
npm start # polling mode, runs anywhereDeploy to Vercel: push to GitHub → import → add env vars → register webhook (see telegram-bot/README.md).
Both clients use the same system prompt (in lib/persona.ts for the web app and src/persona.js for the bot), so the assistant behaves identically across surfaces. The persona mirrors the "Groq Code Companion" custom agent — professional, formal, technically precise, optimized for developers.
- 5 task modes: Generate · Debug · Review · Refactor · Explain
- Code-context attachment for richer prompts
- Multi-language support (TS/JS/Python/Go/Rust/Java/C++/SQL/Bash/...)
- Conversation memory per session / per chat
- Server-side API key (never exposed to clients)
Both clients default to llama-3.3-70b-versatile on Groq — the strongest general/coding model on the platform. Override with GROQ_MODEL env var.
MIT — use freely.