Stacks
Seven house project templates and a CLI that generates them: NestJS APIs and workers, React apps, a Next.js and Payload site, and a Python worker

A new project starts as a finished app with everything switched on and becomes yours by losing what it does not need. Then it keeps taking fixes from the template it came from.
The decision
The templates are subtractive. Each one is a complete, running app with every feature switched on, and stack new copies it and removes what the project did not ask for: the files a feature owns, the blocks marked for it in shared code, and the dependencies only it used. The alternative was assembling projects from snippets, and the trouble there is that a combination nobody generates is a combination nobody tests.
A subtractive template is installed, built and tested whole in CI, and removing a feature is mechanical enough to check. The working names are real ones, acme and Acme Corp, rather than placeholder tokens, so the template itself compiles.
After the first commit
A template that only helps on day one is a copy-paste with extra steps. Every generated project records what produced it in stack.json: the template, the release and the features. stack add generates the template twice in a scratch directory, with and without the new feature, formats both with the project's own Prettier, and merges the difference in with git merge-file, so the project's edits survive and only overlapping hunks come back as conflicts
stack upgrade does the same across releases, comparing the template as the recorded release generated it with the current one. CI checks that upgrading from the last published release produces the same project as a fresh stack new. Both refuse a dirty working tree, so the whole change is one diff to review or throw away.
Where the templates come from
Each template was extracted from an application that runs, not written as a template first. stack extract copies a source app's changes in and renames them to the template's working names; the feature markers go back in by hand. That held until next-site, whose source was a reworked Payload starter that was never a real app and lived on one machine. The extract step was ceremony there, so next-site is now maintained in place.
The CLI is plain Node with no dependencies and no build step. CI publishes it to npm as a trusted publisher, and each release waits, staged, until it is approved with 2FA. It also ships as a Claude Code plugin whose skills scaffold, set up, extend and upgrade a project, and fold improvements back into the templates. Auropress started from it.
What it cost
Three things, mainly. Upgrades are merges, so a project that has moved far from its template gets conflicts, and a person still has to resolve them. The CLI ignores an option it does not recognise instead of refusing it, so a misspelt flag quietly does nothing; the printed list of features and the --dry-run flag are there to catch that before anything is written.
And each template is a whole app, which makes keeping it current real work: a dependency update has to land in every template, and the two built from others, nest-monorepo and react-app, have to be regenerated each time.
$ stack new py-worker jobs --without telemetry --dry-run Python background worker → /tmp/jobs name jobs scope @jobs features ci, database, docker, logging, queue omitted telemetry, temporal files 20 written, 6 dropped, 16 package keys pruned dry run — nothing written
- Role
- FULL-STACK
- Stack
- Node · NestJS · React · Next.js · Payload · Prisma · BullMQ · Turborepo
- Status
- OPEN SOURCE
Investment Nerds
Investing platform for Ghanaians at home and abroad, combining portfolio tracking, an investor community, and learning tools to help users at every level grow their wealth
qotm
A terminal-native quote tool: one considered programming quote each time you open a terminal, from a collection where every quote is sourced, checked and curated by people.