I'll provide you with a complete guide to set up and run your graphic design portfolio locally in VS Code without errors.
Open your terminal/command prompt and run:
npx create-next-app@latest graphic-design-portfolio --typescript --tailwind --eslint --app --src-dir --import-alias "@/*"When prompted, choose:
cd graphic-design-portfolio# Install shadcn/ui CLI
npx shadcn@latest initWhen prompted for shadcn/ui setup:
Then install the required UI components:
# Install all required shadcn/ui components
npx shadcn@latest add button
npx shadcn@latest add card
npx shadcn@latest add input
npx shadcn@latest add textarea
npx shadcn@latest add label
npx shadcn@latest add badgeInstall additional dependencies:
# Install Lucide React for icons
npm install lucide-react
# Install Next.js Image optimization dependencies
npm install next@latest react@latest react-dom@latestYour project structure should look like this:
graphic-design-portfolio/
├── app/
│ ├── about/
│ │ └── page.tsx
│ ├── services/
│ │ └── page.tsx
│ ├── contact/
│ │ └── page.tsx
│ ├── globals.css
│ ├── layout.tsx
│ └── page.tsx
├── components/
│ ├── ui/
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ ├── input.tsx
│ │ ├── textarea.tsx
│ │ ├── label.tsx
│ │ └── badge.tsx
│ ├── header.tsx
│ ├── category-filter.tsx
│ ├── portfolio-grid.tsx
│ └── project-modal.tsx
├── lib/
│ └── utils.ts
└── package.jsonMake sure your package.json includes these dependencies:
{
"name": "graphic-design-portfolio",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"next": "14.0.0",
"react": "^18",
"react-dom": "^18",
"lucide-react": "^0.294.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"tailwind-merge": "^2.0.0"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"eslint": "^8",
"eslint-config-next": "14.0.0"
}
}import type { Config } from 'tailwindcss'
const config: Config = {
darkMode: ["class"],
content: [
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
],
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
keyframes: {
"accordion-down": {
from: { height: "0" },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0" },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [require("tailwindcss-animate")],
}
export default confignpm install tailwindcss-animateimport { type ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}Now copy all the component files I provided earlier into their respective directories:
app/page.tsx, app/about/page.tsx, etc.)components/header.tsx, etc.)app/globals.cssIf you encounter TypeScript errors, add this to your next.config.js:
/** @type {import('next').NextConfig} */
const nextConfig = {
typescript: {
ignoreBuildErrors: false,
},
images: {
domains: ['placeholder.svg'],
},
}
module.exports = nextConfignpm run devYour portfolio should now be running at http://localhost:3000
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm install# Install missing type definitions
npm install --save-dev @types/node @types/react @types/react-dom# Restart the development server
npm run dev# Reinstall shadcn/ui components
npx shadcn@latest add button card input textarea label badgeInstall these VS Code extensions for better development experience:
code .npm run dev in the integrated terminalhttp://localhost:3000 in your browserYour graphic design portfolio should now be running without any errors! The blue and black color scheme will be applied, and all pages (Home, About, Services, Contact) will be fully functional.
I'll provide you with a complete step-by-step guide to push your portfolio to GitHub and deploy it on Vercel.
Open VS Code terminal (Ctrl + `` or View > Terminal) and run:
# Initialize git repository
git init
# Check git status
git statusCreate a .gitignore file in your project root with this content:
# Dependencies
/node_modules
/.pnp
.pnp.js
# Testing
/coverage
# Next.js
/.next/
/out/
# Production
/build
# Misc
.DS_Store
*.pem
# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Local env files
.env*.local
.env
# Vercel
.vercel
# TypeScript
*.tsbuildinfo
next-env.d.ts
# IDE
.vscode/settings.json
.idea/# Add all files to staging
git add .
# Create initial commit
git commit -m "Initial commit: Graphic Design Portfolio"Option A: Using GitHub CLI (Recommended)
# Install GitHub CLI if not installed
# Windows: winget install GitHub.cli
# Mac: brew install gh
# Linux: Check GitHub CLI installation guide
# Login to GitHub
gh auth login
# Create repository and push
gh repo create graphic-design-portfolio --public --push --source=.Option B: Using GitHub Website
graphic-design-portfolioModern graphic design portfolio with Pinterest-style layoutCopy the commands from GitHub's "push an existing repository" section:
# Add remote origin
git remote add origin https://github.com/YOUR_USERNAME/graphic-design-portfolio.git
# Push to GitHub
git branch -M main
git push -u origin maingraphic-design-portfolio and click "Import"Vercel will auto-detect your Next.js project. Configure these settings:
Project Name: graphic-design-portfolio
Framework Preset: Next.js
Root Directory: ./
Build Command: npm run build (auto-detected)
Output Directory: .next (auto-detected)
Install Command: npm install (auto-detected)If you have any environment variables, add them in the "Environment Variables" section:
# Example (add if you have any):
NEXT_PUBLIC_SITE_URL=https://your-domain.vercel.appAfter successful deployment, you'll get:
https://graphic-design-portfolio-username.vercel.appVercel automatically sets up continuous deployment:
main branch = automatic production deploymentMake a small change to test:
# Make a small change (e.g., update the header name)
# Edit components/header.tsx and change the name
# Commit and push
git add .
git commit -m "Update portfolio name"
git push origin mainVercel will automatically detect the change and redeploy!
# Pull latest changes
git pull origin main
# Create new branch
git checkout -b feature/new-feature
# Switch branches
git checkout main
# Check status
git status
# View commit history
git log --onelineType: CNAME
Name: www
Value: cname.vercel-dns.com
Type: A
Name: @
Value: 76.76.19.61# Check build locally first
npm run build
# If build fails, check the error logs in Vercel dashboard
# Common fixes:
npm install --save-dev @types/react @types/node# Add to Vercel dashboard under Settings > Environment Variables
NEXT_PUBLIC_SITE_URL=https://yoursite.vercel.appCreate app/not-found.tsx:
export default function NotFound() {
return (
<div className="min-h-screen flex items-center justify-center">
<div className="text-center">
<h1 className="text-4xl font-bold mb-4">404 - Page Not Found</h1>
<p className="text-muted-foreground">The page you're looking for doesn't exist.</p>
</div>
</div>
)
}✅ Repository Setup
✅ Vercel Deployment
✅ Testing
✅ Optional Enhancements
Your graphic design portfolio is now:
https://github.com/YOUR_USERNAME/graphic-design-portfoliohttps://graphic-design-portfolio-username.vercel.appShare your portfolio URL with clients and start showcasing your amazing work! 🚀