scale-stack 0.0.1-alpha.2 → 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 +34 -0
- package/README.md +67 -5
- package/dist/index.js +4081 -106
- package/package.json +7 -2
- package/templates/ai-chat/chat-panel.tsx.ejs +70 -0
- package/templates/ai-chat/layout.tsx.ejs +35 -0
- package/templates/ai-chat/page.tsx.ejs +37 -0
- package/templates/ai-chat/route.ts.ejs +68 -0
- package/templates/ai-chat/use-chat.ts.ejs +26 -0
- package/templates/analytics/analytics-provider.tsx.ejs +32 -0
- package/templates/analytics/analytics.ts.ejs +40 -0
- package/templates/auth/auth-client.ts.ejs +7 -0
- package/templates/auth/auth.ts.ejs +45 -0
- package/templates/auth/route.ts.ejs +4 -0
- package/templates/auth/sign-in-page.tsx.ejs +122 -0
- package/templates/auth/sign-up-page.tsx.ejs +137 -0
- package/templates/auth/unauthorized.tsx.ejs +28 -0
- package/templates/core/layout.tsx.ejs +46 -0
- package/templates/core/loading.tsx.ejs +7 -0
- package/templates/core/next.config.ts.ejs +33 -0
- package/templates/error-handling/catch-all-not-found-page.tsx.ejs +5 -0
- package/templates/error-handling/error.tsx.ejs +33 -0
- package/templates/error-handling/global-error.tsx.ejs +32 -0
- package/templates/error-handling/not-found.tsx.ejs +28 -0
- package/templates/eslint-prettier/.prettierignore.ejs +29 -0
- package/templates/eslint-prettier/eslint.config.mjs.ejs +31 -0
- package/templates/form-handling/dashboard-page.tsx.ejs +39 -0
- package/templates/form-handling/example-form-action.ts.ejs +50 -0
- package/templates/form-handling/example-form-schema.ts.ejs +87 -0
- package/templates/form-handling/example-form.tsx.ejs +428 -0
- package/templates/i18n/ar.json.ejs +77 -0
- package/templates/i18n/en.json.ejs +77 -0
- package/templates/i18n/locale-layout.tsx.ejs +81 -0
- package/templates/i18n/navigation.ts.ejs +5 -0
- package/templates/i18n/next-intl.d.ts.ejs +9 -0
- package/templates/i18n/request.ts.ejs +15 -0
- package/templates/i18n/routing.ts.ejs +7 -0
- package/templates/orm/prisma.config.ts.ejs +12 -0
- package/templates/orm/prisma.ts.ejs +17 -0
- package/templates/orm/schema.prisma.ejs +8 -0
- package/templates/pre-commit/prek.toml.ejs +35 -0
- package/templates/proxy/proxy.ts.ejs +81 -0
- package/templates/server-actions/safe-action.ts.ejs +51 -0
- package/templates/ui/client-side-wrappers.tsx.ejs +19 -0
- package/templates/ui/page.tsx.ejs +117 -0
- 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
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
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
|
+
|
|
20
|
+
## 0.0.1
|
|
21
|
+
|
|
22
|
+
First stable release of the Scale Stack CLI.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- `scale-stack init` with interactive and headless project generation for a Next.js 16.2+ App Router baseline.
|
|
27
|
+
- Generator DAG covering project bootstrap, agent skills, strict TypeScript config, Next config, environment validation, observability, shadcn/Tailwind UI, state, error handling, Docker, Prisma, Better Auth, server actions, forms, AI chat, CI, analytics, i18n, and agent guidance files.
|
|
28
|
+
- `scale-stack sync` for managed config updates with dry-run diffs, conflict detection, rollback snapshots, version guard, and sync logging.
|
|
29
|
+
- Release E2E coverage for the supported init matrix, generated project install/build checks, and sync against a generated project.
|
|
30
|
+
|
|
31
|
+
### Notes
|
|
32
|
+
|
|
33
|
+
- `--a11y`, `--api-client`, `--jobs`, and CircleCI selection are accepted for forward compatibility but do not generate their future integrations yet.
|
|
34
|
+
- The published package includes `dist`, `templates`, `README.md`, and this changelog.
|
package/README.md
CHANGED
|
@@ -1,11 +1,73 @@
|
|
|
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
|
+
## Start Fast
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
```bash
|
|
13
|
+
# Pick your stack interactively
|
|
14
|
+
npx scale-stack init my-app
|
|
15
|
+
|
|
16
|
+
# Script it in CI or docs
|
|
17
|
+
npx scale-stack init --name my-app -y
|
|
18
|
+
|
|
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
|
|
21
|
+
|
|
22
|
+
# Keep a generated app current
|
|
23
|
+
cd my-app
|
|
24
|
+
npx scale-stack sync --dry-run
|
|
25
|
+
```
|
|
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
|
+
|
|
35
|
+
## Commands
|
|
36
|
+
|
|
37
|
+
### `scale-stack init [name]`
|
|
38
|
+
|
|
39
|
+
Creates a new generated Next.js app. Run it interactively, or pass flags for a repeatable headless setup.
|
|
40
|
+
|
|
41
|
+
- `--name <name>` — project name; overrides the positional argument
|
|
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
|
|
51
|
+
- `-y, --yes` — skip prompts and accept defaults
|
|
52
|
+
- `--dry-run` — preview generated changes without writing
|
|
53
|
+
|
|
54
|
+
### `scale-stack sync`
|
|
55
|
+
|
|
56
|
+
Updates a generated project against the current Scale Stack baseline while protecting user changes.
|
|
57
|
+
|
|
58
|
+
- `--dry-run` — print diffs without writing
|
|
59
|
+
- `--force` — overwrite user-modified managed keys with Scale Stack baselines
|
|
60
|
+
- `--keep-backup` — retain `.scale-stack/pre-sync-backup/` after success
|
|
61
|
+
|
|
62
|
+
## Maintainers
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pnpm install
|
|
66
|
+
pnpm lint
|
|
67
|
+
pnpm test
|
|
68
|
+
pnpm build
|
|
69
|
+
pnpm test:e2e
|
|
70
|
+
npm pack --dry-run
|
|
71
|
+
```
|
|
72
|
+
|
|
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.
|