CodingIdeas.ai
← Browse All Ideas

Build Guide

How to Build a Portfolio Website

A portfolio built from scratch tells hiring managers more about your skills in 10 seconds than a resume does in 10 minutes.

Beginner1–3 days

Building your own portfolio is the highest-ROI project for any developer: immediately useful, permanently visible, and it forces you to learn deployment, performance optimisation, and responsive design.

Data model

The core tables you'll need before writing any UI.

Projectslug, title, description, tech_stack[], live_url, github_url, cover_image, featured, order
WorkExperiencecompany, role, start_date, end_date, description, logo_url

Build order

The sequence that minimises rewrites — build in this order.

1

Hero section

Build the first-fold content: your name, one-line role description ("Full-stack developer building AI tools"), a short bio (2–3 sentences), and two CTAs — "View My Work" (scrolls to projects) and "Contact Me".

2

Projects grid

Create a projects array in a data file. Render a 2-3 column grid of project cards with: cover image, title, 2-line description, tech stack tags, and links to live demo + GitHub.

3

About section

Write 3–4 paragraphs covering: who you are, what you build, what you've done professionally, and what you're currently learning. Add a skills grid and a downloadable CV button.

4

Contact form

Add a contact form with name, email, and message. Use Resend to send yourself an email on submission. Show a success message after sending. Add honeypot field for spam protection.

5

SEO and metadata

Set a title ("Your Name — Full-Stack Developer"), meta description, og:image (a 1200×630 branded card generated with @vercel/og), and canonical URL. Add JSON-LD Person schema.

6

Performance

Run Lighthouse. Common issues: images not using next/image, fonts loaded via <link> instead of next/font, unused CSS from a component library. Fix each until you hit 90+ on all metrics.

7

Dark mode

Use next-themes. Add a toggle button to the header. Store the preference in localStorage. The page should respect the user's OS preference on first load (prefers-color-scheme).

Done when

Observable behaviors that confirm V1 is complete — verify each one before you ship.

  • Portfolio loads in under 2 seconds on a simulated 3G connection (Lighthouse test)

  • Contact form sends an email to your inbox within 60 seconds of submission

  • All project cards link to a working live demo — no "coming soon" placeholders

  • Lighthouse scores 90+ on Performance, SEO, and Accessibility

  • Site is fully functional on mobile at 375px viewport width

First Run Requirement

Ship with 2 placeholder projects and placeholder profile data pre-filled. User updates the data files with their real content — no blank page on first deploy.

Build it with AI — Architect Prompt

Paste this into Claude, Cursor, Windsurf, or any AI coding tool. It includes the full context of this guide — data model, build order, done conditions, and pitfalls — so the AI starts with everything it needs.

ClaudeCursorWindsurfCopilotGemini
architect-prompt.txt
<context>
App: Portfolio Website
Difficulty: Beginner
Estimated build time: 1–3 days
Tech stack (intermediate): Next.js + Framer Motion + Sanity CMS — animated transitions and CMS-managed content

Data model:
  Project: slug, title, description, tech_stack[], live_url, github_url, cover_image, featured, order
  WorkExperience: company, role, start_date, end_date, description, logo_url

FIRST RUN REQUIREMENT:
Ship with 2 placeholder projects and placeholder profile data pre-filled. User updates the data files with their real content — no blank page on first deploy.

DONE WHEN — verify each before marking V1 complete:
  □ Portfolio loads in under 2 seconds on a simulated 3G connection (Lighthouse test)
  □ Contact form sends an email to your inbox within 60 seconds of submission
  □ All project cards link to a working live demo — no "coming soon" placeholders
  □ Lighthouse scores 90+ on Performance, SEO, and Accessibility
  □ Site is fully functional on mobile at 375px viewport width

