Skip to content
Chris Garlick

Case study 02 · cg-cms, my product

MY LARAVEL CMS.
Pages in 0.4 ms.

The CMS this site runs on: an Inertia and React admin, content in Postgres, and every page written to disk when it's saved.

Sole designer and developer
Role
Laravel · Postgres · Inertia · React · TypeScript · Tailwind · nginx
Stack
This site, on a 1GB server
Live
The cg-cms admin dashboard at chrisgarlick.com: alerts, published and draft counts, leads this week, page cache warmth and recent articles
Fig. 01 · the cg-cms admin, chrisgarlick.com A cached page: 0.4 ms, live 1GB server

01
THE problem

I wanted a CMS I could edit comfortably, that stayed fast on a small server, without paying for a platform or fighting a page builder. Nothing off the shelf did all three, so I built it.

02
HOW IT works

Content lives in Postgres and is edited in an Inertia and React admin built from typed blocks, so content can't break the layout. When a page is saved, cg-cms renders it once and writes the HTML to disk. Visitors are served that file, without PHP or the database.

To serve a cached page, live 1GB server
0.4 ms
Requests a second on a 1GB, single-CPU server
6,300
Cold render, measured on my laptop
26 to 29 ms

03 · The hard part

THE FAST PATH skips Laravel.

Laravel itself costs about 13.6 ms before any of my code runs, so no amount of tuning inside the app would get close to a static file. Saving a page renders it once and writes it to disk; a visitor never touches PHP or Postgres. Measured on the live 1GB server, from the server itself: time to first byte with curl, best of 20 requests with the connection setup taken off, and throughput with ab and keep-alive, 5,000 requests at 20 at a time.

Time to first byte · cg-cms, live 1GB server

0.4 ms a page
6,300 a second

04
FOR clients

The same approach works for any Laravel site that's mostly read: content you can edit yourself, pages that load at once, and a small server bill.

Start a Laravel project

Next case study →

  1. CHRISGARLICK.COM, every URL kept