/nextjs-boilerplate

Example boilerplate for Next.js apps

Primary LanguageTypeScript

Next.js App

Development

This is repo is based off of the Next.js typescript template and the Next.js Typescript with SSR example. It is designed to be run with Lando (a tool to give Docker Compose superpowers), but you can run this without that, and just use Docker Compose.

pnpm is used, since it's faster and more strict about dependency linking.

Code linting is enforced and opinionated, mostly to reduce polluted PR diffs.

With Lando (preferred)

Required:

Start up the container with:

lando start

Then, to begin development, run:

lando dev

Tooling

Some tooling is built-in:

  • Upgrade dependencies

    lando update-deps

    This will use npm-check-updates to get the latest versions of the project's deps, then will install them.

  • Clean out the project

    lando cleanup

    Removes the .next, .pnpm-store, cache, and node_modules directories from the project root. It's generally a good idea rebuild your containers after this.

  • Linting

    lando lint

    This will run prettier --write on the pages, and server directories