mrmaarcus.devprojects
homeprojectsblogaboutstackcontactresume

offlinediscord
spotifynot playing
emailgithublinkedinaboutcontactresume
all projects
full stackactiveΒ· sep 2024 – present

next-kit

an interactive cli that scaffolds production-ready next.js apps in one command β€” pick your auth, database, orm, api layer, payments, email, and analytics, and it wires them together into a typed, ready-to-run project.

repositorylive
next.jstypescripttailwind cssshadcn ui

role

designer, developer, and cli author

impact

the one cli that won't let you waste time on setup β€” auth, db, orm, api, and more, all wired up in seconds. considering your laptop's fast, of course πŸ˜‰

challenge

the cli looked finished but almost nothing it generated actually built; the real work was making every prompt produce a working, type-safe project.

architecture

how the pieces connect

1

interface

next.js, typescript, tailwind css

2

workflow

studied how other clis are built, then weighed which packages and modules next-kit actually needed to support.

3

data and rules

treated the output build as the source of truth β€” if a scaffolded project didn't build, the cli wasn't done, no matter what its own tests said.

01 β€” approach

  • studied how other clis are built, then weighed which packages and modules next-kit actually needed to support.
  • scaffolded the cli with all the options and prompts first, then built each integration out one by one.
  • spent most of the work on the templates β€” fixing them was the real problem, since they're what has to produce a working project.

02 β€” outcome

  • every option combination scaffolds a project that builds and lints cleanly.
  • published to npm as @mxrcxs17/next-kit β€” one command to install and scaffold a full stack.
  • supports a wide menu of stacks β€” multiple auth, database, orm, api, payments, email, and analytics providers, all wired together.

03 β€” decisions

  • treated the output build as the source of truth β€” if a scaffolded project didn't build, the cli wasn't done, no matter what its own tests said.
  • kept generated code type-safe under strict mode instead of hiding behind @ts-nocheck.
  • scaffolded all the options and prompts first, then built each integration out one by one β€” structure before details.

04 β€” lessons

  • a generator's tests are worthless if they never compile the output.
  • compiling is not the same as working.

05 β€” next steps

  • add more templates and stack presets.
  • support more providers across auth, database, and payments.
  • keep generated templates current with framework updates, backed by a ci matrix that builds every stack combo on each release.

stack

next.jstypescripttailwind cssshadcn ui
nextportfolio