Interactive Portfolio Chat Assistant
A modern, interactive portfolio website that uses AI to create engaging conversations about your professional experience. Instead of static content, visitors can chat with an AI assistant that knows everything about your skills, projects, and career journey.
Intelligent conversations powered by OpenAI GPT models with personalized responses about your professional background.
Clean, responsive design with dark/light theme support, smooth animations, and accessibility compliance.
4 pre-built themes, extensive customization options, and centralized configuration files for easy setup.
CORS protection, request validation, rate limiting, and secure API key handling.
Code splitting, SEO optimization, analytics integration, and performance monitoring.
Built with Next.js 15, React 19, TypeScript, and modern development tools.
npm install
Create .env.local file:
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key_here
# Domain Configuration
ALLOWED_DOMAIN=localhost:3000
npm run dev
Open http://localhost:3000 to see your portfolio.
# Extract the downloaded files to your desired location
cd chatfolio-ai
npm install
sk-)# Copy the example file
cp env.local.example .env.local
Edit .env.local:
OPENAI_API_KEY=sk-your-actual-api-key-here
ALLOWED_DOMAIN=localhost:3000
app.config.ts)export const PERSONAL_INFO = {
// Replace with your actual information
FULL_NAME: 'Your Full Name',
FIRST_NAME: 'Your First Name',
LAST_NAME: 'Your Last Name',
PROFESSIONAL_TITLE: 'Your Job Title',
TAGLINE: 'Your Professional Tagline',
COMPANY_EXPERIENCE: 'Ex-Company1, Company2, Company3',
// Update contact information
EMAIL: '[email protected]',
PHONE: '+1-234-567-8900', // Optional
LOCATION: 'Your City, Country',
// Update social links
LINKEDIN_URL: 'https://www.linkedin.com/in/yourprofile/',
GITHUB_URL: 'https://github.com/yourusername',
PORTFOLIO_URL: 'https://yourwebsite.com',
// Update file paths
PROFILE_IMAGE: '/your-photo.jpg',
RESUME_PREVIEW_IMAGE: '/your-resume-preview.jpg',
RESUME_URL: 'https://your-resume-link.com',
RESUME_FILE_NAME: 'YourName_Resume.pdf',
}
ai-profile.ts)Replace the entire SYSTEM_MSG with your information:
export const SYSTEM_MSG = `You are [Your Name], a skilled [Your Profession] with [X] years of experience in [Your Field].
You have expertise in [Your Skills]. Your experience includes working at companies like [Company1], [Company2], and [Company3],
where you contributed to [Your Achievements].
Answer questions as if you are [Your Name] himself, providing insights about your experience, projects, technical skills,
and career. Keep responses professional, concise, and informative.
## Summary
- [Your professional summary]
- [Your specializations]
- [Your passions/interests]
## Technical Skills
- **Languages**: [Your programming languages]
- **Frontend**: [Your frontend technologies]
- **Backend**: [Your backend technologies]
- **Databases**: [Your database experience]
- **Cloud & DevOps**: [Your cloud/devops skills]
- **Testing**: [Your testing frameworks]
## Experience
**[Your Current Role] - [Company] ([Start Date] - Present)**
- [Achievement 1]
- [Achievement 2]
- [Achievement 3]
**[Previous Role] - [Company] ([Start Date] - [End Date])**
- [Achievement 1]
- [Achievement 2]
## Education
- **[University Name]**
**Degree**: [Your Degree] ([Start Year] - [End Year])
**GPA**: [Your GPA] (if you want to include)
## Contact/Connect details & Portfolio:
- **Email**: \${PERSONAL_INFO.EMAIL}
- **LinkedIn**: [Your Name](\${PERSONAL_INFO.LINKEDIN_URL})
- **GitHub**: [Your Username](\${PERSONAL_INFO.GITHUB_URL})
- **Portfolio**: [Your Website](\${PERSONAL_INFO.PORTFOLIO_URL})
## Licenses & Certifications
1. [Certification 1]: Issued by [Organization]
2. [Certification 2]: Issued by [Organization]
## Projects
### [Project Name] | [Tech Stack]
**[Date Range]** ([Project Type])
[Project Description]
#### Key Features:
- [Feature 1]
- [Feature 2]
- [Feature 3]
**Skills:** [Technologies used]
\`
src/app/text.ts)Customize the suggestion chips and pills:
export const SUGGESTION_CHIPS_TEXT = {
ABOUT_ME: {
text: "About me",
utterance: "tell me about yourself"
},
SKILLS: {
text: "Skills",
utterance: "what are your skills"
},
// Add more relevant to your profile
}
export const SUGGESTION_PILLS_TEXT = [
'Can I get your resume?',
'What projects have you done?',
'Tell me about [Your Specialty]?',
'Your experience with [Technology]?',
'Your work at [Company]?',
// Add more relevant questions
]
/public/johndoe.jpg with your photo/public/resume.jpg with your resume preview/src/app/favicon.ico with your faviconnpm run dev
http://localhost:3000ChatFolio AI comes with 4 beautiful pre-built themes located in /public/theme/:
/public/theme/violet.ts
/public/theme/blue.ts
/public/theme/green.ts
/public/theme/orange.ts
To use a pre-built theme, simply copy the theme configuration:
// Example: Using the Blue Theme
// Copy content from /public/theme/blue.ts to app.config.ts
export const THEME_CONFIG = {
CHAT_BUBBLES: {
USER: {
BACKGROUND: '221.2 83.2% 53.3%', // Blue theme colors
FOREGROUND: '210 40% 98%',
},
ASSISTANT: {
BACKGROUND: '0 0% 96%',
FOREGROUND: '0 0% 20%',
},
},
// ... complete theme configuration
}
Create your own theme by modifying colors and styling in app.config.ts:
export const THEME_CONFIG = {
CHAT_BUBBLES: {
USER: {
BACKGROUND: 'your-custom-hsl-color', // HSL color values
FOREGROUND: 'your-text-color',
},
ASSISTANT: {
BACKGROUND: 'your-assistant-bg-color',
FOREGROUND: 'your-assistant-text-color',
},
},
// Customize other elements
CHIP_SUGGESTIONS: {
BACKGROUND: 'your-chip-bg-color',
FOREGROUND: 'your-chip-text-color',
HOVER_BACKGROUND: 'your-chip-hover-color',
// ... more options
},
// Sidebar, Header, Chat Input, Dark Mode, etc.
// ... complete customization options
}
Each theme includes comprehensive styling for:
All colors use HSL (Hue, Saturation, Lightness) format:
BACKGROUND: '221.2 83.2% 53.3%' // H S L (no hsl() wrapper needed)
Adjust chat behavior in app.config.ts:
export const CHAT_CONFIG = {
MAX_USER_MSG_LENGTH: 100,
MAX_MESSAGE_ARR_LENGTH: 5,
MODEL_NAME: 'gpt-4o-mini', // or 'gpt-4o', 'gpt-3.5-turbo'
RESPONSE_LANGUAGE: 'English',
RESPONSE_TONE: 'professional, knowledgeable, and confident',
}
Update SEO settings in app.config.ts:
export const SEO_CONFIG = {
TITLE: `${PERSONAL_INFO.FULL_NAME} - ${PERSONAL_INFO.PROFESSIONAL_TITLE}`,
DESCRIPTION: `Professional portfolio of ${PERSONAL_INFO.FULL_NAME}...`,
KEYWORDS: [
PERSONAL_INFO.FULL_NAME,
PERSONAL_INFO.PROFESSIONAL_TITLE,
// Add relevant keywords
],
}
ChatFolio AI automatically generates a professional OpenGraph image that displays when your portfolio is shared on social media platforms like LinkedIn, Twitter, Facebook, etc.
app.config.ts and your profile photo.
/public/johndoe.jpgsrc/app/opengraph-image.tsxThe OG image automatically updates when you modify:
app.config.ts/public/johndoe.jpgControl optional features in app.config.ts:
export const FEATURE_FLAGS = {
ENABLE_OPEN_TO_WORK: true, // Show "Open to Work" badge
IS_DEMO: true, // Show floating theme switcher for demo purposes
}
The IS_DEMO flag controls the floating theme switcher button:
true (default): Shows the floating theme switcher with 5 color options for demo purposesfalse: Hides the theme switcher for production useIS_DEMO: false to remove the demo theme switcher and use your configured theme from THEME_CONFIG.
Customize the application font by modifying src/app/layout.tsx and tailwind.config.ts:
src/app/layout.tsx:
import { Inter } from 'next/font/google' // Replace Space_Mono with your preferred font
const inter = Inter({
variable: '--font-inter',
subsets: ['latin'],
weight: ['400', '500', '600', '700'], // Adjust weights as needed
})
<body className={`h-full overflow-x-hidden ${inter.variable} antialiased`}>
tailwind.config.ts:
fontFamily: {
sans: ['var(--font-inter)', 'Inter', 'sans-serif'], // Update font family
mono: ['var(--font-inter)', 'Inter', 'sans-serif'], // Update mono font if needed
},
public/fonts/ and update the font configuration accordingly.
Easiest and most optimized platform for Next.js applications.
Great for static sites with easy Git integration.
npm run build
# Upload .next folder to Netlify
npm run build.nextSimple deployment with automatic Next.js detection.
Full control with PM2 and Docker support.
# Install PM2
npm install -g pm2
# Start application
pm2 start npm --name "chatfolio-ai" -- start
docker-compose up -d
OPENAI_API_KEY=sk-your-actual-api-key
ALLOWED_DOMAIN=your-deployed-domain.com
GOOGLE_ANALYTICS_ID=G-XXXXXXXXXX
GOOGLE_TAG_MANAGER_ID=GTM-XXXXXX
your-project.vercel.appyour-site.netlify.appyour-app.railway.appyourdomain.com// In src/app/text.ts
export const SUGGESTION_PILLS_TEXT = [
'Your existing suggestions...',
'What is your favorite technology?',
'Tell me about your latest project',
// Add more suggestions
]
// Step 1: Choose from /public/theme/ folder
// Available: violet.ts, blue.ts, green.ts, orange.ts
// Step 2: Copy THEME_CONFIG to app.config.ts
export const THEME_CONFIG = {
CHAT_BUBBLES: {
USER: {
BACKGROUND: '142.1 76.2% 36.3%', // Green theme
FOREGROUND: '210 40% 98%',
},
// ... rest of configuration
}
}
POST /api/chat
{
"messages": [
{
"role": "user",
"content": "Tell me about your experience"
}
]
}
{
"role": "assistant",
"content": "I'm a skilled Software Engineer...",
"toolInvocations": []
}
ALLOWED_DOMAIN in environment variableshttps:// prefix in domain valueTry these solutions:
rm -rf .next node_modules
npm install
npm run build
chatfolio-ai/
├── app.config.ts # Main app configuration
├── ai-profile.ts # AI personality & knowledge
├── src/
│ ├── app/
│ │ ├── api/chat/ # Chat API endpoint
│ │ ├── components/ # React components
│ │ │ ├── AppContainer.tsx
│ │ │ ├── ChatInput.tsx
│ │ │ ├── ChatSuggestionPills.tsx
│ │ │ ├── ChipSuggestions.tsx
│ │ │ ├── Header.tsx
│ │ │ ├── MessageListContainer.tsx
│ │ │ ├── SidebarContent.tsx
│ │ │ ├── ThemeInitializer.tsx
│ │ │ ├── ThemeSwitch.tsx
│ │ │ └── tools/
│ │ │ ├── ContactCard.tsx
│ │ │ └── DownloadResume.tsx
│ │ ├── constants.ts # App constants
│ │ ├── text.ts # UI text content
│ │ ├── types.ts # TypeScript types
│ │ ├── globals.css # Global styles
│ │ ├── layout.tsx # Root layout
│ │ └── page.tsx # Home page
│ └── lib/
│ ├── ai/tools/ # AI tools (contact, resume)
│ ├── theme-utils.ts # Theme utilities
│ └── utils.ts # Utility functions
├── public/ # Static assets
│ ├── johndoe.jpg # Profile image
│ ├── resume.jpg # Resume preview
│ └── opentowork.png # Open to work badge
└── package.json # Dependencies
ALLOWED_DOMAIN to match deployed domainBefore going live, ensure you've completed these steps:
app.config.ts
ai-profile.ts
text.ts
First stable release of ChatFolio AI - Interactive Portfolio Chat Assistant
Ready to transform your portfolio into an interactive AI-powered experience!