Chase Pelky - Portfolio Website
A modern, responsive portfolio website showcasing AI-focused software development projects. Built with Next.js 14, TypeScript, Tailwind CSS, and featuring a comprehensive admin panel for content management plus an AI chatbot assistant powered by the "Builder Beaver" mascot.
š Features
Public Portfolio
- Modern Design: Clean, professional design following comprehensive UX research
- Responsive: Mobile-first approach with seamless adaptation across all devices
- AI Chatbot: Interactive Builder Beaver assistant to answer questions about projects and skills
- Smooth Animations: Framer Motion animations with respect for reduced motion preferences
- Dynamic Projects: Real-time project data from database with image galleries
- Contact Forms: Integrated contact functionality with form validation
Admin Panel
- Secure Authentication: Clerk-powered admin access with role-based permissions
- Project Management: Full CRUD operations for projects (Create, Read, Update, Delete)
- Image Upload: Drag-and-drop image uploads with Supabase Storage integration
- Markdown Editor: Rich text editing with live preview for project descriptions
- Tech Tags: Dynamic technology tag management with autocomplete
- Form Validation: Comprehensive client and server-side validation using Zod
- Toast Notifications: Real-time feedback for all admin operations
Technical
- Accessibility: WCAG AA compliant with proper ARIA labels and keyboard navigation
- Performance: Optimized with Next.js 14 App Router and edge functions
- SEO Ready: Meta tags, structured data, and sitemap generation
š ļø Tech Stack
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS with CSS variables
- UI Components: shadcn/ui + Radix primitives
- Animations: Framer Motion
- Database: Supabase (PostgreSQL)
- Authentication: Clerk
- AI Integration: OpenAI API
- Storage: Supabase Storage
- Deployment: Vercel
š§ Environment Variables
Copy .env.example to .env.local and fill in your API keys:
cp .env.example .env.local
Required variables:
- Clerk: Authentication service for admin panel
- Supabase: Database and storage backend
- OpenAI: Powers the AI chatbot assistant
See .env.example for the complete list of required environment variables.
š Project Structure
portfolio/
āāā app/ # Next.js App Router pages
ā āāā admin/ # Protected admin panel pages
ā ā āāā projects/ # Project management routes
ā ā āāā seed/ # Database seeding interface
ā āāā api/ # API routes and webhooks
ā ā āāā admin/ # Admin-specific API endpoints
ā ā āāā chat/ # AI chatbot API
ā ā āāā contact/ # Contact form submission
ā āāā globals.css # Global styles and CSS variables
āāā components/ # Reusable UI components
ā āāā admin/ # Admin panel components
ā ā āāā project-form.tsx # Project creation/editing form
ā ā āāā project-list.tsx # Admin project listing
ā ā āāā image-upload.tsx # File upload component
ā ā āāā markdown-editor.tsx # Rich text editor
ā ā āāā tech-tags-input.tsx # Technology tags input
ā āāā ui/ # shadcn/ui components
ā āāā layout/ # Header, Footer, Navigation
ā āāā sections/ # Page sections (Hero, About, etc.)
ā āāā shared/ # Shared components
ā āāā chatbot/ # AI chatbot components
āāā lib/ # Utility functions and configurations
ā āāā actions/ # Server Actions for data mutations
ā āāā supabase.ts # Supabase client configuration
ā āāā supabase-admin.ts # Admin Supabase client (bypasses RLS)
ā āāā validations.ts # Zod schemas for form validation
ā āāā constants.ts # App constants and configuration
āāā types/ # TypeScript type definitions
ā āāā supabase.ts # Generated Supabase types
āāā public/ # Static assets
ā āāā images/ # Project images and icons
āāā middleware.ts # Clerk authentication middleware
āāā .env.example # Environment variables template
šØ Design System
The project follows a comprehensive design system with:
- Colors: Cream background (#FFFDD0), Teal accent (#2A9D8F), Dark blue-black text (#1D1E22)
- Typography: Poppins for headings, Inter for body text, Fira Code for code
- Spacing: 8px base grid system
- Components: Consistent button styles, cards, forms, and animations
š§ Setup & Development
Prerequisites
- Node.js 18+
- npm or yarn
- Supabase account (database, storage, and authentication)
- Clerk account (admin authentication)
- OpenAI API key (chatbot functionality)
Installation
-
Clone and install dependencies:
git clone <repository-url> cd portfolio npm install -
Set up environment variables:
# Copy the example file and fill in your credentials cp .env.example .env.localFill in all required environment variables in
.env.local:# Clerk Authentication NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_... CLERK_SECRET_KEY=sk_test_... NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up # Supabase Configuration NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key # OpenAI API OPENAI_API_KEY=sk-your_openai_key -
Set up Supabase database:
Run the following SQL in your Supabase SQL Editor:
-- Projects table (main content) CREATE TABLE projects ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, title TEXT NOT NULL, slug TEXT UNIQUE NOT NULL, short_desc TEXT NOT NULL, long_desc TEXT NOT NULL, outcome TEXT, tech TEXT[] NOT NULL DEFAULT '{}', repo_url TEXT, demo_url TEXT, image_url TEXT, created_at TIMESTAMPTZ DEFAULT NOW(), updated_at TIMESTAMPTZ DEFAULT NOW() ); -- Contact messages table CREATE TABLE contact_messages ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, name TEXT NOT NULL, email TEXT NOT NULL, company TEXT, message TEXT NOT NULL, created_at TIMESTAMPTZ DEFAULT NOW() ); -- Chat logs table CREATE TABLE chat_logs ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, user_message TEXT NOT NULL, bot_response TEXT NOT NULL, created_at TIMESTAMPTZ DEFAULT NOW() ); -- Enable Row Level Security ALTER TABLE projects ENABLE ROW LEVEL SECURITY; ALTER TABLE contact_messages ENABLE ROW LEVEL SECURITY; ALTER TABLE chat_logs ENABLE ROW LEVEL SECURITY; -- RLS Policies (public read, service role write) CREATE POLICY "Allow public read access" ON projects FOR SELECT USING (true); CREATE POLICY "Allow public read access" ON contact_messages FOR SELECT USING (true); CREATE POLICY "Allow public read access" ON chat_logs FOR SELECT USING (true); -
Set up Supabase Storage:
Create a storage bucket for project images:
- Go to Storage in your Supabase dashboard
- Create a new bucket named
project-images - Set it to Public for image access
- Configure CORS if needed
-
Set up Clerk Authentication:
- Create a Clerk application
- Configure sign-in/sign-up pages
- Add your domain to allowed origins
- Copy the API keys to
.env.local
-
Run the development server:
npm run devOpen http://localhost:3000 to view the site.
Initial Data Setup
-
Access the admin panel:
- Navigate to
/admin(requires Clerk authentication) - Sign up/sign in through Clerk
- Navigate to
-
Seed initial projects:
- Go to
/admin/seed - Click "Seed Projects" to populate initial project data
- This migrates hardcoded projects from
lib/constants.tsto the database
- Go to
-
Upload project images:
- Edit each project in
/admin/projects - Upload hero images for better visual presentation
- Edit each project in
Development Workflow
- Frontend changes: Edit components, styles, or pages as needed
- Database changes: Update SQL schema in Supabase, regenerate types
- Admin features: Add new admin components in
components/admin/ - API changes: Modify Server Actions in
lib/actions/or API routes inapp/api/ - Type safety: Run
npm run type-checkto verify TypeScript
š Content Management
Projects (Admin Panel)
Manage projects through the secure admin interface at /admin:
Creating Projects:
- Navigate to
/adminand click "New Project" - Fill out comprehensive project details
- Upload hero images via drag-and-drop
- Add technology tags with autocomplete
- Write detailed descriptions with Markdown support
- Set outcomes and add repository/demo links
Editing Projects:
- Browse projects in the admin dashboard
- Use search functionality to find specific projects
- Edit any project details including images
- Changes reflect immediately on the public site
Project Features:
- Rich Text Editor: Markdown support with live preview
- Image Upload: Automatic optimization and storage in Supabase
- Tech Tags: Dynamic tag system with suggestions
- Form Validation: Real-time validation with error messages
- Responsive Forms: Mobile-friendly admin interface
Personal Information
Update static content in lib/constants.ts:
- Developer name, title, bio
- Skills and technologies list
- Social media links
- Contact information
AI Chatbot
Customize chatbot behavior:
- Pre-seeded Responses: Update
CHATBOT_QAinlib/constants.ts - Dynamic Project Info: Chatbot automatically learns about new projects from database
- Conversation Logging: All chats stored in Supabase for analysis
Database Management
Direct database access via Supabase dashboard:
- Projects Table: View, edit, or delete projects directly
- Contact Messages: Monitor form submissions
- Chat Logs: Analyze chatbot conversations
- Storage: Manage uploaded images and files
š Deployment
Vercel (Recommended)
-
Connect to Vercel:
npm install -g vercel vercel login vercel -
Set environment variables in Vercel dashboard:
# Clerk Authentication NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_... CLERK_SECRET_KEY=sk_live_... NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up # Supabase Configuration NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key # OpenAI API OPENAI_API_KEY=sk-your_openai_key -
Production Configuration:
- Ensure Clerk is configured for production domain
- Verify Supabase RLS policies are properly set
- Test admin panel functionality
- Configure custom domain and SSL
-
Post-Deployment Setup:
- Seed initial project data via
/admin/seed - Upload project images through admin panel
- Test contact forms and chatbot functionality
- Seed initial project data via
Alternative Deployments
The app can also be deployed to:
- Netlify: Full Next.js support with serverless functions
- Railway: Database and app hosting in one platform
- DigitalOcean App Platform: Scalable container deployment
- AWS Amplify: Full-stack deployment with CI/CD
Security Considerations for Production
- Use production Clerk keys (not test keys)
- Enable Supabase RLS policies for all tables
- Configure CORS policies for your domain
- Set up proper error monitoring
- Use HTTPS for all external integrations
š§ Development Commands
# Development
npm run dev # Start development server with hot reload
npm run build # Build optimized production bundle
npm run start # Start production server locally
# Code Quality
npm run lint # Run ESLint with auto-fix
npm run lint:check # Check linting without fixing
npm run type-check # Full TypeScript type checking
# Database
npm run db:types # Generate TypeScript types from Supabase
npm run db:reset # Reset local database (if using local Supabase)
š ļø Admin Panel Guide
Access & Authentication
- Navigate to
/adminon your deployed site - Sign in through Clerk authentication
- Access is automatically granted to authenticated users
Managing Projects
- Dashboard: View all projects with search and filtering
- Create: Add new projects with rich form validation
- Edit: Update existing projects with live preview
- Delete: Remove projects with confirmation dialogs
- Images: Upload and manage project screenshots
Content Features
- Markdown Support: Rich text editing with live preview
- Technology Tags: Auto-complete tag system
- Image Upload: Drag-and-drop with automatic optimization
- Form Validation: Real-time client and server validation
- Toast Notifications: Immediate feedback for all actions
šÆ Features Roadmap
Completed ā
- [x] Admin Panel: Full CRUD operations for projects
- [x] Image Upload: Supabase Storage integration
- [x] Authentication: Clerk-based secure admin access
- [x] Database Integration: Supabase with RLS policies
- [x] Form Validation: Comprehensive client/server validation
- [x] Markdown Editor: Rich text editing with preview
- [x] Responsive Design: Mobile-first admin interface
- [x] Contact Forms: Working contact form with validation
- [x] AI Chatbot: OpenAI-powered assistant
Planned Enhancements š§
- [ ] Email Notifications: Admin alerts for new contact messages
- [ ] Blog Section: Content management for technical articles
- [ ] Analytics Dashboard: Track visitor engagement and interactions
- [ ] Advanced Search: Full-text search across projects and content
- [ ] Bulk Operations: Mass edit/delete capabilities in admin
- [ ] Content Scheduling: Draft and scheduled publish functionality
- [ ] Image Gallery: Multiple images per project with lightbox
- [ ] SEO Optimization: Advanced meta tag management
- [ ] Performance Monitoring: Real-time site performance tracking
š Performance
The site is optimized for:
- Core Web Vitals: LCP < 2.5s, FID < 100ms, CLS < 0.1
- Lighthouse Score: 90+ across all categories
- Bundle Size: Optimized with code splitting and tree shaking
- SEO: Comprehensive meta tags and structured data
š Security
Authentication & Authorization
- Clerk Integration: Industry-standard authentication with JWT tokens
- Protected Routes: Middleware-based route protection for admin panel
- Session Management: Automatic token refresh and secure session handling
Data Protection
- Row Level Security: Supabase RLS policies prevent unauthorized data access
- Service Role Isolation: Admin operations use dedicated service role key
- Input Validation: Comprehensive sanitization with Zod schemas
- CSRF Protection: Next.js built-in protection against cross-site requests
Infrastructure Security
- Environment Variables: Secure configuration management
- HTTPS Enforcement: SSL/TLS encryption for all communications
- Secure Headers: CSP, HSTS, and other security headers
- File Upload Security: Validated file types and size limits
- Database Encryption: Supabase provides encryption at rest and in transit
š¬ Contact
For questions about this portfolio or potential collaborations:
- Email: [email protected]
- LinkedIn: linkedin.com/in/chasepelky
- GitHub: github.com/loviti
Built with ā¤ļø by Chase Pelky.