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-mf2-app

v2.4.0

Published

Create a production-ready SaaS app with Next.js, Convex, and AI

Readme

mf²

The startup-in-a-command monorepo built for the agent era.

bunx create-mf2-app

npm version Downloads License GitHub Stars

Quick Start

bunx create-mf2-app my-app
cd my-app
bun run dev

The CLI scaffolds a Turborepo monorepo with six apps and 20+ shared packages. It prompts for a project name and package manager, copies the template, sets up environment files, installs dependencies, and creates an initial git commit.

Fill in your .env.local files with API keys and start building.

What You Get

Six independently deployable apps that share typed packages:

apps/
  app/            Main SaaS application (Next.js 15, App Router)
  web/            Marketing website
  api/            Webhooks, cron jobs, external integrations
  docs/           Documentation (Mintlify)
  email/          Email templates (React Email)
  storybook/      Component workshop

packages/
  backend/        Convex database, auth sync, AI agents, workflows
  design-system/  50+ shadcn/ui components with dark mode
  auth/           Clerk authentication and route protection
  payments/       Stripe via @convex-dev/stripe
  ai/             Vercel AI SDK, multi-model routing, RAG
  analytics/      PostHog event tracking and sessions
  observability/  Sentry error tracking, BetterStack logging
  security/       Arcjet bot detection, Nosecone secure headers
  rate-limit/     Upstash Redis rate limiting
  storage/        Convex file storage and Vercel Blob
  email/          Resend transactional email
  cms/            BaseHub headless CMS
  seo/            Metadata, JSON-LD, Open Graph
  notifications/  Knock in-app notification feeds
  collaboration/  Liveblocks cursors and presence
  webhooks/       Svix outbound webhook delivery
  feature-flags/  Vercel feature flags with overrides
  internationalization/ next-intl translations
  convex/         Convex + Clerk React provider
  next-config/    Shared Next.js configuration
  typescript-config/ Shared tsconfig

Each app imports only the packages it needs. The main app uses auth, payments, backend, and AI. The marketing site uses CMS, SEO, and analytics. The API layer uses auth, rate-limit, and security.

Stack

| Layer | Technology | |-------|-----------| | Framework | Next.js 15 with App Router | | Language | TypeScript end-to-end | | Database | Convex — real-time, reactive, serverless | | Auth | Clerk — 80+ OAuth providers, webhook sync to Convex | | Payments | Stripe via @convex-dev/stripe | | Styling | Tailwind CSS v4 + shadcn/ui | | AI | Vercel AI SDK — multi-model routing, RAG, streaming | | Email | Resend + React Email | | Analytics | PostHog — events, sessions, feature flags | | Error Tracking | Sentry + BetterStack | | Security | Arcjet — bot detection, rate limiting, DDoS protection | | Monorepo | Turborepo + Bun | | Deployment | Vercel | | Code Quality | Biome via Ultracite |

Convex Components

Five Convex Components ship pre-installed — sandboxed TypeScript modules that manage their own tables and functions inside your Convex backend.

| Component | Package | Purpose | |-----------|---------|---------| | Stripe | @convex-dev/stripe | Checkout sessions, subscriptions, customer management, webhook sync | | Resend | @convex-dev/resend | Transactional email delivery with event tracking | | Workflow | @convex-dev/workflow | Durable, long-running flows with retries and delays | | Action Retrier | @convex-dev/action-retrier | Automatic retry with backoff for unreliable external calls | | Migrations | @convex-dev/migrations | Schema migrations for live data without downtime |

Install more from the component directory:

bun add @convex-dev/rate-limiter

Then register in packages/backend/convex/convex.config.ts:

import rateLimiter from "@convex-dev/rate-limiter/convex.config.js";
app.use(rateLimiter);

Commands

All commands run from the project root.

Development

bun run dev              # Start all apps
turbo dev --filter=app   # Start a single app
bunx convex dev          # Start Convex backend

Code Quality

bun run check            # Lint and format check (Biome)
bun run fix              # Auto-fix issues
bun run convex-lint      # Lint Convex functions (ESLint)

Build and Test

bun run build            # Build all apps
bun run test             # Run tests (Vitest)
turbo build --filter=app # Build a single app

Environment Variables

bun run env:init         # Create .env.local + .env.production from .env.example
bun run env:check        # Validate all env files
bun run env:push         # Sync env vars to Vercel and Convex

Upgrading

bun run bump-deps        # Update all npm dependencies
bun run bump-ui          # Update all shadcn/ui components
bun run clean            # Remove all node_modules

CLI

Pass flags to skip interactive prompts:

bunx create-mf2-app --name my-app --package-manager bun
bunx create-mf2-app --name my-app --disable-git

| Flag | Effect | |------|--------| | --name <name> | Set project name | | --package-manager <manager> | bun (default), npm, yarn, or pnpm | | --disable-git | Skip git initialization |

For npm, yarn, or pnpm, the CLI converts workspace:* dependencies and adjusts configuration files.

Deploy

Each app deploys as a separate Vercel project:

  1. Import your repo at vercel.com/new
  2. Set the root directory (apps/app, apps/web, or apps/api)
  3. Add environment variables from .env.production
  4. Push to main — Vercel rebuilds only affected apps

Documentation (apps/docs) deploys via Mintlify, not Vercel.

Documentation

Full docs at mf2.dev/docs.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit with conventional commits
  4. Open a pull request

License

MIT — Ocarina Labs