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

v2.3.0

Published

A CLI to create projects at Mile Two

Downloads

25

Readme

Getting Started

Prerequisite

You need to install node version >=14.18.0 to run this CLI tool. Check your node version with:

node -v

You can install the latest version on nodejs.org.

Create a new project

npx create-m2-app

Select a template and get coding 😎

Why would I use this?

If you're familiar with the templates and enjoy the starting point given by the Mile Two team, using this CLI gives you added functionality such as next-auth credential login, ability to switch database setup from SQLite to Postgres, and control over starting UI and DB ports. Most of us require one of those extra configurations and this CLI will save you time automating things that can take hours like setting up and freeing up ports for your docker setup for example.

Templates

Aiming to cut down on the start time, we've templated out a few of our favorite tools and frameworks. At Mile Two we mostly use React projects and Node.js backend with Postgres databases. The templates below should reflect those configurations to include standard sets of tools we use such as TypeScript and Material-UI.

Full Stack Templates

next | Source

Next is for the quick prototype that can run independent of an API. You can get away with using mock data for the forseeable future and don't want to lock yourself into a API specification (ex. REST vs. GraphQL)

Tech Stack

next-prisma-rest | Source 🔥🔥

Next Prisma REST is for the developer that wants to build out REST endpoints using a sophisticated and TypeScript friendly ORM known as Prisma.

Tech Stack

next-prisma-auto-graphql(Recommended) | Source 🔥🔥🔥🔥

Next Prisma GraphQL is for the developer that wants to leverage some of the GraphQL perks in their application with a completely auto-generated GraphQL API out of the box based on your Prisma schema.

Woah

Tech Stack
Benefits
  • Auto Generated CRUD operations 😭 🤯
  • Auto Generated Hooks (useUserQuery or useCreateUserMutation) 🔥
  • Auto Generated Types from your GraphQL Schema 🔥🔥

Service Only Templates

ts-gql-prisma-codegen | Source

Use this template when you need to leverage type safe GraphQL API's. With any GraphQL API you'll need to define your schema and operations. This template uses GraphQL Code Generator to generate your types and operations based on your schema. Simply create your schema in graphql and build your type safe resolvers to match the generated types to keep that feeling of end to end type safety.

GraphQL Yoga > The fully-featured GraphQL Server with focus on easy setup, performance and great developer experience. GraphQL CodeGen > Generate code from your GraphQL schema and operations with a simple CLI Prisma > Next-generation Node.js and TypeScript ORM Example Queries, Mutations, and even Subscriptions using the server sent events(SSE) protocol Documentation - For more on server sent events vs. web sockets refer to SSE vs. WS in the Guild Yoga Server documentation

go-gin | Source

All our other templates are running in Node.js. When you've hit limits of Node.js and need better performance, are building a simple microservice, or just want to use GoLang, this template is for you.

nestjs-gql-prisma | Source

Nest.js is a service based template for those that are building out micro-services.

typegraphql-prisma-api | Source

This template is for creating an Apollo server typegraphql project that uses Prisma. In addition, this template utilizes the Typegraphql Prisma generator.

What's on the Horizon?

As of now this CLI tool is being used internal and by a few open source developers. Feel free to leave feedback on any of the templates used on the github issues so we can continue to improve.