Skip to content

mpellegrini/fullstack-typescript-monorepo-starter

Repository files navigation

Fullstack Typescript Monorepo Starter

Overview

Folder Description
packages packages for shared code libraries
apps packages for web applications
toolchain packages supporting the shared toolchain (eslint, vitest, typescript)

Prerequisites

Folder Description
Node.js check node version in engines section of package.json for latest minimum version
PNPM Fast, disk space efficient package manager (PNpm)
(best to install via corepack)
# corepack enable pnpm

Useful Monorepo Operations

Setup

Install the dependencies for all workspaces in the monorepo

pnpm install

Clean

Remove all generated build artifacts for all workspaces in the monorepo

pnpm run -w clean

Build

Produce final generated artifacts for deployment for all relevant workspaces in the monorepo

Note

Not all workspaces in the monorepo have or need buildtasks

pnpm run -w build

Test

Run unit tests for all workspaces in the monorepo

pnpm run -w test

Lint

Run unit tests for all workspaces in the monorepo

pnpm run -w lint

Type Check

Run TypeScript type checks for all workspaces in the monorepo

pnpm run -w typecheck

Building Docker Image

docker build . -t sveltekit-example-app --build-arg="APP_NAME=sveltekit-example-app"
docker run --rm --name=sveltekit-example-app -p 8080:3000 sveltekit-example-app

Conventional Commits Best Practices

Commit messages must adhere to Conventional Commits best practices. The format proposed by this convention leads to easier to read commit history.

Each commit message consists of a header, a body, and a footer.

Default

<type>(<optional scope>): <subject>
empty separator line
<optional body>
empty separator line
<optional footer>

Types

feat Features A new feature
fix Bug Fixes A bug fix
docs Documentation Documentation only changes
style Styles Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
refactor Code refactoring A code change that neither fixes a bug nor adds a feature
perf Performance Improvements A code change that improves performance
test Tests Adding missing tests or correcting existing tests
build Builds Changes that affect the build system or external dependencies (example scopes: turborepo, pnpm)
ci Continuous Integrations Changes to our CI configuration files and scripts (example scopes: gh-actions)
chore Chores Other changes that don't modify source or test files
revert Reverts Reverts a previous commit

|

Scopes

The scope provides additional contextual information.

  • Is an optional part of the format
  • Allowed Scopes depends on the specific project
  • Don't use issue identifiers as scopes

Subject

The subject contains a succinct description of the change.

  • Is a mandatory part of the format
  • Use the imperative, present tense: "change" not "changed" nor "changes"
  • Do not capitalize the first letter
  • No dot (.) at the end

Body

The body should include the motivation for the change and contrast this with previous behavior.

  • Is an optional part of the format
  • Use the imperative, present tense: "change" not "changed" nor "changes"
  • This is the place to mention issue identifiers and their relations

Footer

The footer should contain any information about Breaking Changes and is also the place to reference Issues that this commit refers to.

  • Is an optional part of the format
  • optionally reference an issue by its id.
  • Breaking Changes should start with the word BREAKING CHANGES: followed by space or two newlines. The rest of the commit message is then used for this.

Examples

  • feat(shopping cart): add the amazing button
    
  • feat: remove ticket list endpoint
    
    refers to JIRA-1337
    BREAKING CHANGES: ticket endpoints no longer supports list all entities.
    
  • fix: add missing parameter to service call
    
    The error occurred because of <reasons>.
    
  • build(release): bump version to 1.0.0
    
  • build: update dependencies
    
  • refactor: implement calculation method as recursion
    
  • style: remove empty line
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published