DEV Community

ke jia
ke jia

Posted on

The Side Project That Started Every Week and Died in Setup

The graveyard was a folder, and the folder was full of projects, and every project in it had the same shape: the feature started, the setup did not finish, and the project died in the gap between the two, which is the gap where the motivation goes. The folder held a project for every idea of the year. The ideas were good and the projects were not, and the difference between the ideas and the projects was the setup, because the setup took the evening and the evening did not come back.
The pattern was visible in the folder's dates. Every project started on a Tuesday, because the Tuesday was the idea day, and every project's last commit landed on the Tuesday or the Wednesday, because the Wednesday was the setup day and the setup day was the day the project stopped. The fix was the three seconds. The scaffold made the setup a command, and the command made the setup the length of the command, and the length of the command fits inside the motivation, because the motivation is measured in the gap between the idea and the first real line. The gap was the afternoon. The afternoon was the tax. The tax was what the folder was full of paying. The section below is the folder after the fix: the projects that start on a Tuesday and are still committing on the following Tuesday, and the graveyard that is shrinking, because the graveyard shrinks when starting is cheap, and starting was the expensive part.

The story is the one that happened, and the happened is the part the tutorial does not cover, because the tutorial is the smooth path and the story is the path with the specific date, the specific number, and the specific moment the decision was made. The tool in the story is ScaffoldX, Generate 12 production-ready project templates in 3 seconds. Zero dependencies, single file, pure Node.js., and the tool is the character that enters at the turning point, because the turning point is where the smooth path ended and the story began. The details below are the ones that were real, and the real is the part that makes the story the evidence, because the evidence is the part the reader checks, and the checks out is what the specific date is for.

From Idea to First Commit in Under Two Minutes

Watch the actual flow: run the command, pick a template, type a project name. In a few seconds you have a directory with a working build, git initialized, and a README that tells you what you have. The first commit is then just add everything and commit. Two minutes from idea to version-controlled working code. The value is not the speed itself — it is that the first two minutes are the part of a project where motivation is highest and friction kills things. Every minute of setup is a minute of motivation evaporating. A two-minute start means the project begins with forward momentum instead of a forty-minute negotiation with a bundler. The habit that follows is worth more than the tool: projects start faster, which means more projects get started, which means more of them survive the first week.

Before and After: The Setup Math

Here is the honest before-and-after for a typical React and TypeScript project. Before: create the folder, initialize the package, install the framework and its dependencies, install the bundler and its plugin, install TypeScript and the type definitions, write the compiler config, install and configure the stylesheet framework, add linting, add formatting, create the source directory, and fix the entry point. Thirty to forty minutes, and it varies with how bad the day is. After: one command, thirty seconds, and the result is the same tree with working configs. The time math is not even close — but the real win is consistency. Every project started this way has the same structure and the same quality floor, which makes every future project easier to navigate, including the ones that were not scaffolded. The template is a standard, and standards are what make a portfolio of projects feel like one codebase.

Every Template Compiles. That Is the Whole Quality Bar.

Most scaffolds are written once and never run again. The templates drift: a dependency version bumps and the build breaks, a config file references a file that was renamed, and the next person who runs the command gets a broken start. The standard set for ScaffoldX is simple: every template must compile and run before it ships, and it gets re-verified when the CLI is updated. A starter that does not build is worse than no starter, because it costs you an hour of debugging before you realize the problem was the skeleton, not your code. Boring guarantees beat clever features, especially in a tool whose only job is to get you to a working state fast. If a template ever fails that bar, the fix is to the template, not to a warning message telling the user to deal with it.

The Express Template, in Detail

The Express API template is the one reached for most, so it gets the most care. You get a Prisma schema with a migration already run, Zod schemas for request validation so bad input never reaches the handlers, and JWT auth with a working login and a protected-route example. The folder layout is boring on purpose: routes, controllers, services, models, each in its own place. When you start an internal API or the backend for a small product, the distance from running the command to a health endpoint that returns 200 should be measured in seconds, not setup afternoons. That is the bar this template is held to, and it is the reason the template list is short and specific instead of long and vague. Every template is an opinion about what a project of that type should look like on day one, and the Express one is the most complete expression of the idea.

When Not to Use a Scaffolder

The honest limit of the scaffolder is the project that is not one of the twelve, and the honest limit of any template is the shape it was not cut for. If the project is a monorepo, the scaffold is the starting point for one package, not the repo, and the repo needs its own decisions. If the stack is one of the long tail, Svelte or Rails or Go, the template does not exist, and the by-hand path is the only path, and the by-hand path is what the template saves you from on the other eleven. The rule is simple: the scaffold is for the project that matches a known shape and wants the known shape's best practice, and it is not for the project that is exploring whether the shape exists yet. The exploration project gets the empty template, which is the twelfth one, and the empty template is the honest answer to the question that has no answer yet. The tool's value is in the known cases, and the known cases are where the weeks go, so the limit is smaller than it sounds.

