tshex-cli 1.0.21 → 1.0.22

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 CHANGED
@@ -70,29 +70,29 @@ The command creates this structure:
70
70
 
71
71
  ```text
72
72
  core/
73
- ├── index.d.ts
74
- ├── main.ts
75
- ├── shared/
76
- ├── application/
77
- ├── data/
78
- ├── drivers.ts
79
- ├── managers.ts
80
- └── repositories.ts
81
- ├── events.ts
82
- ├── http.ts
83
- ├── loggers.ts
84
- ├── services.ts
85
- └── validations.ts
86
- └── domain/
87
- ├── aggregates.ts
88
- ├── entities.ts
89
- ├── errors.ts
90
- └── value-objects.ts
91
- └── users/
92
- ├── adapters/
93
- ├── application/
94
- ├── domain/
95
- └── example-ports.ts
73
+ |-- index.d.ts
74
+ |-- main.ts
75
+ |-- shared/
76
+ | |-- application/
77
+ | | |-- data/
78
+ | | | |-- drivers.ts
79
+ | | | |-- managers.ts
80
+ | | | `-- repositories.ts
81
+ | | |-- events.ts
82
+ | | |-- http.ts
83
+ | | |-- loggers.ts
84
+ | | |-- services.ts
85
+ | | `-- validations.ts
86
+ | `-- domain/
87
+ | |-- aggregates.ts
88
+ | |-- entities.ts
89
+ | |-- errors.ts
90
+ | `-- value-objects.ts
91
+ `-- users/
92
+ |-- adapters/
93
+ |-- application/
94
+ |-- domain/
95
+ `-- example-ports.ts
96
96
  ```
97
97
 
98
98
  ### Choose the destination directory
@@ -115,7 +115,11 @@ The context is created at `core/billing`.
115
115
 
116
116
  ### Create a context for React
117
117
 
118
- The `--react` option creates a context with directories intended for a React application:
118
+ The `--react` option creates a context intended for a React application.
119
+
120
+ A React context is a consumer by nature. It does not provide a hexagonal capability to other systems. Instead, it consumes existing capabilities and organizes that consumption as a collection of adapters for the UI layer.
121
+
122
+ Use this mode when the generated context will call APIs, validate interface data, expose hooks, compose components, and localize messages.
119
123
 
120
124
  ```bash
121
125
  npx tshex --ctx users --react
@@ -127,19 +131,33 @@ You can also use its short form:
127
131
  npx tshex --ctx users -R
128
132
  ```
129
133
 
130
- The context structure includes adapters for APIs, hooks, and schemas, together with application, domain, and language resources:
134
+ The command creates this structure:
131
135
 
132
136
  ```text
133
137
  users/
134
- ├── adapters/
135
- │ ├── api/
136
- │ ├── hooks/
137
- │ └── schemas/
138
- ├── application/
139
- ├── domain/
140
- └── languages/
138
+ |-- api/
139
+ |-- assets/
140
+ |-- components/
141
+ |-- core/
142
+ |-- hooks/
143
+ |-- languages/
144
+ `-- schemas/
141
145
  ```
142
146
 
147
+ Each directory represents a consumption adapter or a resource used by those adapters:
148
+
149
+ | Directory | Responsibility |
150
+ | --- | --- |
151
+ | `api/` | Adapters that call external services or backend contexts. |
152
+ | `assets/` | Static resources used by the React context. |
153
+ | `components/` | Visual react adapters that render the consumed capability. |
154
+ | `core/` | Local support code and project modules adapters shared by the adapters in this context. |
155
+ | `hooks/` | React hook adapters that expose behavior to components. |
156
+ | `languages/` | Translation resources for the interface. Can be json, ts files, etc. |
157
+ | `schemas/` | Validation and parsing adapters for UI input and output. |
158
+
159
+ This layout is intentionally different from the default context template. The standard context separates `domain`, `application`, and `adapters` because it models and provides a capability. The React context generated with `--react` assumes the opposite role: it always consumes capabilities and groups the code around the adapters required by that consumption.
160
+
143
161
  ## Documentation index
144
162
 
145
163
  From this point on, the guide is split into dedicated documents under `docs/`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tshex-cli",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "author": "https://github.com/virtualitems/",
5
5
  "license": "MIT",
6
6
  "description": "Typescript Hexagonal Architecture CLI",
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1 @@
1
+ {}
File without changes