npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

typescript-monorepo

v1.5.0

Published

A quest for the perfect Typescript monorepo

Downloads

172

Readme

Typescript Monorepo

Documentation: typescript-monorepo.codecompose.dev

Introduction

This is a personal quest for the perfect Typescript monorepo setup.

There is an accompanying article "My quest for the perfect TS monorepo" I'd like you to read that for context. Note: This article is now outdated and will be updated or rewritten for 2025 to reflect the current bundler-first architecture.

My current projects are based on Node.js, Next.js, and Firebase, so that is what I am focusing on. If you use a different stack, this can still be a great reference, as the approach itself does not depend on it.

Notable Features

  • Turborepo to orchestrate the build process and dependencies, including the v2 watch task.
  • A web app based on Next.js with ShadCN and Tailwind CSS v4
  • Working IDE go-to-definition and go-to-type-definition using .d.ts.map files
  • ESM everything
  • Typescript path aliases (that get resolved in build output)
  • Fast linting and formatting with oxlint and oxfmt (Rust-based)
  • Pre-commit hooks via lefthook running format + lint in parallel on staged files
  • Minimal and strict TypeScript configuration via inheritance
  • Vitest
  • Multiple isolated Firebase deployments, using firebase-tools-with-isolate
  • Firebase emulators with hot reloading
  • Clean, typed Firestore abstractions using @typed-firestore/react and @typed-firestore/server

Getting Started

Install PNPM with corepack, which is part of modern Node.js versions:

  • corepack enable (if you have not used it before)
  • corepack prepare pnpm@latest --activate

Then run pnpm install from the repository root.

To get started, execute the following 3 scripts with pnpm [script name] from the root of the monorepo:

| Script | Description | | --------- | ------------------------------------------------------------------------------------------------------------------- | | watch | Continuously builds everything using the Turborepo watch task, except for the web app, which has its own dev server | | emulate | Starts the Firebase emulators. | | dev | Starts the Next.js dev server to build the app on request. |

The web app should become available on http://localhost:3000, and the emulators UI on http://localhost:4000.

For more details on the architecture, Firebase setup, tooling, and more, see the documentation.