Next.js
The first commit of Next.js was a 173-line README titled 'initial spec': a design doc for a framework that did not yet exist.
04578072ecOn October 5, 2016, at 23:35 UTC, Guillermo Rauch typed git commit -m "initial spec" and pushed the very first commit of what would become one of the most widely used React frameworks on the planet.
1. What's actually in it?
Nothing. No package.json. No pages/. No webpack config. No tests. No source code.
Just a single file: Readme.md.
The commit message, "initial spec", is not a lie. The first thing that ever existed in the Next.js repository was a 173-line document describing a framework that did not yet exist. It was a design doc masquerading as a README. The API was real before the code was.
If you're the kind of person who believes the best way to design software is to write the README first, this commit is your Rosetta Stone.
2. The framework, as originally imagined
Reading it today is like finding a letter from the past that got a surprising number of things right. The core mental model was already there on day zero:
"The file-system is the main API. Every
.jsfile becomes a route that gets automatically processed and rendered."
That one sentence is still the thesis of Next.js almost a decade later.
Also already present in the spec:
getInitialProps: yes, thatgetInitialProps. It was there in the first commit, complete with anisServerflag and areqobject. It stuck around for years untilgetServerSidePropsquietly replaced it.next/head: same name, same purpose, same vibe.next/link: client-side navigation via a<Link>component._error.js: the underscore-prefixed override convention, born on day one.next build && next start: the two commands that still ship every Next.js app to production.
3. The things that didn't make it
Part of the charm of a first commit is the features that got quietly walked back before anyone noticed.
CSS-in-JS via Aphrodite. The original README proudly declared that Next.js would use Khan Academy's Aphrodite for "a great built-in solution for CSS modularization," exposed as next/css. It even had a code sample:
import { css, StyleSheet } from 'next/css'
next/css did ship, and was deprecated not long after. Next.js would spend the next several years cycling through styled-jsx, CSS Modules, global CSS support, and eventually first-class Tailwind. Aphrodite is not in any of those stories.
pushTo and replaceTo. The spec described a url prop injected into every top-level component, with methods called push, replace, pushTo, and replaceTo. The *To variants never really caught on. Today you reach for useRouter() and call it a day.
Deployment via now. The recommended deploy target was now, the previous name of the company that would later rebrand to Vercel. The framework outlived the product name that birthed it.
4. The bugs in the spec
A design doc is allowed to have bugs. This one has two good ones:
- A typo: "pages never load unneccessary code": three c's, one too many. It survived into the first real README and was fixed later, like everything else.
- A syntax error in the CSS example: an arrow function opens with
{instead of(, returns nothing, and closes with a stray). If you tried to run it, it wouldn't compile. But you weren't supposed to run it. You were supposed to feel it.
This is the part I love. The first commit of a framework used by millions of developers contains code that does not parse. Ship the vibe, fix the parens later.
5. Why this commit matters
Most "initial commit" commits are throwaways: a .gitignore, a blank README.md, maybe a license. Scaffolding. You skip past them in git log --reverse and land on the first real commit a few entries later.
This one is different. This is the commit where the shape of the thing was decided. Everything that came after was a conversation with this file: the Pages Router, the App Router, Server Components, Turbopack, the migration away from getInitialProps, the migration back toward server-first rendering. Sometimes agreeing with it. Sometimes quietly walking away from it. But always in dialogue with a 173-line Markdown document that a person wrote before they wrote any code.
The lesson: write the README first. Even if the arrow function doesn't parse.
6. Footnotes from the commit log
- The repo is now 33,545 commits deep. This one is at the very bottom.
- It was authored directly by Guillermo Rauch, not squash-merged from a PR. In October 2016 the project was a single person typing into a single file.
- The filename is
Readme.md, notREADME.md. Git is case-sensitive and so was the intent. - The commit is unsigned. Nobody knew yet that it would matter.