// Case study deep-dive page const CaseStudy = ({ id, setPage }) => { const p = PORTFOLIO.find(x => x.id === id) || PORTFOLIO[0]; return (
{/* Hero */}
{p.tag} {p.year} Case study

{p.name}

{p.summary}

{/* Meta strip */}
{[ ['CLIENT', p.name], ['ROLE', p.role.join(' · ')], ['STACK', p.stack.join(' · ')], [p.metric[0].toUpperCase(), p.metric[1]], ].map(([l,v],i) => (
0 ? '1px solid var(--line)' : 'none'}}>
{l}
{v}
))}
{/* Hero shot */}
{/* Content */}
{[ {h:'The problem', b:`${p.name} came to us with a product that was working — and falling apart. Eight years of organic feature growth, a stack from 2017, and a team that had grown faster than the codebase could absorb. Page loads were trending the wrong direction. Onboarding completion was eroding. The team was burning out trying to patch the dam.`}, {h:'What we did', b:`We started with a two-week discovery: code audit, performance trace, user-session review, and conversations with the people who actually use the product every day. The output was a rebuild plan with a clear sequence — what to rewrite, what to leave alone, what to delete. No big-bang rewrite. No ten-month dark mode.`}, {h:'How it shipped', b:`We worked in two-week sprints, demoing every Friday. The team had access to a preview environment from day three. Every change shipped behind feature flags, gated by canary rollouts. By week eight, 60% of traffic was on the new system. By week twelve, the old code was deleted.`}, {h:'The result', b:`${p.metric[0]} moved from baseline to ${p.metric[1]}. More importantly, the team can ship again — features that used to take three weeks now go out on Tuesday afternoons. The codebase doubled in lines but halved in complexity, because we replaced six bespoke abstractions with one.`}, ].map(s => (

{s.h}

{s.b}

))}

What we'd do differently

{[ ['Spend a week on the test harness','before any production code. We retrofitted it in sprint 4 — it should have been sprint 0.'], ['Push back harder on scope creep','during week 6. The 3 features we said yes to cost us 2 sprints and shipped 1 result.'], ].map(([t,d])=>(
{t}
{d}
))}
{/* TOC sidebar */}
{/* Next case */}
NEXT CASE STUDY
{PORTFOLIO.filter(x=>x.id!==p.id).slice(0,2).map(np => ( ))}
); }; window.CaseStudy = CaseStudy;