Build a 95+ PageSpeed Site in Under 24h with Claude Code
Personal Thoughts

Build a 95+ PageSpeed Site in Under 24h with Claude Code

November 7, 2025 β€’12 min

🎯 Key Takeaways

  • βœ“ 95-98/100 PageSpeed score with a lean Vite + React setup
  • βœ“ Railway + Cloudflare is the $10/month hosting combo that keeps it fast
  • βœ“ Code-splitting and lazy loading cut LCP from 2.8s to 1.1s
  • βœ“ Initial bundle is just 93 KB (vs 250 KB with Next.js)
  • βœ“ Claude Code acts as a force multiplier: 23h of work instead of several days

The Challenge

Like many marketers, I have an arm-long list of half-started, never-finished side projects.

And like many, I run into the same frustration:

I have ideas, but I'm not a developer. So I stop at the mockup.

Or worse: I go to Webflow, Framer, or WordPress… and I lose control.

It's slow. It's heavy. And it's never really production-ready.

This time, I wanted to test something else.

A personal challenge: create a real website, fast, clean, without magic plugins, and without a developer's help. In less than 24 hours.

With Claude Code as my only copilot.

Setting a Clear Framework

I didn't want to go in all directions like usual.

So before even opening an editor, I took time to write down what I wanted.

Not a stack. Not a trendy tech.

Just concrete functional needs:

- A simple site with a few static pages + a blog

- Clean and responsive rendering

- A PageSpeed score above 90 on mobile

- Clean technical SEO: meta, JSON-LD, sitemap, robots.txt

- A lightweight backend (no CMS)

- Easy-to-deploy hosting at a low price

- And above all: a project I understand from A to Z

This framing prevented me from going wrong. It's also what allowed Claude to be super relevant in its responses.

Claude Code, the Partner Who Unblocks

I arrived with a clear prompt:

``

Create me a React + TypeScript app with Vite, Express backend,

simple routing, static pages, markdown content management,

PostgreSQL database, Tailwind CSS for styling, and hosting on Railway.

`

In a few seconds, I had:

- all files well organized

- a functional backend base

- a responsive frontend styled with Tailwind

- deployment scripts ready

And above all: zero friction. Where I usually spent hours configuring the environment, Claude propelled me into the actual project creation from the first minutes.

A Stack Chosen by Need

I didn't "choose a stack". I started from my constraints.

Claude proposed the best technical combination to address them.

Here's what we kept:

- Frontend: React 18, Vite, Tailwind CSS, Wouter, MDX

- Backend: Express.js with PostgreSQL, Drizzle ORM

- Infrastructure: Railway for fullstack, Cloudflare for speed and cache

- Analytics: Umami (lightweight, no cookies, GDPR friendly)

No extras. No oversized framework.

Just what's needed.

What Claude Actually Brought

It's not "just AI that codes".

Claude:

- prepared UI components (cards, modals, buttons) with accessibility

- generated the database, models, CRUDs

- configured SEO (helmet, sitemap, JSON-LD, robots.txt)

- optimized LCP (hero image in WebP, preload, lazy loading)

- cleaned imports, reduced initial JS, avoided unnecessary rerenders

And all that while I continued iterating on content, UX, or animations.

How to Reach 95+ PageSpeed?

1. Aggressive Code Splitting

Before (monolithic bundle):

`javascript

// Everything loaded at once = 450KB JavaScript

`

After (lazy loading):

`javascript

// On-demand loading = 85KB initial

const Home = lazy(() => import('./pages/Home'));

const About = lazy(() => import('./pages/About'));

`

Impact: LCP reduced from 2.8s to 1.1s.

2. Optimized Images

`jsx

src="/hero.webp"

loading="lazy"

decoding="async"

width="800"

height="600"

/>

`

All images converted to WebP (60% savings vs PNG/JPEG).

3. Purged CSS with Tailwind

`javascript

// tailwind.config.js

export default {

content: ['./client/*/.{ts,tsx}'],

// Result: 8KB CSS vs 3.5MB in dev

}

`

Before: 450KB of CSS

After: 8KB of CSS (94% reduction)

4. No Blocking Third-Party Scripts

Umami Analytics:

- Never blocks rendering

- Weighs 2KB (vs 45KB for Google Analytics)

- No cookies = no GDPR banner

Railway + Cloudflare: The Winning Combo

Why Railway?

`bash

