This is my monorepo template. It comes preconfigured with the typical stuff I use in my monorepos, and is intended to be a starting point for new projects. Naturally, all of this is heavily opinionated (with opinions shifting over the course of time). Feel free to fork and modify it to your liking!
- Uses pnpm for package and workspace management
- TypeScript support
- Comes preconfigured for Jest testing
- Packages are built with Preconstruct, which also provides its wonderful dev mode
- A
packages
directory for packages, andapps
for apps (examples, demos, ...) - Support for Turborepo (configured to peacefully coexist with Preconstruct's
dev
mode) - Changelog and release management via Changesets
- GitHub Actions for CI and release management
Stuff that's missing:
- eslint
There are three ways to use this template:
- If you're viewing this on GitHub, you can click the "Use this template" button in the upper right to create a new repository from this template.
- You can simply fork this repository and clone it locally.
- You can use
degit
:npx degit hmans/monorepo-template my-new-project
After forking and cloning this template repository, you may want to make the following configuration changes:
- Configure a
NPM_TOKEN
for GitHub Actions - Remove/change
.github/FUNDING.yml
- Set up TurboRepo cache and remote cache
- Delete/modify
example-package
(Apologies for this just being a list of short bullet points, I will try to add some explanations over time.)
If you like this template or any of my other open-source projects, consider sponsoring me on GitHub Sponsors.