A modern, responsive portfolio website built with Next.js 15, TypeScript, and Payload CMS. Features a clean design with dark/light mode support, contact form with email integration, and a fully customizable admin panel.
- Modern Tech Stack: Next.js 15 with App Router, TypeScript, Tailwind CSS
- CMS Integration: Payload CMS for content management
- Database: PostgreSQL with Prisma-like adapter
- UI Components: Shadcn/ui components with Radix UI primitives
- Animations: Framer Motion for smooth animations
- Email Integration: Resend for contact form emails
- File Storage: Vercel Blob for file uploads
- Responsive Design: Mobile-first approach with responsive breakpoints
- Dark/Light Mode: Theme switching with next-themes
- SEO Optimized: Built-in SEO features and meta tags
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm, yarn, pnpm, or bun
- PostgreSQL database
- Git
git clone <your-repo-url>
cd portfolionpm install
# or
yarn install
# or
pnpm install
# or
bun installCreate a .env.local file in the root directory with the following variables:
# Database Configuration
DATABASE_URI=postgresql://username:password@localhost:5432/portfolio_db
# Payload CMS Configuration
PAYLOAD_SECRET=your-super-secret-payload-key-here
# Email Configuration (Resend)
RESEND_API_KEY=your-resend-api-key
# Vercel Blob (for file uploads)
BLOB_READ_WRITE_TOKEN=your-vercel-blob-token
# Optional: Custom domain for file uploads
NEXT_PUBLIC_BLOB_READ_URL=https://your-blob-domain.com- DATABASE_URI: PostgreSQL connection string for your database
- PAYLOAD_SECRET: A secure, random string for Payload CMS authentication
- RESEND_API_KEY: API key from Resend for email functionality
- BLOB_READ_WRITE_TOKEN: Token from Vercel Blob for file storage
- NEXT_PUBLIC_BLOB_READ_URL: Public URL for accessing uploaded files
-
Create a PostgreSQL database:
CREATE DATABASE portfolio_db;
-
Update the DATABASE_URI in your
.env.localfile with your actual database credentials. -
Run database migrations (Payload will handle this automatically on first run):
npm run dev
# Generate Payload types
npm run generate:types
# Generate import map for admin panel
npm run generate:importmapnpm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devThe application will be available at:
- Frontend: http://localhost:3000
- Admin Panel: http://localhost:3000/admin
- Navigate to http://localhost:3000/admin
- Create your first admin user account
- Log in to access the admin panel
- In the admin panel, go to Site Config
- Fill in your personal information:
- Site name
- Hero section (photo, name, title, description)
- Contact email
- About section content
- Footer information
- Experiences: Add your work experience and education
- Projects: Showcase your portfolio projects
- Skills: List your technical skills
- Navigation Links: Configure menu items
- Media: Upload images and files
- Global Styles:
app/(frontend)/globals.css - Component Styles: Individual component files with Tailwind CSS
- Theme Configuration:
components/theme-provider.tsx
- UI Components:
components/ui/(Shadcn/ui components) - Page Sections:
components/(Hero, About, Projects, etc.) - Admin Components:
components/admin/(Custom admin fields)
- Collections:
collections/(Payload CMS collection definitions) - Queries:
lib/queries.ts(Data fetching functions)
- Push your code to GitHub/GitLab
- Connect to Vercel:
- Go to vercel.com
- Import your repository
- Configure environment variables in Vercel dashboard
- Deploy: Vercel will automatically deploy on every push
Set these in your deployment platform:
DATABASE_URI=your-production-database-url
PAYLOAD_SECRET=your-production-secret
RESEND_API_KEY=your-resend-api-key
BLOB_READ_WRITE_TOKEN=your-vercel-blob-token
NEXT_PUBLIC_BLOB_READ_URL=https://your-blob-domain.com- Set up a production PostgreSQL database (e.g., Vercel Postgres, Supabase, Railway)
- Update DATABASE_URI with production credentials
- Deploy: The database schema will be created automatically
portfolio/
βββ app/ # Next.js App Router
β βββ (frontend)/ # Public frontend pages
β βββ (payload)/ # Payload CMS admin
β βββ api/ # API routes
βββ collections/ # Payload CMS collections
βββ components/ # React components
β βββ ui/ # Shadcn/ui components
β βββ admin/ # Custom admin components
βββ lib/ # Utility functions
βββ hooks/ # Custom React hooks
βββ context/ # React context providers
βββ email/ # Email templates
βββ actions/ # Server actions
βββ types/ # TypeScript type definitions
# Development
npm run dev # Start development server
# Production
npm run build # Build for production
npm run start # Start production server
# Payload CMS
npm run generate:types # Generate TypeScript types
npm run generate:importmap # Generate admin import map
# Utilities
npm run lint # Run ESLint-
Database Connection Error:
- Verify your
DATABASE_URIis correct - Ensure PostgreSQL is running
- Check database credentials
- Verify your
-
Admin Panel Not Loading:
- Run
npm run generate:importmap - Clear browser cache
- Check console for errors
- Run
-
Email Not Sending:
- Verify
RESEND_API_KEYis correct - Check Resend dashboard for API limits
- Ensure email domain is verified in Resend
- Verify
-
File Upload Issues:
- Verify
BLOB_READ_WRITE_TOKENis correct - Check Vercel Blob configuration
- Ensure proper CORS settings
- Verify
- Check the Next.js Documentation
- Review Payload CMS Documentation
- Open an issue in the repository
This project is open source and available under the MIT License.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
If you have any questions or need help setting up the project, please open an issue or contact the maintainer.