# Deployment in 2 minutes flat

$ git push origin main

# Railway automatically detects everything

`

What I love about Railway:

- βœ… Automatic Git deployment (push to deploy)

- βœ… PostgreSQL included

- βœ… Super clean real-time logs

- βœ… Automatic horizontal scaling

- βœ… $5/month to start

Cloudflare: The Speed Layer

Railway hosts the app, but Cloudflare caches everything:

1. DNS Setup: Point domain to Railway via Cloudflare

2. Page Rules: Cache everything for assets

3. Auto Minify: HTML, CSS, JS automatically minified

4. Brotli Compression: Enabled by default

5. HTTP/3: 30% reduced latency

Result: 180ms TTFB from France.

`

Without Cloudflare: 850ms TTFB

With Cloudflare: 180ms TTFB (-78%)

`

And the Results?

Performance

- PageSpeed Desktop: 98/100

- PageSpeed Mobile: 95/100

- LCP: 1.1s (βœ… Good < 2.5s)

- INP: 45ms (βœ… Good < 200ms)

- CLS: 0.02 (βœ… Good < 0.1)

- FCP: 0.8s (βœ… Good < 1.8s)

- TTFB: 180ms (βœ… Good < 600ms)

Bundle Size

- JS gzipped: 85KB

- Purged CSS: 8KB

- Build time: 12s

Monthly Cost

- Railway + domain + Cloudflare: ~$10/month

For comparison:

- Next.js starter: ~250KB

- Gatsby starter: ~180KB

- My site: 93KB initial load

What I Liked Most

The feeling of control.

No technical debt.

No breaking plugins.

No dependency on an obscure stack.

Everything is modifiable. Everything is understandable.

And I can continue iterating alone.

The ability to send screenshots and quickly modify.

The multi-terminal is super efficient (I had 3 open in parallel) to work simultaneously on different parts of the project.

The Limitations

- Claude Code quickly uses its credits (I had to switch to the paid API to not be blocked)

- You need to structure your prompts precisely. Otherwise, answers can be vague or useless.

What I Learned

1. Less JavaScript = More Performance

I resisted the temptation to add:

- ❌ Framer Motion (heavy animations)

- ❌ Moment.js (98KB for dates!)

- ❌ Entire Lodash

Lightweight alternatives:

- βœ… Native CSS animations

- βœ… date-fns (2KB) instead of Moment

- βœ… Vanilla JS for utilities

2. Railway > Vercel for Full-Stack

| Feature | Railway | Vercel |

|---------|---------|--------|

| PostgreSQL included | βœ… | ❌ |

| WebSockets | βœ… | ❌ |

| Price /month | $5 | $20+ |

| Deploy time | 2min | 1min |

3. Cloudflare is Free and Powerful

Free features:

- Unlimited global CDN

- DDoS protection

- Auto SSL

- Basic analytics

- Cache API responses

ROI: $0/month for performance equivalent to a $50/month CDN.

4. Claude Code = Force Multiplier

What would have taken me 3-4 days alone, done in 23h with Claude Code.

The secret: be precise in prompts.

❌ Bad prompt: "Create a button"

βœ… Good prompt: "Create a Button component with TypeScript, variants (primary, secondary, ghost), sizes (sm, md, lg), loading state, disabled state, and full accessibility (ARIA)"

Complete Technical Stack

`json

{

"frontend": {

"framework": "React 18",

"bundler": "Vite 5",

"language": "TypeScript",

"styling": "Tailwind CSS 4",

"routing": "Wouter (1.6KB)",

"content": "MDX"

},

"backend": {

"runtime": "Node.js 22",

"framework": "Express.js",

"database": "PostgreSQL",

"orm": "Drizzle ORM"

},

"infrastructure": {

"hosting": "Railway",

"cdn": "Cloudflare",

"analytics": "Umami"

}

}

``

Conclusion

I'm a marketer. And yet, in less than 24 hours, I created a clean, performant, deployed, production-ready site.

And what I felt wasn't just pride.

It's a form of creative liberation.

If you also want to break out of the cycle mockup β†’ dev dependency β†’ friction β†’ abandonment:

try Claude Code.

But start with a real need.

It will take care of the rest.

Questions or comments? Don't hesitate to contact me on LinkedIn or X!