This folder is a minimal external backend for the portfolio chatbot.
The portfolio site is a static Jekyll site hosted in a GitHub Pages style setup, so the model call should not live in the front end. The front end widget stays in the main site, while this backend is deployed separately and called from the widget.
Deploy this folder as its own Vercel project with the root directory set to chatbot-backend.
The function is deployed at:
https://chatbot-backend-omega-lilac.vercel.app/api/chat
The route shape remains:
POST /api/chat
OPENAI_API_KEY: requiredOPENAI_MODEL: optional, defaults to gpt-5-miniKNOWLEDGE_BASE_URL: optional, defaults to https://www.beeelle.com/assets/data/belle-site-knowledge.jsonALLOWED_ORIGIN: optional, set this to https://www.beeelle.com after deploymentLocal development origins are also allowed:
http://127.0.0.1:4001http://localhost:4001If OPENAI_API_KEY is missing, the deployed function returns:
503 {"error":"Chat service is not configured."}
The front end is built to catch that response and fall back to the local site guide.
After deployment, copy the deployed endpoint into the portfolio site’s chatbot config:
_config.yml
Set:
chatbot.api_url: "https://chatbot-backend-omega-lilac.vercel.app/api/chat"
The widget and backend both use:
/assets/data/belle-site-knowledge.json
When the website content changes materially, update that JSON so the chatbot stays grounded in the latest site content.