Skip to content

MK-IT/monorepo-starter-essentials

Repository files navigation

Turborepo Logo

Monorepo Starter Essentials

Monorepo project starter extended with tools to help you boost your development experience. Powered by Turborepo.

Help us improve by submitting suggestions and bug reports.

Table of Contents

🚀 Getting Started

We recommend that you get familiar with the Turborepo Documentation before getting started.

  1. Create a new Monorepo app.

    Straightforward project scaffold using degit.

    npx degit https://github.com/MK-IT/monorepo-starter-essentials hello-world
    

    Or alternatively, clone this repository.

    git clone https://github.com/MK-IT/monorepo-starter-essentials hello-world
    

    Navigate to your new monorepo and install its dependencies.

    # replace `yarn` with `npm` if it works better for you
    cd hello-world && yarn
    
  2. Configure.

    Edit the default configuration of your new monorepo if necessary.

    • package.json
    • apps/**/package.json
    • packages/**/package.json
    • turbo.json
  3. Develop.

    Start the monorepo apps.

    # parallel monorepo development mode
    yarn dev
    

    Note: You can change the contents of apps/ and packages/ in any way you like. Most pre-defined apps are for demo purposes only.

Features

Main features

  • Turborepo Build System
  • ⚡️ ESLint, Prettier, EditorConfig
  • 📂 Clean folder structure
  • 🚦 Pre-commit hooks
  • 🤝 Commit message linting
  • 🐛 VSCode configuration
  • 🚀 Production ready
  • 🧗🏻‍♂️ Built-in semver automation
  • 🍃 Github releases automation

🤝 Commit message linting

Keep your commit messages human- and robot-readable using a shared convention, i.e. Commitlint.

Husky's Git hooks make sure that your commit messages follow the convention.

You can use Commitlint's CLI for fast authoring of your commit messages.

🧗🏻‍♂️ Built-in semver automation

The release-please package helps you generate changelogs, tags and automatically updates package versions by following the semver convention.

When there are new changes merged to the default branch, the release-please GitHub action automatically creates a release PR containing updated package versions and changelogs. The PR gets updated automatically as more changes are merged. When you are ready to release, just merge the PR.

If you want to version track a package, you must define it in release-please-config.json. On the next release, the newly defined packages will be automatically added to release-please-manifest.json.

🍃 Github releases automation

When you merge release-please's auto-generated PR, the GitHub action automatically creates tags and releases for each package.

What's inside?

️Available Scripts

# run all workspaces in parallel
yarn dev

# build all workspaces
yarn build

# test all workspaces
yarn test

# test all workspaces inside /apps
yarn test:apps

# test all workspaces inside /packages
yarn test:packages

# format all workspaces
yarn format

# lint all workspaces
yarn lint

# Run command of a specific workspace
yarn workspace <workspace-name> <workspace-command>

Folder Structure

.
├── .github                # GitHub configuration
├── .husky                 # Husky configuration
├── apps                   # Workspaces
│   ├── docs                 # NextJS app
│   └── web                  # NextJS app
├── packages               # Workspaces
│   ├── eslint-config-custom # ESLint configuration
│   ├── tsconfig             # TypeScript configuration
│   └── ui                   # Component library
├── .commitlintrc.js
├── .editorconfig
├── .eslintrc.js
├── .gitignore
├── .release-please-manifest.json # Release-Please manifest file
├── LICENSE
├── README.md
├── package.json
├── release-please-config.json # Release-Please configuration file
├── turbo.json               # Turborepo configuration
└── yarn.lock

About

Monorepo Starter Essentials

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published