ChatFolio AI v1.0.0

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.

Next.js 15x React 19x TypeScript 5x Tailwind CSS 3.4x OpenAI GPT

Features

AI-Powered Chat

Intelligent conversations powered by OpenAI GPT models with personalized responses about your professional background.

Modern UI/UX

Clean, responsive design with dark/light theme support, smooth animations, and accessibility compliance.

Highly Customizable

4 pre-built themes, extensive customization options, and centralized configuration files for easy setup.

Security Features

CORS protection, request validation, rate limiting, and secure API key handling.

Performance & SEO

Code splitting, SEO optimization, analytics integration, and performance monitoring.

Modern Architecture

Built with Next.js 15, React 19, TypeScript, and modern development tools.

Requirements

System Requirements
  • Node.js 18.0 or higher
  • Package Manager: npm, yarn, pnpm, or bun
  • OpenAI API Key (required for AI functionality)

Quick Start

Installation
1 Extract project files
2 Install dependencies
npm install
Environment Setup

Create .env.local file:

# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key_here

# Domain Configuration
ALLOWED_DOMAIN=localhost:3000
Run Development Server
npm run dev

Open http://localhost:3000 to see your portfolio.

Complete Setup Guide

Initial Setup
Extract the Project
# Extract the downloaded files to your desired location
cd chatfolio-ai
Install Dependencies
npm install
Environment Configuration
Get OpenAI API Key
  1. Visit OpenAI Platform
  2. Create a new API key
  3. Copy the key (starts with sk-)