Recommended build order:
  1. Define API contract + schema + seed data (always first)
  2. Hero section — Build the first-fold content: your name, one-line role description ("Full-stack developer building AI tools"), a short bio (2–3 sentences), and two CTAs — "View My Work" (scrolls to projects) and "Contact Me".
  3. Projects grid — Create a projects array in a data file. Render a 2-3 column grid of project cards with: cover image, title, 2-line description, tech stack tags, and links to live demo + GitHub.
  4. About section — Write 3–4 paragraphs covering: who you are, what you build, what you've done professionally, and what you're currently learning. Add a skills grid and a downloadable CV button.
  5. Contact form — Add a contact form with name, email, and message. Use Resend to send yourself an email on submission. Show a success message after sending. Add honeypot field for spam protection.
  6. SEO and metadata — Set a title ("Your Name — Full-Stack Developer"), meta description, og:image (a 1200×630 branded card generated with @vercel/og), and canonical URL. Add JSON-LD Person schema.
  7. Performance — Run Lighthouse. Common issues: images not using next/image, fonts loaded via <link> instead of next/font, unused CSS from a component library. Fix each until you hit 90+ on all metrics.
  8. Dark mode — Use next-themes. Add a toggle button to the header. Store the preference in localStorage. The page should respect the user's OS preference on first load (prefers-color-scheme).
  9. End-to-end verification — walk every Done When condition above (always last)

Known pitfalls to avoid:
  - Listing every project you've ever touched — quality over quantity. 4 strong projects with live demos beat 12 CRUD apps with no demos. Be ruthless: if you wouldn't demo it in an interview, cut it.
  - Forgetting mobile — most hiring managers browse on desktop but some check on mobile. Test at 375px width. Your project cards should stack to one column, text should be readable without zooming.
  - No live demo — "live demo coming soon" is a red flag. If the project is important enough to show, deploy it. Vercel and Railway both have free tiers. A working link is worth 10× a screenshot.
</context>

<role>
You are a Senior Full-Stack Engineer and product architect who has shipped production Portfolio Websites before. You know exactly where developers get stuck and how to structure the project to avoid rewrites.
</role>

<task id="step-1-clarify">
Before writing any code or spec, ask me 3–5 clarifying questions that will meaningfully change the architecture. Focus on: scale expectations, auth requirements, platform (web / mobile / both), must-have vs nice-to-have features for the MVP, and any hard constraints (budget, deadline, existing infrastructure).

<example>
BAD: "What tech stack do you want to use?" — too broad, doesn't change architecture decisions.
GOOD: "Do you need real-time sync across devices, or is single-device with periodic refresh acceptable? This decides whether we use WebSockets or simple REST polling and significantly affects infrastructure complexity."
</example>

⚠️ Do NOT start planning or writing code until I answer. Present the questions, then stop and wait.
</task>

<task id="step-2-architect">
After I answer your questions, produce the following in order:

1. TECHNICAL SPECIFICATION
   - System architecture using → to show data and event flow
   - Core data model (refer to data model in <context>)
   - API contract — list ALL routes with request/response shapes BEFORE any implementation
     WHY: agreeing on contracts first prevents rewrites when frontend and backend shapes diverge
   - External APIs and integration points

2. MVP PLAN in three phases:

   SETUP   ✦ Step 1 (always): API contract + schema migration + seed data
     Done when: schema is migrated, seed script runs, app starts with demo data, zero manual setup.

   CORE FEATURES — build in this exact order:
   2. Hero section
   3. Projects grid
   4. About section
   5. Contact form
   6. SEO and metadata
   7. Performance
   8. Dark mode

   DONE WHEN — one observable condition per feature:
   □ Portfolio loads in under 2 seconds on a simulated 3G connection (Lighthouse test)
   □ Contact form sends an email to your inbox within 60 seconds of submission
   □ All project cards link to a working live demo — no "coming soon" placeholders
   □ Lighthouse scores 90+ on Performance, SEO, and Accessibility
   □ Site is fully functional on mobile at 375px viewport width

   STRETCH GOALS — post-launch additions that are explicitly out of V1 scope.

