How bethanyrobertson/portfolio-navigator works
Project Type and Purpose
• AI Portfolio Chatbot is a full-stack, server-rendered Next.js application with a conversational interface.
• Purpose: let visitors explore a developer/designer’s portfolio via an OpenAI-powered chat instead of traditional navigation.
File Structure
• Top level
• app/ – Next.js App Router folder (React server/client components, API routes)
• src/ – Mirror of app/, plus components/, data/, hooks/, lib/, types/
• public/assets/ – Static files (resume, avatars, SVGs)
• scripts/ – Automation: quick‐setup.js, validate‐content.js
• .env, next.config.js, tailwind.config.ts, package.json, tsconfig.json
• API back end
• app/api/chat/route.ts – chat endpoint wrapping OpenAI API
• app/api/health/route.ts – health check
• Front end
• app/layout.tsx, page.tsx – root layout & home page
• src/components/chat – ChatInterface, HomePageChat, thumbnail casestudy
• src/components/ui – generic Button, Input, ScrollArea
• src/sections, src/styles/chat.css – additional styling and UI demos
• Data/config
• src/data/assistant-config.ts – controls AI persona, progressive‐disclosure content hierarchy
• src/data/portfolio-knowledge.ts – portfolio content (experience, projects, skills)
• Hooks & Utilities
• src/hooks/useChat.ts & useSecureChat.ts – manage chat state & API calls
• src/lib/utils.ts – helper functions
• No database layer – all content is file‐based; external dependency is OpenAI API
README Insights
• 4-level Progressive Disclosure system drives conversation depth
• Deployment recommended on Vercel
• Customizable via single config file (assistant-config.ts) and portfolio-knowledge.ts
• Tech stack: Next.js 15, React 19, TypeScript, Tailwind CSS, Radix UI, Framer Motion, OpenAI GPT-4
Essential Architectural Elements
• Don’t over-compartmentalize; focus on meaningful boundaries:
• Client UI
• Next.js Server (API + SSR/SSG)
• Configuration files
• Static assets
• External AI service
• Detail the chat flow from user input to AI response and back