@domain-first/project-structure 5.1.1 → 6.0.0
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/README.md +6 -6
- package/dist/287.js +3217 -0
- package/dist/index.cjs +148 -1293
- package/dist/index.js +4 -3124
- package/dist/integration.cjs +1684 -0
- package/dist/integration.d.ts +2 -0
- package/dist/integration.js +31 -0
- package/dist/integrations/orval.d.ts +7 -4
- package/dist/print-next-steps.d.ts +7 -0
- package/dist/use-cases/add-integration-order.spec.d.ts +1 -0
- package/package.json +3 -2
- package/skills/df-ps-implement/SKILL.md +4 -4
- package/skills/df-ps-plan-feature/SKILL.md +1 -1
- package/skills/df-ps-scaffold/SKILL.md +16 -16
- package/skills/df-ps-scaffold/references/generators.md +2 -2
- package/skills/df-ps-scaffold/scripts/drive.mjs +3 -3
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ Domain First Project Structure removes that choice: **the cleanest path is also
|
|
|
17
17
|
|
|
18
18
|
```
|
|
19
19
|
npm i -D @domain-first/project-structure
|
|
20
|
-
npx df-
|
|
20
|
+
npx df-scaffold
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## API
|
|
@@ -28,10 +28,10 @@ The full technical specification lives in [API.md](./API.md).
|
|
|
28
28
|
|
|
29
29
|
### How to initialize a project
|
|
30
30
|
|
|
31
|
-
Run `df-
|
|
31
|
+
Run `df-scaffold` in a project with a `package.json`. The first run asks for the source folder, the `@domain-first` packages you use, the default persistence implementation, whether to scaffold a shared in-memory DB for test implementations, React, Storybook and the testing library, then writes `domain-first.project-structure.config.json` and exits. With `@domain-first/handlers-rest`, it also scaffolds the [endpoint generator](#how-to-add-a-rest-endpoint); if `next` is among your dependencies, it offers to connect `nextAdapter` from `@domain-first/handlers-next` right away and prints the install command for it when it's missing.
|
|
32
32
|
|
|
33
33
|
```
|
|
34
|
-
npx df-
|
|
34
|
+
npx df-scaffold
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
```json
|
|
@@ -188,7 +188,7 @@ admin/panel/users → pages/admin/panel/admin-panel-users-page.tsx (AdminPane
|
|
|
188
188
|
|
|
189
189
|
### How to add tooling
|
|
190
190
|
|
|
191
|
-
|
|
191
|
+
Run `npx df-integration` to configure one or several of Storybook, Prisma 8, Vitest, Playwright, integration tests on PostgreSQL in Testcontainers, OpenAPI generation or an Orval API client (typed client and React Query hooks). Integrations add config files, package scripts and `.gitignore` entries, then print the install commands. Nothing is installed or run for you.
|
|
192
192
|
|
|
193
193
|
**Missing domain-first packages** prints the `npm i` command for packages from the config that are not in `package.json`.
|
|
194
194
|
|
|
@@ -200,7 +200,7 @@ npx df-lint
|
|
|
200
200
|
|
|
201
201
|
It reports what breaks the Domain-First rules: imports between bounded contexts, imports against the layers, modules using kinds the dependency rules don't allow (in imports and in wiring), React modules importing what they shouldn't, and reading the time without the clock port. It exits with 1 when something is found, so you can run it in CI.
|
|
202
202
|
|
|
203
|
-
The rules are a default. Teams that work differently change them in the config: what each kind of module may depend on (`rules.dependencies`) and which checks run (`rules.lint`). `df-
|
|
203
|
+
The rules are a default. Teams that work differently change them in the config: what each kind of module may depend on (`rules.dependencies`) and which checks run (`rules.lint`). `df-scaffold` offers dependencies by the same rules. Without `rules`, the defaults apply and every check runs; kinds and checks you don't mention keep their defaults.
|
|
204
204
|
|
|
205
205
|
- Kinds in `rules.dependencies` (as keys and in lists): `repositories`, `domain-services`, `application-ports`, `application-services`, `use-cases`, `commands`, `queries`, `infrastructure-services`, `presentation-services`.
|
|
206
206
|
- A kind's value: a list that replaces its defaults, or `{ "add": [...], "remove": [...] }`.
|
|
@@ -219,7 +219,7 @@ Defaults and details: [Dependency rules](API.md#dependency-rules), [`df-lint`](A
|
|
|
219
219
|
|
|
220
220
|
### How to teach your coding agent
|
|
221
221
|
|
|
222
|
-
The package ships skills that teach coding agents to plan features, scaffold with `df-
|
|
222
|
+
The package ships skills that teach coding agents to plan features, scaffold with `df-scaffold` and implement the generated code.
|
|
223
223
|
|
|
224
224
|
```
|
|
225
225
|
npx df-skills --claude
|