Configure Environment Variables
# 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
Personal Configuration
Update Personal Information (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',
}
Configure AI Personality (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]
\`
Update UI Text (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
]
Add Your Assets
Profile Photo
  • Replace /public/johndoe.jpg with your photo
  • Recommended size: 400x400px
  • Format: JPG or PNG
Resume Preview
  • Replace /public/resume.jpg with your resume preview
  • Recommended size: 600x800px
  • Should be a screenshot of your resume
Favicon
  • Replace /src/app/favicon.ico with your favicon
Test Your Setup
Start Development Server
npm run dev
Open Your Portfolio
  • Visit http://localhost:3000
  • Test the chat functionality
  • Try different suggestion chips
  • Verify your information appears correctly
Test AI Responses
  • Ask questions about your experience
  • Verify the AI responds with your information
  • Test the contact and resume tools

Configuration

Pre-built Themes

ChatFolio AI comes with 4 beautiful pre-built themes located in /public/theme/:

Violet Theme
Default elegant violet theme

/public/theme/violet.ts

Blue Theme
Professional blue theme

/public/theme/blue.ts

Green Theme
Fresh green theme

/public/theme/green.ts

Orange Theme
Vibrant orange theme

/public/theme/orange.ts

Using Pre-built Themes

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
}
Custom 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
}
Theme Structure

Each theme includes comprehensive styling for:

  • Chat Bubbles: User and assistant message styling
  • Suggestion Chips: Interactive suggestion button styling
  • Pills: Conversation starter pill styling
  • Sidebar: Navigation sidebar styling
  • Header Buttons: Top navigation button styling
  • Chat Input: Message input area styling
  • Dark Mode: Complete dark mode variations for all components
Color Format

All colors use HSL (Hue, Saturation, Lightness) format:

BACKGROUND: '221.2 83.2% 53.3%' // H S L (no hsl() wrapper needed)
Chat Configuration

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',
}
SEO Configuration

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
  ],
}
Dynamic OpenGraph Image

ChatFolio AI automatically generates a professional OpenGraph image that displays when your portfolio is shared on social media platforms like LinkedIn, Twitter, Facebook, etc.

Automatic Generation: The OG image is dynamically created using your personal information from app.config.ts and your profile photo.
Features
  • Professional Design: Visiting card-style layout with gradient background
  • Dynamic Content: Automatically includes your name, title, tagline, and contact info
  • Profile Image: Uses your actual profile photo from /public/johndoe.jpg
  • Responsive Layout: Optimized for social media sharing (1200x630px)
  • Error Handling: Fallback design if profile image fails to load
Technical Details
  • Location: src/app/opengraph-image.tsx
  • Technology: Next.js ImageResponse API with Satori
  • Format: PNG (1200x630px)
  • Caching: Statically optimized and cached by Next.js
Customization

The OG image automatically updates when you modify:

  • Personal information in app.config.ts
  • Profile image in /public/johndoe.jpg
  • App domain or branding details
No Configuration Required: The OG image works out of the box and automatically reflects your personal branding.
Feature Flags

Control 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
}
Demo Mode

The IS_DEMO flag controls the floating theme switcher button:

  • true (default): Shows the floating theme switcher with 5 color options for demo purposes
  • false: Hides the theme switcher for production use
For Production: Set IS_DEMO: false to remove the demo theme switcher and use your configured theme from THEME_CONFIG.
Font Configuration

Customize the application font by modifying src/app/layout.tsx and tailwind.config.ts:

Changing the Font
1. Update Font Import in 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
})
2. Update Font Variable in the body className:
<body className={`h-full overflow-x-hidden ${inter.variable} antialiased`}>
3. Update Tailwind Config in 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
},
Popular Font Options
  • Inter: Modern, clean sans-serif
  • Roboto: Google's signature font
  • Poppins: Rounded, friendly appearance
  • Montserrat: Elegant, professional
  • Source Sans Pro: Adobe's open-source font
Custom Fonts: For custom fonts, place font files in public/fonts/ and update the font configuration accordingly.

Deployment

Netlify

Great for static sites with easy Git integration.

Manual Deployment
npm run build
# Upload .next folder to Netlify
Git-based Deployment
  • Connect GitHub repository
  • Build command: npm run build
  • Publish directory: .next
Railway

Simple deployment with automatic Next.js detection.

  1. Visit railway.app
  2. Create new project from GitHub repo
  3. Set environment variables
  4. Deploy automatically
Self-Hosted

Full control with PM2 and Docker support.

Using PM2
# Install PM2
npm install -g pm2

# Start application
pm2 start npm --name "chatfolio-ai" -- start
Using Docker
docker-compose up -d
Environment Variables for Deployment
Required Variables
OPENAI_API_KEY=sk-your-actual-api-key
ALLOWED_DOMAIN=your-deployed-domain.com
Optional Variables
GOOGLE_ANALYTICS_ID=G-XXXXXXXXXX
GOOGLE_TAG_MANAGER_ID=GTM-XXXXXX
Platform-Specific Domains
  • Vercel: your-project.vercel.app
  • Netlify: your-site.netlify.app
  • Railway: your-app.railway.app
  • Custom Domain: yourdomain.com

Customization

Adding New Suggestion Pills
// 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
]
Using Pre-built Themes
// 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
  }
}
Analytics Setup
Google Analytics
  1. Create a Google Analytics account
  2. Get your tracking ID (G-XXXXXXXXXX)
  3. Add to environment variables
Google Tag Manager
  1. Create a GTM account
  2. Get your container ID (GTM-XXXXXX)
  3. Add to environment variables

API Reference

Chat Endpoint

POST /api/chat

Request Body:
{
  "messages": [
    {
      "role": "user",
      "content": "Tell me about your experience"
    }
  ]
}
Response:
{
  "role": "assistant",
  "content": "I'm a skilled Software Engineer...",
  "toolInvocations": []
}

Troubleshooting

  • Verify your API key is correct
  • Check your OpenAI account has sufficient credits
  • Ensure API key has proper permissions

  • Update ALLOWED_DOMAIN in environment variables
  • Ensure domain matches exactly (no trailing slash)
  • No https:// prefix in domain value

Try these solutions:

rm -rf .next node_modules
npm install
npm run build

Project Structure

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

Security & Performance

Security Considerations
API Key Security
  • Never commit API keys to version control
  • Use environment variables for sensitive data
  • Rotate API keys regularly
  • Monitor API usage in OpenAI dashboard
CORS Configuration
  • Set ALLOWED_DOMAIN to match deployed domain
  • Don't use wildcards in production
  • Test CORS configuration after deployment
HTTPS
  • Always use HTTPS in production
  • Most platforms provide HTTPS automatically
  • For self-hosted, use Let's Encrypt
Performance & Monitoring
Performance Monitoring
  • Use Vercel Analytics (if on Vercel)
  • Set up Google Analytics
  • Monitor Core Web Vitals
  • Track API usage and costs
Error Tracking
  • Implement error boundaries
  • Use services like Sentry for error tracking
  • Monitor server logs
  • Set up uptime monitoring

Use Cases

Professional Portfolio
  • Job Seekers: Interactive resume and portfolio showcase
  • Freelancers: Client engagement and project showcase
  • Consultants: Professional service presentation
  • Developers: Technical skill demonstration
  • Designers: Creative portfolio with interactive elements
Business Applications
  • Personal Branding: Professional online presence
  • Client Engagement: Interactive client communication
  • Lead Generation: Contact and inquiry management
  • Networking: Professional connection facilitation
  • Marketing: Unique professional marketing tool

Final Checklist

Before going live, ensure you've completed these steps:

Configuration
Personal information updated in app.config.ts
AI personality configured in ai-profile.ts
UI text customized in text.ts
Profile photo and resume preview added
Testing & Deployment
Environment variables configured
Chat functionality tested
Responsive design verified
SEO metadata updated

Changelog

v1.0.0
Initial Release
October 13, 2025

First stable release of ChatFolio AI - Interactive Portfolio Chat Assistant

Added
  • AI-powered chat interface with OpenAI GPT integration
  • Modern responsive UI with dark/light theme support
  • 4 pre-built themes (Violet, Blue, Green, Orange)
  • Interactive suggestion chips and pills
  • Contact and resume download tools
  • Comprehensive configuration system
Features
  • Next.js 15 with React 19 and TypeScript
  • Tailwind CSS for styling
  • SEO optimization and analytics integration
  • Security features (CORS, rate limiting)
  • Multiple deployment options
  • Comprehensive documentation
Technical Specifications
Framework Next.js 15x
React Version React 19x
TypeScript TypeScript 5x

Ready to transform your portfolio into an interactive AI-powered experience!

Support

Email Support

Get help via email

[email protected]
Website

Visit our website

flerosoft.com
Documentation

Complete guide

This Documentation