A small static web app that crafts WhatsApp queries for Bino using an AI backend.
index.html— UI for input and outputstyle.css— stylingscript.js— front-end logic calling/api/chatapi/chat.js— serverless API route (Vercel) that calls Groq APIREADME.md— this file
- User enters need, city, budget, category.
- Frontend sends POST to
/api/chat. - API route calls Groq Chat Completions with
process.env.GROQ_API_KEY. - Response text is displayed and also converted to WhatsApp deep link.
This project is static HTML + serverless API. If dependencies exist, run:
npm installFor local API route testing, set:
export GROQ_API_KEY="gsk_..."Then run your dev server (for Vercel local dev or any static server).
If using Vercel CLI:
vercel devOpen http://localhost:3000 and test.
Go to Project Settings → Environment Variables:
- Key:
GROQ_API_KEY - Value: your Groq API key (starts with
gsk_) - Environment: Production (and Preview/Development as needed)
Then redeploy.
Something went wrongUI error: Check browser console and network tab. The API response likely failed becauseGROQ_API_KEYis missing.- Vercel push rejections: run
git pull --rebase origin mainthengit push.
vercelin project root.- Choose root directory (
.). - Set
GROQ_API_KEYin Environment Variables. - Deploy.
api/chat.js expects POST data (currently your front-end sends userNeed, city, budget, category) and calls Groq API with:
'Authorization': `Bearer ${process.env.GROQ_API_KEY}`So the key must be set as env var.
- If you changed the frontend to call
/api/chat, make sure API route exists. - Check
vercel logsfor runtime errors. - Add secrets only in Vercel settings, never commit keys.
- Open the page.
- Enter your need.
- Click “Craft My Bino Message”.
- Copy or send via WhatsApp.
A simple static HTML project with animated GIF assets.
Open index.html in your browser.