scale-stack 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +34 -66
- package/dist/index.js +438 -197
- package/package.json +1 -1
- package/templates/ai-chat/layout.tsx.ejs +2 -6
- package/templates/ai-chat/page.tsx.ejs +8 -2
- package/templates/core/layout.tsx.ejs +10 -0
- package/templates/form-handling/dashboard-page.tsx.ejs +8 -2
- package/templates/i18n/locale-layout.tsx.ejs +44 -8
- package/templates/ui/page.tsx.ejs +8 -2
- package/templates/utility-libs/date-fns.SKILL.md.ejs +34 -0
- package/templates/utility-libs/motion.SKILL.md.ejs +234 -0
- package/templates/utility-libs/ts-pattern.SKILL.md.ejs +44 -0
- package/templates/utility-libs/usehooks.SKILL.md.ejs +38 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.2
|
|
4
|
+
|
|
5
|
+
Patch release with generator and template refinements after the first stable baseline.
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Utility library selection support in CLI config, generated technology guidance, package baselines, and sync-managed targets.
|
|
10
|
+
- Utility library Agent Skills templates for date-fns, Motion, ts-pattern, and usehooks.
|
|
11
|
+
- Shared app layout generator helpers and broader unit coverage for generated route/layout behavior.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Improved i18n template locale handling for stronger type safety and runtime validation.
|
|
16
|
+
- Refined generator feature predicates and conditional execution across selected stack combinations.
|
|
17
|
+
- Updated AI assistant guidance, dependency fragments, and generated technology inventory to reflect the active stack more accurately.
|
|
18
|
+
- Removed OpenTelemetry from generated technology guidance where it is not emitted by the current baseline.
|
|
19
|
+
|
|
3
20
|
## 0.0.1
|
|
4
21
|
|
|
5
22
|
First stable release of the Scale Stack CLI.
|
package/README.md
CHANGED
|
@@ -1,87 +1,68 @@
|
|
|
1
1
|
# Scale Stack
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Most starters give you a repo that compiles on day one.
|
|
4
|
+
Scale Stack gives you a Next.js app that stays sharp on day one hundred.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
It starts with an AI-native, colocation-first Next.js 16 project: strict config, typed env, shadcn/Tailwind, safe actions, forms, Docker, agent rules, and the optional fittings teams usually wire by hand. Then `scale-stack sync` keeps the boring-but-critical standards fresh without trampling your code.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Status: **0.0.2 stable** for `init` and `sync`. A few fittings are visible early and clearly skipped until implemented.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
- **`scale-stack sync`** — patches tracked config files (`tsconfig.json`, `package.json`, `next.config.ts`, `eslint.config.mjs`, `.prettierrc`) against the current Scale Stack baseline. Conflict detection, dry-run mode, snapshot-based rollback, and a version guard are all built in (PRD §2.2).
|
|
11
|
-
|
|
12
|
-
## Quick start
|
|
10
|
+
## Start Fast
|
|
13
11
|
|
|
14
12
|
```bash
|
|
15
|
-
#
|
|
13
|
+
# Pick your stack interactively
|
|
16
14
|
npx scale-stack init my-app
|
|
17
15
|
|
|
18
|
-
#
|
|
16
|
+
# Script it in CI or docs
|
|
19
17
|
npx scale-stack init --name my-app -y
|
|
20
18
|
|
|
21
|
-
#
|
|
22
|
-
npx scale-stack init my-app --orm --auth --chat --i18n --ci github --analytics plausible --pre-commit -y
|
|
19
|
+
# Go full-stack from the first commit
|
|
20
|
+
npx scale-stack init my-app --orm --auth --chat --i18n --utility-libs --ci github --analytics plausible --pre-commit -y
|
|
23
21
|
|
|
24
|
-
#
|
|
22
|
+
# Keep a generated app current
|
|
25
23
|
cd my-app
|
|
26
24
|
npx scale-stack sync --dry-run
|
|
27
25
|
```
|
|
28
26
|
|
|
27
|
+
## Why It Feels Different
|
|
28
|
+
|
|
29
|
+
Scale Stack is not a frozen template. It is a living baseline for teams building with Next.js and AI coding agents.
|
|
30
|
+
|
|
31
|
+
- **Agents understand the project immediately.** Generated apps include agent guidance, skills, MCP wiring, and framework context so Cursor, Claude Code, and other MCP-capable tools can work with the architecture instead of guessing.
|
|
32
|
+
- **The architecture has a spine.** Route-owned components, hooks, state, actions, and AI artifacts live beside the pages that use them, keeping growth readable.
|
|
33
|
+
- **Upgrades are a workflow, not a rewrite.** `scale-stack sync` previews diffs, detects conflicts, snapshots before writes, and patches managed config keys while preserving user-owned choices.
|
|
34
|
+
|
|
29
35
|
## Commands
|
|
30
36
|
|
|
31
37
|
### `scale-stack init [name]`
|
|
32
38
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Supported flags:
|
|
39
|
+
Creates a new generated Next.js app. Run it interactively, or pass flags for a repeatable headless setup.
|
|
36
40
|
|
|
37
41
|
- `--name <name>` — project name; overrides the positional argument
|
|
38
|
-
- `--orm` —
|
|
39
|
-
- `--auth` —
|
|
40
|
-
- `--chat` —
|
|
41
|
-
- `--i18n` —
|
|
42
|
-
- `--
|
|
43
|
-
- `--ci [
|
|
44
|
-
- `--analytics [
|
|
45
|
-
- `--pre-commit` —
|
|
46
|
-
- `--jobs` — accepted
|
|
42
|
+
- `--orm` — Prisma
|
|
43
|
+
- `--auth` — Better Auth; stateful with Prisma, stateless without it
|
|
44
|
+
- `--chat` — AI chat route and UI scaffold
|
|
45
|
+
- `--i18n` — next-intl routing and messages
|
|
46
|
+
- `--utility-libs` — Motion, date-fns, es-toolkit, useHooks, ts-pattern, and matching agent guidance
|
|
47
|
+
- `--ci [github|circleci|none]` — bare `--ci` defaults to GitHub; CircleCI is accepted but coming soon
|
|
48
|
+
- `--analytics [plausible|posthog|none]` — bare `--analytics` defaults to Plausible; PostHog is accepted but coming soon
|
|
49
|
+
- `--pre-commit` — prek hooks for lint, format, and typecheck
|
|
50
|
+
- `--jobs`, `--a11y`, `--api-client` — accepted coming-soon fittings; currently skipped
|
|
47
51
|
- `-y, --yes` — skip prompts and accept defaults
|
|
48
|
-
- `--dry-run` — preview generated
|
|
52
|
+
- `--dry-run` — preview generated changes without writing
|
|
49
53
|
|
|
50
54
|
### `scale-stack sync`
|
|
51
55
|
|
|
52
|
-
Updates a generated project against the current Scale Stack baseline while
|
|
56
|
+
Updates a generated project against the current Scale Stack baseline while protecting user changes.
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- `--dry-run` — print diffs without writing files
|
|
58
|
+
- `--dry-run` — print diffs without writing
|
|
57
59
|
- `--force` — overwrite user-modified managed keys with Scale Stack baselines
|
|
58
60
|
- `--keep-backup` — retain `.scale-stack/pre-sync-backup/` after success
|
|
59
61
|
|
|
60
|
-
##
|
|
61
|
-
|
|
62
|
-
This repository contains the **Scale Stack CLI** — the scaffolding engine, DAG runner, generators, and `sync` command. Running the CLI produces a **generated application template** (a standalone Next.js project) with optional modules layered on via CLI flags.
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
src/
|
|
66
|
-
cli/ # Commander entrypoint, commands, @clack/prompts flows, UI
|
|
67
|
-
engine/ # DAG runner, virtual FS, EJS template engine, logger
|
|
68
|
-
sync/ # `scale-stack sync` — config patcher + conflict detector
|
|
69
|
-
config/ # Canonical managed slices + baselines (shared by sync + generators)
|
|
70
|
-
lib/merge/ # Managed JSON / text merge engine
|
|
71
|
-
generators/ # DAG nodes — one module per generator
|
|
72
|
-
types/ # Shared TypeScript contracts
|
|
73
|
-
tests/ # Vitest (mirrors src/)
|
|
74
|
-
templates/ # EJS templates, organized by generator
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
See [IMPLEMENTATION_PLAN.md](IMPLEMENTATION_PLAN.md) for the DAG, current phase coverage, and what's still to do.
|
|
78
|
-
|
|
79
|
-
## Release verification
|
|
80
|
-
|
|
81
|
-
Before publishing a release, run:
|
|
62
|
+
## Maintainers
|
|
82
63
|
|
|
83
64
|
```bash
|
|
84
|
-
pnpm install
|
|
65
|
+
pnpm install
|
|
85
66
|
pnpm lint
|
|
86
67
|
pnpm test
|
|
87
68
|
pnpm build
|
|
@@ -89,17 +70,4 @@ pnpm test:e2e
|
|
|
89
70
|
npm pack --dry-run
|
|
90
71
|
```
|
|
91
72
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
## Development
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
pnpm install
|
|
98
|
-
pnpm build # bundle dist/index.js
|
|
99
|
-
pnpm test # fast Vitest suite
|
|
100
|
-
pnpm test:e2e # build CLI, generate tmp projects, run install/build checks
|
|
101
|
-
pnpm lint # eslint + prettier --check
|
|
102
|
-
pnpm cli -- init --name tmp -y # run the CLI from source via tsx
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
See [.cursor/rules/](.cursor/rules/) for the TypeScript conventions, generator contract, and sync-managed-keys rules that the codebase follows.
|
|
73
|
+
`pnpm test:e2e` builds the CLI, generates the supported init matrix in temporary directories, verifies generated projects with `pnpm install && pnpm build`, and covers `scale-stack sync` against a generated app.
|