DEV Community

Cover image for Build a Portfolio That Opens Doors and Launch It as a Website with AI.

Build a Portfolio That Opens Doors and Launch It as a Website with AI.

What I taught at Google DevFest 2026, written up as a practical playbook: decide the goal, curate the evidence, and use Gemini, Google AI Studio, Antigravity, and Cloud Run to make it live.


Most portfolios fail for a simple reason. They show work, but they don't make a decision easier for the person looking at them.

A recruiter has about a minute. A potential client wants to know whether you can solve their problem. Neither wants a gallery of everything you have ever made. They want answers to three questions: who is this person, is their work relevant to me, and what do I do next?

At DevFest 2026, I gave a session built around that idea. The first half is design strategy. The second half is engineering: turning that strategy into a deployed website with AI-assisted development. This article is the written version, including the parts I only had time to mention on stage.

One rule runs through everything below: design the portfolio before you prompt anything. AI is a fast builder, but it builds exactly what you describe. A vague description gives you a vague website, quickly.


## Part 1: Portfolio design

Start with one goal

Before choosing a single project, pick the action you want a visitor to take. There are three:

  1. Get hired: show decisions, technical depth, and the ability to contribute to a team.
  2. Win clients: show outcomes, process, and the value of your services.
  3. Sell a product: show that it works and make buying frictionless.
  4. Each goal changes what counts as evidence. Trying to serve all three audiences at once usually serves none of them.

I also think of a portfolio as creating value in three ways: Brand (identity and visual language), Product (user-experience thinking), and Build (working solutions). Your goal decides which of the three leads.

Curate, don't collect

The most common mistake I see is too many projects. Three to five is the right range, and order matters: lead with the work you want to do more of, not the work you did most recently.

Check that your set shows different kinds of thinking. In my teaching example, one project shows brand thinking (a neighbourhood café identity), one shows product thinking (a checkout-flow redesign), and one shows technical choices (a working, deployed app). Each piece earns its place by proving something the others don't.

For every project, ask four questions:

  1. Does it support my goal?
  2. Does it demonstrate a skill my target audience cares about?
  3. Can I explain the decisions behind the result?
  4. Do I have honest evidence of its quality or impact?

Write each project as a short case study

Explain decisions, not just the finished screen. A four-beat structure works for almost any project:

  1. Problem: What was broken or unclear? The café menu was hard to scan at the counter.
  2. My role: What did you personally own? I redesigned the menu layout and type hierarchy.
  3. Decision: What trade-off did you make, and why? I grouped drinks by temperature and right-aligned prices.
  4. Evidence: What shows it worked? Large before-and-after layouts, a working demo, test results, and real feedback only if you have it.

On that last point: never invent metrics. Made-up percentages are easy to spot and expensive when you are caught. A clear before and after with honest limitations is more credible than a number you cannot support.

Match the proof to your role:

Role, Evidence that persuades

  1. Designer: Brief and rationale, a brand or layout system, finished real-world applications.
  2. Developer: Working demo, technical decisions, tests and known limitations.
  3. Brand owner: Brand story and positioning, products or services, customer testimonials and results.

Turn three words into design decisions

"Make it look professional" is not a design brief. Pick three adjectives and translate each into something you can see and check:

  • Bold becomes large, confident typography that anchors every page.
  • Warm becomes a cohesive, friendly colour palette that fits your personality.
  • Organised becomes a consistent grid with clean spacing and alignment.

This step also makes AI output controllable later. "Bold, warm, organised" is a constraint a model can follow. "Cool and modern" is not.

Use references, but extract rules

Studying other people's work is fine. Copying it is not, and it doesn't scale, because a screenshot is not a system. The habit I recommend is Reference
→ Rule: look at a design you admire, work out why it works, and write down the decision behind it.

  • Typography: pair a clear heading with a concise caption.
  • Colour: extract a balanced accent palette and apply it consistently.
  • Layout: balance one focal visual with clean, scannable text.
  • Those rules are portable. You can apply them to your own content, and later paste them straight into a prompt.

Branding starts before the logo

If you present brand work, show that you started with strategy. Using the café example:

  1. Audience: people who want a familiar local coffee spot.
  2. Promise: a friendly place for an everyday coffee.
  3. Personality: warm, approachable, easy to recognise.

