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 🙏

© 2024 – Pkg Stats / Ryan Hefner

create-k4

v1.0.0

Published

CLI to bootstrap and manage pnpm/turborepo monorepos

Downloads

43

Readme

create-k4

create-k4 is a CLI tool to bootstrap and manage pnpm/turborepo monorepos with a focus on Next.js and Node.js applications. It provides a streamlined way to set up a modern, scalable monorepo structure with best practices baked in, while maintaining minimal configuration. Despite being batteries-included with features like ESLint, TypeScript, and build tools, the project emphasizes simplicity, keeping all configurations lean and easily customizable.

Features

  • Quickly bootstrap a new monorepo with pnpm and Turborepo
  • Set up Next.js and Node.js applications within the monorepo
  • Integrate shared packages for common functionality
  • Configure ESLint, Prettier, and TypeScript for code quality
  • Set up a PostgreSQL database with Prisma ORM
  • Configure BullMQ for background job processing
  • Implement Docker for consistent development environments

Tech Stack

  • Package Manager: pnpm
  • Monorepo Tool: Turborepo
  • Web Framework: Next.js
  • Supporting Backend: Node.js
  • Database: PostgreSQL
  • ORM: Prisma
  • Queue: BullMQ
  • Containerization: Docker
  • Language: TypeScript
  • Linting: ESLint
  • Formatting: Prettier

Usage

To create a new monorepo project, run:

npx create-k4@latest <name>

Follow the interactive prompts to customize your project setup.

Project Structure

The generated monorepo will have the following structure:

my-monorepo/
├── apps/
│   ├── web/               # Next.js web application
│   └── worker/            # Node.js worker application
├── packages/
│   ├── db/                # Shared database package (Prisma)
│   ├── docker-dev/        # Docker Compose configuration for development
│   ├── queue/             # Shared queue package (BullMQ)
│   ├── eslint-config/     # Shared ESLint configuration
│   └── typescript-config/ # Shared TypeScript configuration
├── package.json
├── pnpm-workspace.yaml
└── turbo.json

Commands

Once your project is set up, you can use the following commands:

  1. pnpm dev: Start the development environment
  2. pnpm db:init: Initialize the database

Other commands available:

  • pnpm build: Build all packages and apps
  • pnpm lint: Run ESLint for all packages and apps
  • pnpm format: Format all files using Prettier
  • pnpm test: Run tests for all packages and apps

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Creator

This project was created by Kevin Wade (YouTube, X/Twitter, GitHub).

License

This project is licensed under the MIT License.