A USC-themed, high-energy personal portfolio built with Next.js App Router + Tailwind CSS + TypeScript + Framer Motion — featuring glassmorphism, 3D hover interactions, and a TrojanBot chatbot (Gemini-powered, server-side only).
Live: Portfolio_webLink
- USC brand system: Cardinal Red
#990000+ Gold#FFCC00 - High-design UI: glass panels, glow layers, subtle noise texture, 3D card tilt
- Motion discipline: Framer Motion page transitions + micro-interactions (smooth, not flashy)
- TrojanBot Chatbot:
- Runs via
/api/chat(server route) - Uses Gemini API if
GEMINI_API_KEYis set - Falls back to a local, deterministic reply system if key is missing
- Quick question chips + auto-scroll + auto-focus for fast interaction
- Runs via
- Resume dropdown:
Resume (SWE/MLE)download options
- Next.js (App Router)
- TypeScript
- Tailwind CSS v3
- Framer Motion
- lucide-react (icons)
app/
api/
chat/
route.ts # Gemini-backed portfolio assistant (server-side)
components/
HomeChatbot.tsx # TrojanBot widget (UI + quick chips)
Navbar.tsx
GlassPanel.tsx
ProjectCard.tsx
SectionHeading.tsx
... (other UI helpers)
contact/
page.tsx
projects/
page.tsx
resume/
page.tsx
layout.tsx
page.tsx # Home
globals.css
data.tsx # Central content management (profile/projects/resume/site)
tailwind.config.ts
postcss.config.js
next.config.js
public/
profile.jpg
Hao_Lou_resume_SWE_2026.pdf
Hao_Lou_resume_MLE_2026.pdf- Install
npm install- Environment Variables (Optional: Gemini Chatbot)
touch .env.localAdd:
GEMINI_API_KEY=YOUR_KEY_HERE.env* is ignored by git (safe). If you don’t set a key, the chatbot still works using fallback replies.
- Run Dev Server
npm run devOpen: http://localhost:3000
- Chat UI lives in: app/components/HomeChatbot.tsx
- Server route lives in: app/api/chat/route.ts
- The API key is read only on the server:
- process.env.GEMINI_API_KEY
- Never expose the key in client components (anything with "use client").
- Import GitHub repo into Vercel
- Set Environment Variable: • GEMINI_API_KEY (Production + Preview)
- Deploy
Every push to main triggers an automatic redeploy.
- Do not commit secrets.
- Keys belong in:
- .env.local (local)
- Vercel Environment Variables (production)
Quick check:
git ls-files | grep .envAll editable content is centralized in data.tsx:
- profile (intro, links, stats)
- resumeSectionsAll / resume content
- projects
- site (title, CTA, resume PDF links)