DKCutter Next.js

DKCutter Next.js is a framework for quickly starting Next.js projects.

Powered by DKCutter, DKCutter Next.js is a framework for quickly starting Next.Js projects.

  • If you have problems with DKCutter Next.js, please open issues.

Usage

To scaffold an application using dkcutter, run any of the following four commands and answer the command prompt questions:

npm

terminal
npx dkcutter gh:ncontiero/dkcutter-nextjs.git

yarn

terminal
yarn dlx dkcutter gh:ncontiero/dkcutter-nextjs.git

pnpm

terminal
pnpm dlx dkcutter gh:ncontiero/dkcutter-nextjs.git

bun

terminal
bunx dkcutter@latest gh:ncontiero/dkcutter-nextjs.git

You'll be prompted for some values. Provide them, then a Next.Js project will be created for you.

Warning: After this point, change "author name", etc to your own information.

Answer the prompts with your own desired options. For example:

terminal
✔ What is the project name? … My Awesome Project
✔ What is the project slug? … my-awesome-project
✔ What is the project description? … Behold My Awesome Project!
✔ What is the author name? … Nicolas Contiero <https://github.com/ncontiero>
✔ What is the project version? … 0.1.0
✔ Do you want to use husky? … No / Yes
✔ Do you want to use lint staged? … No / Yes
✔ Do you want to use Commitlint? … No / Yes
✔ Do you want to use Next.Js app folder? … No / Yes
✔ What database ORM would you like to use? › None
✔ What Authentication Provider would you like to use? › None
✔ What Automated Dependency Updater do you want to use? › Mend Renovate
✔ Do you want the project to be configured? … No / Yes
Next steps:
  cd my-awesome-project
  pnpm install
  git add .
  git commit -m "initial commit"
  pnpm dev
 
✔ Project created!

Enter the project and take a look around:

terminal
cd my-awesome-project/
ls

Now take a look at your repo. Don't forget to carefully look at the generated README.

Advanced usage

If you want to start faster, you can use the following options:

FlagDescription
--projectName <string>The Project name.
--projectSlug <string>The Project Slug.
--description <string>The Project description.
--authorName <string>The author name.
--projectVersion <string>The project version.
--useHusky [boolean]Include husky in the project.
--useLintStaged [boolean]Include lint-staged in the project.
--useCommitlint [boolean]Include commitlint in the project.
--useAppFolder [boolean]Use Next.Js app folder structure.
--database <string>Choose a database ORM. See for more info.
--useDockerCompose [boolean]Include docker compose in the project for the database. If database is different from none.
--authProvider <string>Choose a authentication provider. See for more info.
--clerkWebhook [boolean]Includes an endpoint to receive events from the Clerk.
--automatedDepsUpdater <string>Choose Automated Dependency Updater. See for more info.
--automaticStart [boolean]This option will install the application packages, start a git repo and make the initial commit.

See for more information about options.

Example

The following would be the structure of an application with Commitlint:

terminal
pnpm dlx dkcutter https://github.com/ncontiero/dkcutter-nextjs.git --useCommitlint

If you want to use all the default values with the exception of one or more, you can do it as follows:

terminal
pnpm dlx dkcutter https://github.com/ncontiero/dkcutter-nextjs.git --useHusky --useLintStaged -y

This will use the default values, with the exception of the --useHusky and --useLintStaged options.


See more information in the github repo: ncontiero/dkcutter-nextjs.