Only then do the logo, menu and cups make sense. Show the system: the elements, the rules, then the applications. A single logo on a white background says very little. The same logo on a cup, a menu and a paper bag, governed by written rules, says you can build a brand that holds together.

Give the site a clear order

The architecture I recommend is deliberately simple:

  1. Intro: your name, your role, what you offer.
  2. Work: three to five curated projects that match your goal.
  3. Case studies: problem, role, decisions, evidence.
  4. Contact: one clear next step, such as a single "Let's talk" button.

One call to action. Not four social icons, a contact form, and a newsletter. If someone is ready to reach out, remove every obstacle.

The five-minute planning canvas

Before writing a single prompt, fill in five rows:

If you can fill this in, you already have most of your prompt.


Part 2: Bring a brand system, not a mood

This is where many AI-generated sites go wrong. If you don't constrain colour, type, and spacing, the model picks defaults, and defaults look like everyone else's.

In the live demo, I attached a brand guideline built for a fictional designer-developer, "AM". It defined a monogram with clear-space and minimum-size rules, a four-colour palette with usage ratios, and a three-font pairing. Writing the rules as tokens gives the model something unambiguous to follow:


`BRAND SYSTEM (DEMO EXAMPLE)
Identity: "AM" geometric monogram, with clear space and a minimum size
Colours    : INK #181B20    primary text, dark fields
             PAPER #F2F0E9  default warm canvas
             COBALT #304CFF signature mark, primary actions
             PEACH #F6C6AE  supporting highlight panels
Balance: roughly 60% Paper / 25% Ink / 10% Cobalt / 5% Peach
Typography: Expression  expressive italic serif, one short opening line only
             Precision   clean sans for headlines and body
             Technical   monospace for labels, tags and metadata
Spacing    : one consistent grid, for example an 8px scale`
Enter fullscreen mode Exit fullscreen mode

Pair this with an accessibility check: confirm that every text and background combination in your palette has enough contrast, because a beautiful palette that is hard to read is still a failure.


Part 3: Choosing your AI stack

Why bother with AI at all? A static PDF resume and a GitHub link with no demo are easy to ignore. A live, interactive site is hard to ignore, and a portfolio someone can actually use, for example by asking an assistant about your experience, shows skill in a way bullet points can't.

The practical question is which tool to use for which job. This is the selection logic I shared, which stays useful even as product names change:

Three principles hold whichever models you choose:

  1. Use the strong model to build and the cheap model to serve. The flagship writes your code once. The inexpensive model answers every visitor's question, so cost and latency per request matter far more there.
  2. Use long context to ground the model in your real material. With a context window of around a million tokens, you can hand over your CV, case studies, and brand guidelines in one pass instead of building retrieval infrastructure. Larger collections of documents may still justify a retrieval approach.
  3. Match the tool to the failure you can't afford. For a security-sensitive API route, pay for the stronger model. For a hover animation, don't.

A note on names and numbers: model names, benchmarks, and prices in this space change monthly. The model names above reflect what I used around the time of the session (November 2026). I have deliberately left out benchmark scores and prices because they go stale fast. Before you plan a budget or choose a model, check Google's current model and pricing pages.


Part 4: Vibe coding without losing control

"Vibe coding" has a reputation for being careless. Done properly, it isn't. I frame it as three actions, where you are the director and the AI is the crew:

  1. Describe. State layout, sections, and features in plain language. English, French, and Arabic all work. Avoid cramming unrelated requests into one giant instruction.
  2. Preview. Click through the running app instead of reading generated code first. A generated interface can look convincing in a screenshot and still have broken interactions.
  3. Steer. Give specific feedback, ideally with a screenshot, and tell the agent what to fix, animate, or connect. Work in small, verifiable steps rather than accepting the first output.

The skill is in the description. Compare two prompts.

The vague prompt

Build me a cool developer portfolio website.
Enter fullscreen mode Exit fullscreen mode

No goal, no style, no structure, no next step. The model has to guess everything, so you get the average of every portfolio it has seen.

The director prompt

