PORTFOLIO WEBSITE
Live site: https://mug1sha.github.io/
About
This is Godson Mugisha's personal portfolio site. It now includes a Groq-backed AI assistant and AI-enhanced page translation for the richer content that was previously left in English.
Features
- Responsive portfolio UI
- Project showcase with live links
- Groq-powered assistant for portfolio Q&A
- AI-assisted language switching for dynamic section copy
Tech
- HTML, CSS, JavaScript
- Node.js CLI assistant
- Groq API via
groq-sdk
Environment
Create a local .env file from .env.example and set:
GROQ_API_KEY=your_key_here
GROQ_MODEL=llama-3.1-8b-instant
ALLOWED_ORIGIN=https://your-vercel-domain.vercel.appNotes on deployment
The frontend is static, so the Groq key must stay server-side. The api/groq.js handler is designed for serverless platforms such as Vercel. GitHub Pages alone cannot safely run the Groq-backed assistant because it cannot host secret server-side functions.
Vercel setup
- Import the GitHub repository into Vercel.
- Keep the project as an "Other" framework project.
- Set the root directory to the repository root.
- Add these environment variables in Vercel:
GROQ_API_KEY,GROQ_MODEL, andALLOWED_ORIGIN. - Set
ALLOWED_ORIGINto your production Vercel URL or custom domain, for examplehttps://godson-portfolio.vercel.app. - Deploy.
Production notes
vercel.jsonadds security headers and disables API caching.- The API now enforces an optional allowed origin check, limits payload sizes, and keeps Groq work bounded for better latency and lower token waste.
- If you later attach a custom domain, update
ALLOWED_ORIGINin Vercel to match it exactly.
CLI assistant
npm install
npm start