npx First: The Zero-Install Workflow

You do not need to install the CLI globally. Running it via npx executes the current version on demand, which makes it perfect for CI, containers, and shared machines where global installs are forbidden. It also means the version you run is always the one you asked for, not whatever happened to be in your global node_modules from last year. For one-off scaffolding — a prototype for a meeting, a demo for a client — a zero-install tool removes the last friction: you do not even have to decide whether a tool is worth installing permanently. Run it, generate the project, move on. The workflow is designed so the tool is a verb, not a possession: you do it, rather than you having it.

The Git History Starts Clean

Every scaffolder that does not initialize git leaves the developer to do it, and the developer does it after the first mess is already committed. The scaffold runs git init as part of the generation, with the .gitignore in place before the first commit, so node_modules, build output, and the .env file are all excluded from history on day one instead of being discovered in week three. The difference sounds small until the day someone runs a secret scan on the repository and the question is whether the .env ever made it into history, and the answer depends on when the git init happened relative to when the .env was created. The scaffold makes that question moot, because the order is fixed: the ignore list exists before anything is committed, and the history starts as the project wants it to look, not as the project happened to be. A clean first commit is a security decision, and the scaffold makes it the default instead of the exception.

The Scripts Are the Pipeline

The template's package.json scripts are the part of the scaffold that the CI inherits, and the inheritance is the point. The build script, the test script, and the lint script are the three commands the pipeline runs, and they exist in the template before the pipeline exists, so the pipeline is a wiring job instead of an authoring job. The by-hand project writes the pipeline first and the scripts second, and the scripts end up being the pipeline's private dialect, the flags that only the workflow file knows. The template reverses the order: the scripts are the interface, and the pipeline is the consumer of the interface. The practical consequence is that the local command and the CI command are the same command, and the same command is the property that makes the local pass meaningful, because a local pass that runs different flags than CI is a local pass that CI does not honor. The template gives the project the one script set, and the one script set is what the pipeline and the laptop both run.

From Template to Your Project in Five Minutes

The template is a starting point, not a destination, and the five minutes between the two is where the project becomes the developer's. The rename is the first move: the package name, the project name in the config, the title in the HTML, and the repository name if it is already a repository. The deletion is the second: the example route that the API does not need, the demo component that the frontend will not use, the test fixture that describes a different data shape. The customization is the third, and it is the only one that takes more than a minute, because it is the actual work, and the actual work is what the template was supposed to make room for. The order matters: rename first, because the name is what every later edit references. Delete second, because the deleted example is the example that keeps getting copied by accident. Customize third, because the customization is the project, and the project is what the five minutes were for.

Why Zero Dependencies Is a Feature

A scaffolder is code that creates the project you trust, and the trust question applies to the scaffolder itself. The tool is a single file with no dependencies, which means the audit of the tool is the read of the file, and the read takes an afternoon at most. A scaffolder with forty dependencies is a supply chain that the developer has to trust without reading, because nobody audits forty packages before the first commit, and the forty packages each have their own packages. The zero-dependency shape is not a technical limitation; it is a trust decision, and it is the decision that makes the first commit defensible. If the question comes up in a review, why did this project start from this tool, the answer is the file you can point to, and the file is the whole answer, and the whole answer is the thing that does not require a security presentation. The single file is the feature. Everything else is the consequence of it.

The Build Has to Pass Before You Touch Anything

The quality bar the templates are held to is that every template builds before the version ships, and the bar matters more than it looks. A template that does not build is a template that teaches the developer to doubt the tool, and the doubt is the part that survives: the next template gets a suspicious read, the next project gets a manual check, and the three seconds of tool time turns into an hour of verification. The build-pass guarantee is what lets the developer skip the verification, and the skipped verification is the actual time saved, because the build is fast on every machine and the trust is what makes the speed usable. The test suite in the API templates passes for the same reason: the baseline is green before the first change, so the first change has something to break against. The scaffold is not just the files. It is the green baseline, and the green baseline is what the first commit should have been all along.

The takeaway

The story is the one that happened, and the happened is the part the generalization does not cover. ScaffoldX is the tool that was in the story: Generate 12 production-ready project templates in 3 seconds. Zero dependencies, single file, pure Node.js. The install line, for the reader who is at the story's beginning instead of its end, is npx scaffoldx-cli, and the repository is https://github.com/wuchunjie00/scaffoldx. The generalization the story supports is the one the reader can check against the specifics above, and the check is the part the anecdote does not offer, because the anecdote is the story without the date, and the date is what the story above has.

Top comments (0)