`Goal: Get hired as an AI Engineer.
Audience: recruiters and engineering managers.
Style: Bold, Warm, Organised.`
Enter fullscreen mode Exit fullscreen mode
`Structure: Intro -> 3 curated projects, each with
Problem / My role / Decision / Evidence -> Contact.
Design rules:
- Use the attached brand guideline tokens exactly.
- Large, confident headings; one hero visual per project.
- Consistent 8px spacing grid. Mobile-first responsive layout.
Feature: an assistant grounded in my attached CV, called through
a server-side route. It must answer only from the CV and say so
when it doesn't know.
CTA: a single "Let's talk" button.
Before finishing, test the main user flows in the preview.`
Enter fullscreen mode Exit fullscreen mode

Everything in the second prompt came out of Part 1. That is the point: the design work isn't a phase before the "real" work. It is the prompt.

Steering works the same way. Instead of "make it look better", try: "The project cards have inconsistent vertical spacing. Use the same card height, align the titles, keep the descriptions readable, and keep the current palette. Check mobile and desktop widths."


Part 5: Build the AI assistant properly

A chatbot on your portfolio is a public endpoint that spends your money and speaks in your name. Treat it that way.

You don't need to train a model on your CV. For a personal portfolio, grounding is the better approach: give the model your approved information with every request and instruct it to stay within it.

`Visitor -> Portfolio frontend -> Backend API route -> Gemini API
                                       |
                              Approved CV and project notes`
Enter fullscreen mode Exit fullscreen mode

The principles:

  • Keep the API key on the server. The model call belongs in a backend route, never in browser JavaScript. Store secrets in Secret Manager or environment variables, not in the repository.
  • Ground it and constrain it. The instructions should say: answer only from the supplied material, say "I don't have that information" otherwise, and never invent employers, dates, or metrics. A hallucinated claim about your own experience is worse than no assistant at all.
  • Expect prompt injection. Visitors can type anything, and a model's instructions are not a security boundary. Put nothing in its context you wouldn't publish, and give it no tools it doesn't need. A CV assistant needs read-only access to text, nothing else.
  • Cap the cost. Set a maximum number of Cloud Run instances, rate-limit by IP or session, cap output tokens, and set a budget alert. Note that a budget alert notifies you; it does not stop spending by itself.
  • Test the answers, not just the page. Ask ten questions you know the answers to, plus five it should not be able to answer, and check that it declines the second group.

Here is a starter backend route. It is a sound starting point, not a finished production system:

`import express from 'express';
import rateLimit from 'express-rate-limit';
import { GoogleGenAI } from '@google/genai';
const router = express.Router();
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
// Check Google's current model list before choosing a model name.
const MODEL = process.env.CHAT_MODEL ?? 'gemini-3.8-flash';
const CV_CONTEXT = `
Name: Your Name
Role: Your role
Selected projects: ...
Contact: ...
`; // Only include what you are happy to publish.
const limiter = rateLimit({ windowMs: 60_000, limit: 10 });
type Turn = { role: 'user' | 'model'; text: string };
function cleanHistory(input: unknown): Turn[] {
  if (!Array.isArray(input)) return [];
  return input
    .slice(-6)
    .filter(
      (t): t is Turn =>
        t && (t.role === 'user' || t.role === 'model') &&
        typeof t.text === 'string' && t.text.length <= 1000
    );
}
router.post('/api/chat', limiter, async (req, res) => {
  try {
    const { message, history } = req.body ?? {};
    if (typeof message !== 'string' || !message.trim() || message.length > 1000) {
      return res.status(400).json({ error: 'Invalid message.' });
    }
    const contents = [
      ...cleanHistory(history).map((t) => ({ role: t.role, parts: [{ text: t.text }] })),
      { role: 'user' as const, parts: [{ text: message }] },
    ];
    const response = await ai.models.generateContent({
      model: MODEL,
      contents,
      config: {
        temperature: 0.2,
        maxOutputTokens: 350,
        systemInstruction:
          'You are the portfolio assistant for the owner of this site. ' +
          'Answer in 2-4 sentences using ONLY the verified context below. ' +
          'If something is not in the context, say you do not have that information ' +
          'and suggest the "Let\'s talk" button. Never invent experience or results.\n\n' +
          `VERIFIED CONTEXT:\n${CV_CONTEXT}`,
      },
    });
    return res.json({ reply: response.text ?? 'Sorry, I could not answer that.' });
  } catch (err) {
    console.error('Chat error:', err);
    return res.status(500).json({ error: 'Assistant temporarily unavailable.' });
  }
});`
Enter fullscreen mode Exit fullscreen mode

