Skip to content

joaoricardofp/monorepo-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏗️ Fullstack Monorepo Starter

A production-ready monorepo starter with a NestJS API and a Next.js Web app, powered by pnpm workspaces and Turborepo.

Tech Stack

Layer Technology
Package manager pnpm with workspaces & catalog
Task runner Turborepo
API NestJS
Web Next.js (App Router)
Styling Tailwind CSS v4
Linter & Formatter Biome
Testing Jest + ts-jest
Language TypeScript

Repository Structure

monorepo/
├── apps/
│   ├── api/          # NestJS REST API
│   └── web/          # Next.js frontend (App Router)
├── packages/
│   └── config/       # Shared configs (TypeScript, Biome, Jest)
├── turbo.json
├── pnpm-workspace.yaml
└── package.json

Getting Started

Prerequisites

Installation

# Clone the repository
git clone <your-repo-url>
cd monorepo

# Install all dependencies
pnpm install

Development

Start all apps in parallel (Turborepo will build shared packages first):

pnpm turbo start:dev

Or start each app individually:

# API only (http://localhost:3000)
pnpm --filter api start:dev

# Web only (http://localhost:3000)
pnpm --filter web start:dev

Available Scripts

Run any of these from the root of the monorepo:

Command Description
pnpm turbo start:dev Start all apps in dev/watch mode
pnpm turbo build Build all packages and apps
pnpm turbo lint Lint all packages
pnpm turbo test Run all test suites
pnpm turbo test:cov Run tests with coverage

Packages

packages/config

Shared configuration package consumed by all apps via workspace:*.

Export Description
config/typescript Base tsconfig.json
config/biome Base biome.json
config/jest Base jest.config

Environment Variables

Copy .env.example to .env in each app and fill in the required values:

cp apps/api/.env.example apps/api/.env
cp apps/web/.env.example apps/web/.env

Dependency Management

Shared dependency versions are centralized in pnpm-workspace.yaml under the catalog: key. To use a catalogued version in a package, set the version to "catalog:":

{
  "devDependencies": {
    "typescript": "catalog:"
  }
}

Contributing

This project follows Conventional Commits. Please ensure your commit messages follow the pattern:

<type>(<scope>): <description>

Types: feat, fix, chore, docs, refactor, test, ci
Scopes: api, web, config, root

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors