Developer portfolio
A dark developer portfolio that opens with a live terminal typing its intro, then project cards, a work timeline and contact links.
"use client";
import { useEffect, useState } from "react";
import "./dev-portfolio.css";
const LINES = [
{ cmd: "whoami", out: "Sam Okafor, full-stack developer in Lagos" },
{ cmd: "cat focus.txt", out: "fast web apps, clean APIs, kind code reviews" },
{ cmd: "uptime", out: "8 years shipping, 0 years bored" },
];
const PROJECTS = [
{
name: "Ledgerline",
text: "Bookkeeping for market traders that works offline and syncs when signal returns.",
tech: ["React", "SQLite", "Go"],
},
{
name: "Ferry",
text: "An open-source job queue that 2,000+ teams run in production.",
tech: ["TypeScript", "Redis"],
},
{
name: "Quietroom",
text: "A study app for students on slow phones. Loads in under one second on 3G.",
tech: ["Svelte", "Workers"],
},
];
const JOBS = [
{
years: "2024 – now",
role: "Staff engineer",
place: "Payments startup, Lagos",
},
{
years: "2021 – 2024",
role: "Senior developer",
place: "Logistics platform, remote",
},
{ years: "2018 – 2021", role: "Developer", place: "Agency work for NGOs" },
];
/**
* DevPortfolio: a dark one-page portfolio for "Sam Okafor".
* The terminal types each command, then prints its output, line by line.
*/
export function DevPortfolio() {
// How many characters of the whole script are visible.
const script = LINES.map((l) => `$ ${l.cmd}\n${l.out}`).join("\n");
const [count, setCount] = useState(0);
useEffect(() => {
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
const id = requestAnimationFrame(() => setCount(script.length));
return () => cancelAnimationFrame(id);
}
let i = 0;
const id = setInterval(() => {
// Commands type letter by letter; output lines appear all at once.
const nl = script.indexOf("\n", i);
const atOutput = script.lastIndexOf("$", i) < script.lastIndexOf("\n", i);
i = atOutput ? (nl === -1 ? script.length : nl + 1) : i + 1;
setCount(Math.min(i, script.length));
if (i >= script.length) clearInterval(id);
}, 55);
return () => clearInterval(id);
}, [script]);
const done = count >= script.length;
return (
<div className="gu-dev">
<header className="gu-dev__hero">
<div
className="gu-dev__term"
onClick={() => setCount(script.length)}
role="img"
aria-label={LINES.map((l) => `${l.cmd}: ${l.out}`).join(". ")}
>
<div className="gu-dev__bar" aria-hidden="true">
<i /> <i /> <i /> <span>~/sam</span>
</div>
<pre aria-hidden="true">
{script.slice(0, count)}
<span className="gu-dev__caret" data-done={done || undefined} />
</pre>
</div>
<h1>
I build software that keeps working
<br />
when the network doesn't.
</h1>
</header>
<section aria-labelledby="gu-dev-projects" className="gu-dev__section">
<h2 id="gu-dev-projects">Projects</h2>
<div className="gu-dev__grid">
{PROJECTS.map((p) => (
<a key={p.name} href="#" className="gu-dev__card">
<h3>{p.name}</h3>
<p>{p.text}</p>
<ul aria-label="Built with">
{p.tech.map((t) => (
<li key={t}>{t}</li>
))}
</ul>
</a>
))}
</div>
</section>
<section aria-labelledby="gu-dev-work" className="gu-dev__section">
<h2 id="gu-dev-work">Experience</h2>
<ol className="gu-dev__timeline">
{JOBS.map((j) => (
<li key={j.years}>
<span className="gu-dev__years">{j.years}</span>
<span className="gu-dev__role">{j.role}</span>
<span className="gu-dev__place">{j.place}</span>
</li>
))}
</ol>
</section>
<footer className="gu-dev__footer">
<h2>Let's build something sturdy.</h2>
<nav aria-label="Contact">
<a href="mailto:sam@example.com">Email</a>
<a href="#">GitHub</a>
<a href="#">Résumé (PDF)</a>
</nav>
</footer>
</div>
);
}
Paste this into ChatGPT, Claude, Cursor, v0, Lovable or Bolt. It describes the layout, motion, colors and accessibility and includes the code, so the AI can rebuild it in any framework.
# Build this UI piece: Developer portfolio
You are a senior front-end engineer. Recreate the piece below in my project. If I don't say which framework I use, ask once, then build it in that framework (React, Vue, Svelte, Angular, Astro, plain HTML/CSS/JS or anything else). Keep the behavior, motion, colors, spacing and accessibility exactly as described. Keep the code clean and commented for beginners.
## What it is
A dark, one-page portfolio for a full-stack developer ("Sam Okafor"). It opens with a terminal window that types three commands and prints their output, next to a big headline. Then: three project cards with tech chips, an experience timeline, and a contact footer.
## Palette
Background #0e0e10, surfaces #18181b, text #f3eee3, muted #aea89c, hairlines rgba(243,238,227,0.1), accent #ff5a1f, terminal text lime #d7ff3a. Monospace: ui-monospace / JetBrains Mono / Menlo.
## Layout
- Container queries (container-type: inline-size). 20px side padding, max width 1100px.
- Hero: terminal + h1 side by side at ≥860px. H1 weight 800, clamp(2.2rem, 6cqi, 4rem), letter-spacing -0.045em: "I build software that keeps working / when the network doesn't."
- Terminal: 16px radius, 1px border, surface background, deep shadow. Title bar with three 10px dots (first orange) and "~/sam" on the right. Body is a <pre> in lime, 15px, line-height 1.75, min-height 11.5em.
- Section headings: small muted monospace labels ("Projects", "Experience").
- Projects: three columns at ≥760px. Cards: 24px padding, 18px radius, surface background, a "↗" in the top-right corner, title 22px, muted text, then pill-shaped tech chips in monospace.
- Timeline: left 2px hairline; each entry has a 12px ring dot on the line (first dot filled orange). At ≥700px three columns: years (monospace, muted), role (bold), company (muted).
- Footer: "Let's build something sturdy." large, then pill links (Email filled orange, the rest outlined; hover fills orange).
## Motion
- Terminal script: "$ command" lines type one character every 55ms; output lines appear whole. A solid cream block caret follows the text, and blinks (1s steps) once typing is done. Clicking or tapping the terminal skips to the end.
- Cards lift 4px with an orange border on hover/focus; the ↗ nudges up-right.
## Accessibility
- The terminal has role="img" and an aria-label with all commands and outputs, its visual text is aria-hidden.
- Tech chips are a list labelled "Built with". Timeline is an ordered list. Focus: 2px lime outline.
- prefers-reduced-motion: show the full terminal text immediately, no blinking caret, no card lift.
## Reference implementation
The original is written in React with one plain CSS file. Dependencies: none (plain React and CSS). Translate it faithfully; do not add new libraries unless my framework needs them.
### DevPortfolio.tsx
```tsx
"use client";
import { useEffect, useState } from "react";
import "./dev-portfolio.css";
const LINES = [
{ cmd: "whoami", out: "Sam Okafor, full-stack developer in Lagos" },
{ cmd: "cat focus.txt", out: "fast web apps, clean APIs, kind code reviews" },
{ cmd: "uptime", out: "8 years shipping, 0 years bored" },
];
const PROJECTS = [
{
name: "Ledgerline",
text: "Bookkeeping for market traders that works offline and syncs when signal returns.",
tech: ["React", "SQLite", "Go"],
},
{
name: "Ferry",
text: "An open-source job queue that 2,000+ teams run in production.",
tech: ["TypeScript", "Redis"],
},
{
name: "Quietroom",
text: "A study app for students on slow phones. Loads in under one second on 3G.",
tech: ["Svelte", "Workers"],
},
];
const JOBS = [
{
years: "2024 – now",
role: "Staff engineer",
place: "Payments startup, Lagos",
},
{
years: "2021 – 2024",
role: "Senior developer",
place: "Logistics platform, remote",
},
{ years: "2018 – 2021", role: "Developer", place: "Agency work for NGOs" },
];
/**
* DevPortfolio: a dark one-page portfolio for "Sam Okafor".
* The terminal types each command, then prints its output, line by line.
*/
export function DevPortfolio() {
// How many characters of the whole script are visible.
const script = LINES.map((l) => `$ ${l.cmd}\n${l.out}`).join("\n");
const [count, setCount] = useState(0);
useEffect(() => {
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
const id = requestAnimationFrame(() => setCount(script.length));
return () => cancelAnimationFrame(id);
}
let i = 0;
const id = setInterval(() => {
// Commands type letter by letter; output lines appear all at once.
const nl = script.indexOf("\n", i);
const atOutput = script.lastIndexOf("$", i) < script.lastIndexOf("\n", i);
i = atOutput ? (nl === -1 ? script.length : nl + 1) : i + 1;
setCount(Math.min(i, script.length));
if (i >= script.length) clearInterval(id);
}, 55);
return () => clearInterval(id);
}, [script]);
const done = count >= script.length;
return (
<div className="gu-dev">
<header className="gu-dev__hero">
<div
className="gu-dev__term"
onClick={() => setCount(script.length)}
role="img"
aria-label={LINES.map((l) => `${l.cmd}: ${l.out}`).join(". ")}
>
<div className="gu-dev__bar" aria-hidden="true">
<i /> <i /> <i /> <span>~/sam</span>
</div>
<pre aria-hidden="true">
{script.slice(0, count)}
<span className="gu-dev__caret" data-done={done || undefined} />
</pre>
</div>
<h1>
I build software that keeps working
<br />
when the network doesn't.
</h1>
</header>
<section aria-labelledby="gu-dev-projects" className="gu-dev__section">
<h2 id="gu-dev-projects">Projects</h2>
<div className="gu-dev__grid">
{PROJECTS.map((p) => (
<a key={p.name} href="#" className="gu-dev__card">
<h3>{p.name}</h3>
<p>{p.text}</p>
<ul aria-label="Built with">
{p.tech.map((t) => (
<li key={t}>{t}</li>
))}
</ul>
</a>
))}
</div>
</section>
<section aria-labelledby="gu-dev-work" className="gu-dev__section">
<h2 id="gu-dev-work">Experience</h2>
<ol className="gu-dev__timeline">
{JOBS.map((j) => (
<li key={j.years}>
<span className="gu-dev__years">{j.years}</span>
<span className="gu-dev__role">{j.role}</span>
<span className="gu-dev__place">{j.place}</span>
</li>
))}
</ol>
</section>
<footer className="gu-dev__footer">
<h2>Let's build something sturdy.</h2>
<nav aria-label="Contact">
<a href="mailto:sam@example.com">Email</a>
<a href="#">GitHub</a>
<a href="#">Résumé (PDF)</a>
</nav>
</footer>
</div>
);
}
```
### dev-portfolio.css
```css
.gu-dev {
--bg: #0e0e10;
--surface: #18181b;
--text: #f3eee3;
--muted: #aea89c;
--line: rgb(243 238 227 / 0.1);
--accent: #ff5a1f;
--volt: #d7ff3a;
--mono: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
container-type: inline-size;
padding: 0 20px;
background: var(--bg);
color: var(--text);
font-family: system-ui, sans-serif;
}
.gu-dev a {
color: inherit;
text-decoration: none;
}
.gu-dev a:focus-visible {
outline: 2px solid var(--volt);
outline-offset: 3px;
}
.gu-dev__hero {
display: grid;
gap: 40px;
max-width: 1100px;
margin: 0 auto;
padding: 56px 0 72px;
}
@container (min-width: 860px) {
.gu-dev__hero {
grid-template-columns: 1fr 1fr;
align-items: center;
}
}
.gu-dev__hero h1 {
margin: 0;
font-size: clamp(2.2rem, 6cqi, 4rem);
font-weight: 800;
line-height: 1;
letter-spacing: -0.045em;
}
/* Terminal */
.gu-dev__term {
overflow: hidden;
border: 1px solid var(--line);
border-radius: 16px;
background: var(--surface);
box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.9);
cursor: pointer;
}
.gu-dev__bar {
display: flex;
align-items: center;
gap: 6px;
padding: 12px 14px;
border-bottom: 1px solid var(--line);
color: var(--muted);
font: 0.75rem var(--mono);
}
.gu-dev__bar i {
width: 10px;
height: 10px;
border-radius: 50%;
background: rgb(243 238 227 / 0.16);
}
.gu-dev__bar i:first-child {
background: var(--accent);
}
.gu-dev__bar span {
margin-left: auto;
}
.gu-dev__term pre {
min-height: 11.5em;
margin: 0;
padding: 18px;
color: var(--volt);
font: 0.95rem/1.75 var(--mono);
white-space: pre-wrap;
}
.gu-dev__caret {
display: inline-block;
width: 0.6em;
height: 1.1em;
margin-left: 2px;
vertical-align: -0.2em;
background: var(--text);
}
.gu-dev__caret[data-done] {
animation: gu-dev-blink 1s steps(1) infinite;
}
@keyframes gu-dev-blink {
50% {
opacity: 0;
}
}
/* Sections */
.gu-dev__section {
max-width: 1100px;
margin: 0 auto;
padding: 40px 0;
}
.gu-dev__section h2 {
margin: 0 0 20px;
color: var(--muted);
font: 600 0.85rem var(--mono);
}
.gu-dev__grid {
display: grid;
gap: 12px;
}
@container (min-width: 760px) {
.gu-dev__grid {
grid-template-columns: repeat(3, 1fr);
}
}
.gu-dev__card {
position: relative;
display: flex;
flex-direction: column;
padding: 24px;
border: 1px solid var(--line);
border-radius: 18px;
background: var(--surface);
transition:
border-color 0.3s,
transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.gu-dev__card::after {
content: "↗";
position: absolute;
top: 20px;
right: 22px;
color: var(--muted);
transition:
transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
color 0.3s;
}
.gu-dev__card:hover,
.gu-dev__card:focus-visible {
border-color: var(--accent);
transform: translateY(-4px);
}
.gu-dev__card:hover::after {
color: var(--accent);
transform: translate(3px, -3px);
}
.gu-dev__card h3 {
margin: 0 0 8px;
font-size: 1.4rem;
letter-spacing: -0.03em;
}
.gu-dev__card p {
flex: 1;
margin: 0 0 20px;
color: var(--muted);
line-height: 1.5;
}
.gu-dev__card ul {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin: 0;
padding: 0;
list-style: none;
}
.gu-dev__card li {
padding: 4px 10px;
border: 1px solid var(--line);
border-radius: 999px;
font: 0.75rem var(--mono);
}
/* Timeline */
.gu-dev__timeline {
margin: 0;
padding: 0;
list-style: none;
}
.gu-dev__timeline li {
display: grid;
gap: 2px 24px;
padding: 18px 0 18px 24px;
border-left: 2px solid var(--line);
position: relative;
}
.gu-dev__timeline li::before {
content: "";
position: absolute;
left: -7px;
top: 24px;
width: 12px;
height: 12px;
border-radius: 50%;
background: var(--bg);
border: 2px solid var(--accent);
}
.gu-dev__timeline li:first-child::before {
background: var(--accent);
}
@container (min-width: 700px) {
.gu-dev__timeline li {
grid-template-columns: 160px 1fr 1fr;
}
}
.gu-dev__years {
color: var(--muted);
font: 0.85rem var(--mono);
}
.gu-dev__role {
font-weight: 700;
}
.gu-dev__place {
color: var(--muted);
}
.gu-dev__footer {
max-width: 1100px;
margin: 0 auto;
padding: 72px 0;
}
.gu-dev__footer h2 {
margin: 0 0 24px;
font-size: clamp(2rem, 6cqi, 3.6rem);
font-weight: 800;
letter-spacing: -0.045em;
line-height: 1;
}
.gu-dev__footer nav {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.gu-dev__footer a {
display: inline-flex;
align-items: center;
min-height: 44px;
padding: 0 18px;
border: 1px solid var(--line);
border-radius: 999px;
font-weight: 700;
transition:
background-color 0.25s,
color 0.25s,
border-color 0.25s;
}
.gu-dev__footer a:first-child,
.gu-dev__footer a:hover {
border-color: var(--accent);
background: var(--accent);
color: #0e0e10;
}
@media (prefers-reduced-motion: reduce) {
.gu-dev__caret[data-done] {
animation: none;
}
.gu-dev__card:hover,
.gu-dev__card:focus-visible {
transform: none;
}
}
```
You might also want
Next piece: Changelog timelineCeramicist portfolio with a pottery wheel
Portfolios, advanced
Data designer portfolio with a morphing chart
Portfolios, advanced
Motion designer portfolio
Portfolios, advanced