export default router;
What it already does: keeps the key server-side, validates input and client-supplied history, limits request rate, caps output length, lowers randomness, and grounds the answer. What it still needs before real traffic: per-session limits suited to your hosting setup (behind Cloud Run's proxy, you must configure trusted proxies for IP-based limits to work), logging that avoids storing visitors' personal data, and a review of how you handle abuse.


Part 6: From prompt to live URL

Here is the workflow I demonstrated live.

Step 1: Generate in AI Studio Build mode. Choose your model, attach your CV and brand guidelines, and run your director prompt. These attachments are the grounding material for both the design and the assistant.

Step 2: Test the preview like QA. Open the preview, try every link and navigation path, and check phone and desktop widths. If a build or runtime error appears, read the actual error, try the Fix action, then retest the exact action that failed. Retesting the same action is the habit that catches regressions. Also open the browser console and network tab: when a request fails, investigate the real cause instead of repeatedly asking the agent to regenerate everything.

Step 3: Polish in Antigravity. Export the project when you want finer control. An agent can review the project structure, tidy components, find responsive issues, investigate errors, and implement and test a feature. Agent changes still need your review: inspect the diffs, understand the commands it runs, and use the permission and sandbox controls rather than giving it unrestricted access to your machine.

Step 4: Publish to Cloud Run. From AI Studio, use Publish in the top-right corner, confirm your Google Cloud project and any required secrets such as the Gemini API key, and publish. You get a serverless HTTPS URL. If you deploy your own container instead, remember that Cloud Run expects your app to listen on the PORT environment variable on 0.0.0.0.

Step 5 (optional): Use your own domain. Be careful here. Cloud Run's domain mapping feature has been in Preview, and Google's documentation does not recommend it for production services. For a serious launch, put the service behind a load balancer, or use another supported option from Google's current guidance. Whichever route you take, set the DNS records you are given, then wait for propagation and the managed SSL certificate.

A successful deployment is not automatically a production-ready application. Open the live URL independently, confirm secrets are configured, test the assistant on the deployed version, and read the logs when something goes wrong. Cloud Run and Gemini API usage can cost money, so check your billing setup first.

A realistic expectation: a focused first version can come together in an afternoon if your planning canvas, content, and brand rules are ready. Getting it polished, tested, and safe to share takes longer, and that time is well spent.


The pre-launch checklist

Before you share the link, check:

  • Mobile and readable. Test on a real phone. Headings large, spacing clean, no sideways scrolling.
  • Grounded assistant. Answers match your CV, and it declines gracefully when it can't answer.
  • Live demos work. Every project link, video, and case study opens.
  • Clear next step. The "Let's talk" button works in one click.
  • Performance and accessibility. Compress images, set image dimensions, check contrast, make sure everything works with a keyboard, and run Lighthouse.
  • Security. No keys in client code, inputs validated, no private details exposed, errors that don't leak internals.

Then run the four questions of design review. Is it relevant (does every project support your goal), clear (can someone understand it quickly), consistent (do the pages feel connected), and actionable (is the next step easy)?

Common mistakes

Takeaways

  1. Decide the goal first. One audience, one action.
  2. Curate hard. Three to five projects, each proving something different.
  3. Write rules, not vibes. Three adjectives become typography, colour, and layout decisions.
  4. Make the prompt carry your design. The better the planning canvas, the better the output.
  5. Build with the strong model, serve with the cheap one.
  6. Treat your AI feature as production software. Server-side keys, grounding, rate limits, and testing.
  7. Ship a live URL, and verify it. A working link beats a description of one.

AI can make the journey from strategy to design to code to deployment much faster. It doesn't remove the responsibility for quality. You still need to understand your audience, review what is generated, protect your credentials, and test the result. Let AI help you build faster, but make sure your thinking is what makes the work valuable.

Further reading and official documentation


If you try this, I'd love to see what you build.

Thanks for reading! Follow for more essays on technology, design, and the things that make us improve.

Top comments (0)