How It Works

The template-layering model behind every generated project.

createjsstack builds a project by layering templates, one per choice you make. Each layer contributes its own files:

base → frontend → backend → database/orm → auth → api → addons → examples

package.json is merged, not overwritten

Every layer can ship a package.json. Instead of the last layer winning, the files are deep-merged — dependencies, devDependencies, and scripts from all layers combine into one file, while your project's name and version are preserved.

Example

A mern project ends up with react + react-dom (frontend), express + cors + helmet (backend), and mongoose (ORM) — all in a single, valid package.json.

What a project looks like

package.json
README.md
LICENSE
.gitignore

Every generated project also gets an MIT LICENSE and a "license": "MIT" field out of the box.

Three ways to configure

They compose left to right — later wins:

  1. Presets — a named bundle (--preset mern)
  2. Flags — override any single choice (--database postgres)
  3. Prompts — run with no flags for a guided setup

Template resolution

Templates are resolved relative to the installed package, so generation works from any directory — not just the repository root — and paths containing spaces are handled correctly.