3. BLOCKER ANALYSIS
   Flag: API rate limits, auth complexity, scope risks, cold-start problems, top 2–3 failure modes.

   FIRST RUN REQUIREMENT: Ship with 2 placeholder projects and placeholder profile data pre-filled. User updates the data files with their real content — no blank page on first deploy.
   ✓ Done when: app launches with seed data and the full user journey works without any manual setup.

<self_check>
Before presenting your output, verify:
□ Every answer I gave to clarifying questions is reflected in the spec
□ Step 1 is ALWAYS: API contract + schema + seed — never UI first
□ Done When criteria are observable user behaviors, not internal states
□ The plan is realistic for one person to ship within 1–3 days
□ All known pitfalls from <context> are addressed in the spec
</self_check>
</task>

<task id="step-2.5-agents-md">
Generate an AGENTS.md file at the project root. This file is read automatically by Claude Code, Cursor, Windsurf, and all major AI coding tools at the start of every session.

Include:
- Project overview (2–3 sentences)
- Tech stack with exact version numbers
- Folder structure with one-line descriptions per directory
- Key architectural decisions and the WHY behind each
- Coding conventions: camelCase components, kebab-case files, max 200 lines per file, one concern per file
- Available commands: dev, build, test, lint, db:migrate, db:seed
- MVP scope boundaries — features explicitly out of V1

Note in the file: "Cursor users: symlink .cursorrules → AGENTS.md. Claude Code users: symlink CLAUDE.md → AGENTS.md."
</task>

<task id="step-3-implement">
Implement the full project in the exact order from step 2. For each step:
- Write complete code (no placeholders or TODOs)
- Confirm the step works before moving to the next

<constraints>
- Step 1 is ALWAYS: define all API routes + TypeScript request/response interfaces + run schema migration
  WHY: agreeing on contracts before writing a single component prevents shape mismatches that require rewrites
- Final step is ALWAYS: start the app and walk every Done When condition from <context> end-to-end
  WHY: a spec that passes unit tests but breaks the core user journey is not done
- Max 200 lines per file. WHY: every file must fit in one AI context window for complete reasoning
- One concern per file. WHY: mixing auth logic into API routes makes it impossible to reuse — extract to lib/auth.ts
- TypeScript strict mode, no `any` types. WHY: catches data shape mismatches at compile time, not in production
- All database queries in server components or API routes only. WHY: keeps credentials server-side
- All environment variables documented in .env.example. WHY: next developer sets up in under 5 minutes
</constraints>
</task>

How to use this prompt

  1. 1.Copy the prompt above
  2. 2.Open Claude, Cursor (Cmd+L), or Windsurf
  3. 3.Paste the prompt and send — the AI will ask 3–5 clarifying questions
  4. 4.Answer the questions, then it generates your full project spec
  5. 5.Continue in the same session to implement step by step

Common mistakes

What trips up most developers building this for the first time.

⚠️

Listing every project you've ever touched — quality over quantity. 4 strong projects with live demos beat 12 CRUD apps with no demos. Be ruthless: if you wouldn't demo it in an interview, cut it.

⚠️

Forgetting mobile — most hiring managers browse on desktop but some check on mobile. Test at 375px width. Your project cards should stack to one column, text should be readable without zooming.

⚠️

No live demo — "live demo coming soon" is a red flag. If the project is important enough to show, deploy it. Vercel and Railway both have free tiers. A working link is worth 10× a screenshot.

Recommended tech stack

Pick the level that matches your experience.

Beginner

Next.js + Tailwind CSS + Vercel — free hosting, instant deploys, great performance defaults

Intermediate

Next.js + Framer Motion + Sanity CMS — animated transitions and CMS-managed content

Advanced

Next.js + Three.js or React Three Fiber + GSAP — 3D and animation-heavy portfolio

Take it further — related ideas

Each comes with revenue math, a full build guide, and a prompt to paste into Claude or Cursor.