Publishing

React + PHP: The Thin Stack

Il protocollo miniCMS per Web App moderne

The frontend has become magnificent.

Available Paperback · Kindle
React + PHP: The Thin Stack
Scroll ↓

What it is

But underneath we put too much: Node, containers, subscription CMSs, cloud services, for sites that would run perfectly on a few-euro hosting.

“The Thin Stack” is the protocol that separates two layers: presentation in React and TypeScript, data in native PHP and SQLite, or MySQL when needed. No backend framework, no overhead: a minimal but real skeleton.

The book comes from four real sites in production, and tells of their good choices and their scars: security done by hand, SEO that works, feeds, newsletters, dashboards, and the modules for festivals and contests with voting and anti-fraud protection.

Every chapter closes with a box, “Il Canone” (The Canon), that separates the rule to follow from the photograph of what the sites actually did. The book can be read in order or chapter by chapter: each chapter is a self-contained guide.

01

The manifesto

“Thin stack” does not mean “no backend”. It means a backend stripped to the bone but real, and above all it means a scale.

The frontend has reached extraordinary maturity: React, TypeScript, Tailwind. But the infrastructure beneath it has become out of proportion for most sites: Node, cloud databases, containers, subscription CMSs, often for sites that could run on a hosting plan costing a few euros.

The protocol starts from a precise question: can you have the power of React without giving up the simplicity and low cost of a PHP backend with SQLite? The answer is a three-step scale, from SQLite at the zero step up to engineered MySQL. Not three different architectures, but the same model at three heights.

The protocol is neither a framework nor a traditional CMS: no visual builder, prepackaged themes or plugins. Every site is built by hand, tailored to its purpose. It is not meant for millions of users; it is meant for sites that are fast, secure and maintainable by a small team, or by one person alone.

Who it is for
To the developer who knows React and wants a backend without learning a whole framework; to the freelancer delivering a fast site to a client with no budget for cloud infrastructure; to the author, the festival, the radio station that want their own presence, independent of platforms.
How to read it
The manual shows real code as it is, not as it should be: good choices, scars, vulnerabilities left open, documented without softening. Two voices coexist: “dal vivo” (live), the photograph of the four sites, and “il Canone”, the distilled rule.
02

Architecture

The frontend compiles to static files; the backend is native PHP with PDO, one file per endpoint; a REST contract holds the two layers together. The folder structure separates assets from the API area, and the build cleans the public folder before deploy.

Ch. 2 · Structure
Folders and the API area, configuration and secrets, routing between SPA and API, environments, the fork pattern.
Ch. 3 · Database
PDO connection, indexing, migrations, normalization, maintenance, when to move to MySQL.
Ch. 4 · Frontend
The essential stack, Tailwind v3 versus v4, content editing and rendering, animations.
Ch. 5 · Backend
Slugs, time zones, endpoint routing, three bootstrap styles, media, input and output security, output buffering.
Ch. 6 · API bridge
A thin client over fetch, three ways of reading the payload, the CSRF token on the client, the session that expires while you work.
03

Content and data

The manual follows content from the editorial desk to publication: the editor, HTML stored as the source, defence against malicious code in rich content, scheduled publishing without cron, caching without Redis.

It also includes the story of the move from SQLite to MySQL, with the WAL night, when an optimisation turned out to be the problem, and a migration checklist.

Ch. 8 · Editing
Three steps of editor, HTML as source, the security of rich content, inserting media.
Ch. 9 · Content lifecycle
Dynamic and persistent states, scheduled publishing without cron, caching without Redis, categories and tags, editorial workflow.
Ch. 15 · From SQLite to MySQL
Moving the engine with three scripts, evolving the schema without migration tools, the fossils left after a migration, the checklist.
04

Media, SEO and feeds

Uploaded images and files, search and indexing, distribution: the protocol treats as architecture what is usually left until the end.

Ch. 7 · Media
Validating an uploaded file, the file name as an attack surface, defence in depth, WebP optimisation, storage that evolves without stopping the site.
Ch. 11 · SEO
Pre-rendering with a PHP entry point, sitemap, robots and structured data, SEO that indexes drafts, the cache that outlives its reader.
Ch. 12 · RSS
Feeds and podcast feeds, the CORS proxy for consuming other feeds, the GUID that republishes, how to announce and deliver the feed.
05

Security and administration

Security is treated as architecture, not as a series of patches: the protocol distrusts the equation “more layers means more secure” and shows where defences hold and where they do not.

Ch. 10 · Security and access
The access gate, the three-step CSRF defence, the session cookie, passwords and brute-force defence, session invalidation.
Ch. 13 · Newsletter
The subscriber lifecycle, double opt-in, sending with native mail or authenticated SMTP, forms that send email, consent.
Ch. 14 · Dashboard
The admin area as an aggregator, measuring without third parties, backup, powerful actions and how to protect them.
06

Modules: portfolio, festivals, interactions

Three modules built on the same skeleton: a project portfolio, the complete logic of a festival with entries, voting and ranking, and social interactions such as reactions and messages.

Ch. 16 · Portfolio
The difference from the articles module, the schema, the five API operations, call-to-action buttons, unified search.
Ch. 17–19 · Festival
Entries and approval, voting and anti-fraud protection, admin dashboard, settings and reporting.
Ch. 20 · Interactions
Anonymous identity, two-layer rate limiting, integrity in the schema, reactions versus votes, optimistic micro-interactions.
07

Appendices

Three appendices complete the manual: the starting point for a new project, the life cycle of a fork, and notes on testing and deployment.

A · Boilerplate checklist
Eight phases from setup to security, down to the variants for each type of site: newsletter, portfolio, festival, migration.
B · Life cycle of a fork
How a fork inherits the backend’s technical debt, and how a disconnected shell becomes a project of its own.
C · Testing and deploy
No framework does not mean no tests; from dist to a five-euro hosting plan, with the limits of these notes.
08

Editions

The book exists in two formats, both on Amazon.it. Prices checked on Amazon.it on 9 October 2026.

Paperback
Paperback, 160 pages, 17.78 × 25.4 cm (7 × 10 inches), 372 g. Text in IBM Plex Serif, code in IBM Plex Mono. Price: €17.67.
Ebook
Kindle format, readable on e-readers and in the Kindle app. Price: €6.99.
09

Who wrote it

Simone Pizzi works on software development, audio communication and writing. In 2010 he founded, with Michela De Paola, the podcast Di Tutto Un Podcast; from that first core came the Italian Podcast Network and the web radio Runtime Radio, active for over fifteen years.

Technical sheet

Format
Paperback and Kindle
Genre
Computing · web development
Pages
160
Dimensions
17.78 × 25.4 cm · 372 g
Typeface
IBM Plex Serif · IBM Plex Mono
Edition
Third edition
Publisher
Runtime Publishing
Published
27 June 2026
Language
Italian
ISBN
979-8182307444
Author
Simone Pizzi
Status
Available

Available

Available on Amazon.it

You can find it on Amazon.it, in the formats listed in the sheet.

In the same category