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

create-n8-app

v0.3.1

Published

Create a Next.js app with the N8 stack - Next.js 16, Tailwind v4, Shadcn/ui, Drizzle, tRPC, TanStack Query, Zustand, NextAuth, and more

Readme

create-n8-app

Create a new Next.js app with the N8 stack - a modern, full-stack template featuring:

  • Next.js 16 - App Router, Server Components, Server Actions, Turbopack
  • TypeScript - Strict mode enabled
  • Tailwind CSS v4 - Modern CSS-first configuration
  • Shadcn/ui - Beautiful, accessible components
  • Drizzle ORM - Type-safe database queries
  • Neon - Serverless PostgreSQL
  • tRPC - End-to-end type safety
  • TanStack Query - Powerful async state management
  • Zustand - Lightweight global state
  • NextAuth.js - Authentication with GitHub OAuth
  • Vitest - Fast unit testing
  • Prettier - Code formatting with Tailwind plugin

Usage

# With npm
npm create n8-app@latest my-app

# With pnpm
pnpm create n8-app@latest my-app

# With yarn
yarn create n8-app my-app

Options

npm create n8-app@latest my-app --skip-install  # Skip dependency installation
npm create n8-app@latest my-app --skip-git      # Skip git initialization

After Creation

  1. Set up your database

    • Create a Neon project at neon.tech
    • Copy the connection string to .env.local
  2. Set up GitHub OAuth

    • Create an OAuth App at github.com/settings/developers
    • Set callback URL to http://localhost:3000/api/auth/callback/github
    • Copy Client ID and Secret to .env.local
  3. Generate a secret

    openssl rand -base64 32

    Add to .env.local as AUTH_SECRET

  4. Run database migrations

    pnpm db:generate
    pnpm db:push
  5. Start developing

    pnpm dev

Project Structure

my-app/
├── app/                    # Next.js App Router
│   ├── api/               # API routes (tRPC, auth)
│   ├── auth/              # Auth pages
│   ├── globals.css        # Tailwind styles
│   ├── layout.tsx         # Root layout
│   ├── page.tsx           # Home page
│   └── providers.tsx      # Client providers
├── components/            # React components
│   ├── auth/             # Auth components
│   └── ui/               # Shadcn components
├── hooks/                 # Custom React hooks
├── lib/                   # Utility functions
│   ├── auth.ts           # NextAuth config
│   ├── db.ts             # Database client
│   ├── env.ts            # Environment validation
│   ├── trpc.ts           # tRPC client
│   └── utils.ts          # Utilities
├── server/                # Server-side code
│   ├── api/              # tRPC routers
│   └── db/               # Database schema
├── stores/                # Zustand stores
├── tests/                 # Test files
├── drizzle/               # Database migrations
└── public/                # Static assets

Scripts

| Command | Description | |---------|-------------| | pnpm dev | Start development server with Turbopack | | pnpm build | Build for production | | pnpm start | Start production server | | pnpm lint | Run ESLint | | pnpm format | Format code with Prettier | | pnpm test | Run tests with Vitest | | pnpm db:generate | Generate Drizzle migrations | | pnpm db:push | Push schema to database | | pnpm db:studio | Open Drizzle Studio |

Development

Adding Shadcn Components

npx shadcn@latest add button
npx shadcn@latest add card
npx shadcn@latest add input

Creating tRPC Routes

Add new routers in server/api/routers/ and register them in server/api/root.ts.

Using Zustand

See stores/example-store.ts for patterns. Remember:

  • Use React Query for server data
  • Use Zustand only for client state (UI, preferences, cart)

License

MIT