@solidxai/core 0.1.10-beta.0 → 0.1.10-beta.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/.claude/settings.local.json +15 -0
- package/dist/commands/run-tests.command.d.ts +2 -0
- package/dist/commands/run-tests.command.d.ts.map +1 -1
- package/dist/commands/run-tests.command.js +49 -17
- package/dist/commands/run-tests.command.js.map +1 -1
- package/dist/controllers/user.controller.d.ts.map +1 -1
- package/dist/controllers/user.controller.js.map +1 -1
- package/dist/services/crud.service.js.map +1 -1
- package/dist/services/field-metadata.service.js +2 -2
- package/dist/services/field-metadata.service.js.map +1 -1
- package/dist/services/queues/database-subscriber.service.js +3 -3
- package/dist/services/queues/database-subscriber.service.js.map +1 -1
- package/dist/services/queues/rabbitmq-subscriber.service.js +4 -4
- package/dist/services/queues/rabbitmq-subscriber.service.js.map +1 -1
- package/dist/services/queues/redis-subscriber.service.d.ts.map +1 -1
- package/dist/services/queues/redis-subscriber.service.js +4 -1
- package/dist/services/queues/redis-subscriber.service.js.map +1 -1
- package/dist/solid-core.module.d.ts +1 -0
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +1 -0
- package/dist/solid-core.module.js.map +1 -1
- package/dist/testing/reporter/webhook-reporter.d.ts +54 -0
- package/dist/testing/reporter/webhook-reporter.d.ts.map +1 -0
- package/dist/testing/reporter/webhook-reporter.js +74 -0
- package/dist/testing/reporter/webhook-reporter.js.map +1 -0
- package/package.json +1 -1
- package/src/commands/run-tests.command.ts +45 -17
- package/src/controllers/user.controller.ts +16 -16
- package/src/services/1.js +6 -0
- package/src/services/crud.service.ts +2 -2
- package/src/services/field-metadata.service.ts +2 -2
- package/src/services/queues/database-subscriber.service.ts +6 -6
- package/src/services/queues/rabbitmq-subscriber.service.ts +5 -5
- package/src/services/queues/redis-subscriber.service.ts +5 -2
- package/src/solid-core.module.ts +1 -0
- package/src/testing/reporter/webhook-reporter.ts +116 -0
- package/dist-tests/api/authenticate.spec.js +0 -119
- package/dist-tests/api/authenticate.spec.js.map +0 -1
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +0 -97
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +0 -1
- package/dist-tests/api/ping.spec.js +0 -21
- package/dist-tests/api/ping.spec.js.map +0 -1
- package/dist-tests/helpers/auth.js +0 -41
- package/dist-tests/helpers/auth.js.map +0 -1
- package/dist-tests/helpers/env.js +0 -11
- package/dist-tests/helpers/env.js.map +0 -1
- package/docs/grouping-enhancements.md +0 -89
- package/docs/java-spring/README.md +0 -3
- package/docs/java-spring/solid-core-module-deep-dive-report.md +0 -1317
- package/docs/seed-changes.md +0 -65
- package/docs/test-data-workflow.md +0 -200
- package/docs/type-declaration-import-issue.md +0 -24
|
@@ -1,1317 +0,0 @@
|
|
|
1
|
-
# solid-core-module Deep Dive Report
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
This document reviews `solid-core-module` as the backend runtime kernel used by SolidX applications, with special attention to how it is consumed by a real project such as `~/Code/javascript/mswipe-erp-solidx/solid-api`.
|
|
6
|
-
|
|
7
|
-
The goal is not just to describe the NestJS/TypeORM implementation, but to make the architecture legible enough to guide a future Java Spring Boot version of the backend while keeping the existing `solid-core-ui` frontend model intact.
|
|
8
|
-
|
|
9
|
-
## Executive Summary
|
|
10
|
-
|
|
11
|
-
`solid-core-module` is not a narrow utility package. It is the platform backend runtime for SolidX. It provides:
|
|
12
|
-
|
|
13
|
-
- the shared persistence model for platform metadata and IAM
|
|
14
|
-
- the generic metadata-driven CRUD engine
|
|
15
|
-
- repository and security rule enforcement
|
|
16
|
-
- authentication and token lifecycle management
|
|
17
|
-
- notifications and queue-backed integrations
|
|
18
|
-
- file/media storage abstractions
|
|
19
|
-
- dashboards, import/export, scheduled jobs, chatter, AI ingestion, and CLI support
|
|
20
|
-
- extension contracts that consuming projects plug into via generated Nest modules
|
|
21
|
-
|
|
22
|
-
In a consuming project such as `mswipe-erp-solidx`, the pattern is:
|
|
23
|
-
|
|
24
|
-
- `SolidCoreModule` is imported once at the app root
|
|
25
|
-
- core entities are included in one or more datasource registrations
|
|
26
|
-
- business modules such as `cpm`, `reports`, `onboarding`, and `mswipe-masters` are generated or hand-extended under `solid-api/src/<module>`
|
|
27
|
-
- generated services usually extend core `CRUDService<T>`
|
|
28
|
-
- generated repositories usually extend core `SolidBaseRepository<T>`
|
|
29
|
-
- module metadata JSON under `solid-api/module-metadata/<module>/<module>-metadata.json` drives scaffolding, runtime behavior, and admin UI wiring
|
|
30
|
-
|
|
31
|
-
This is the most important architectural conclusion for a Spring Boot port:
|
|
32
|
-
|
|
33
|
-
`solid-core-module` is effectively the reusable application platform layer, while each consuming app contributes domain modules, entities, repositories, services, controllers, metadata JSON, and datasource definitions around it.
|
|
34
|
-
|
|
35
|
-
## Consumer Project Context
|
|
36
|
-
|
|
37
|
-
### How `mswipe-erp-solidx` uses the core
|
|
38
|
-
|
|
39
|
-
From `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/app.module.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/app.module.ts)`:
|
|
40
|
-
|
|
41
|
-
- `SolidCoreModule` is imported at the root beside several datasource modules.
|
|
42
|
-
- The app also enables `ConfigModule`, `WinstonModule`, `EventEmitterModule`, and `ClsModule`.
|
|
43
|
-
- Dynamic module loading is done through `AppService.forRoot()` using `getDynamicModuleNames()`.
|
|
44
|
-
|
|
45
|
-
From `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/app.service.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/app.service.ts)`:
|
|
46
|
-
|
|
47
|
-
- the app scans `solid-api/src/*`
|
|
48
|
-
- any folder containing `<module>/<module>.module.ts` is treated as a dynamic business module
|
|
49
|
-
- those modules are imported at runtime
|
|
50
|
-
|
|
51
|
-
From `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/cpm/cpm.module.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/cpm/cpm.module.ts)` and `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/reports/reports.module.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/reports/reports.module.ts)`:
|
|
52
|
-
|
|
53
|
-
- a generated domain module is a conventional Nest module
|
|
54
|
-
- it registers entities via `TypeOrmModule.forFeature(...)`
|
|
55
|
-
- it exposes generated controllers, services, repositories, and optional custom providers
|
|
56
|
-
- cross-module dependencies are handled through normal Nest imports
|
|
57
|
-
|
|
58
|
-
From `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/cpm/services/customer-master.service.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/cpm/services/customer-master.service.ts)`:
|
|
59
|
-
|
|
60
|
-
- domain services often extend `CRUDService<T>`
|
|
61
|
-
- they add custom business methods on top of generic CRUD
|
|
62
|
-
- they can use core services like `ChatterMessageService`, `RequestContextService`, and settings access inherited through the module graph
|
|
63
|
-
|
|
64
|
-
From `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/cpm/repositories/customer-master.repository.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/cpm/repositories/customer-master.repository.ts)`:
|
|
65
|
-
|
|
66
|
-
- generated repositories extend `SolidBaseRepository<T>`
|
|
67
|
-
- security rule enforcement and request-aware behavior come from the base class
|
|
68
|
-
|
|
69
|
-
From `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/app-default-database.module.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/app-default-database.module.ts)`:
|
|
70
|
-
|
|
71
|
-
- consuming apps include all core entities in datasource registration
|
|
72
|
-
- they also register their own business entities
|
|
73
|
-
- they decorate datasource modules with `@SolidDatabaseModule()`
|
|
74
|
-
- this matters because SolidX relies on discovering active datasources and their types
|
|
75
|
-
|
|
76
|
-
From `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/module-metadata/cpm/cpm-metadata.json](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/module-metadata/cpm/cpm-metadata.json)`:
|
|
77
|
-
|
|
78
|
-
- module metadata is not incidental
|
|
79
|
-
- it defines module identity, datasource binding, model structure, field semantics, layout inputs, and runtime behavior
|
|
80
|
-
- business modules in consuming projects are therefore both code-driven and metadata-driven
|
|
81
|
-
|
|
82
|
-
### Structural takeaway
|
|
83
|
-
|
|
84
|
-
A consuming `solid-api` project is best understood as:
|
|
85
|
-
|
|
86
|
-
1. `solid-core-module` supplies the platform kernel.
|
|
87
|
-
2. The app supplies datasource modules, business modules, metadata JSON, and custom business integrations.
|
|
88
|
-
3. Generated code bridges metadata into ordinary NestJS/TypeORM artifacts.
|
|
89
|
-
4. Runtime behavior is a combination of:
|
|
90
|
-
- generic core services
|
|
91
|
-
- discovered providers and decorators
|
|
92
|
-
- generated entities/controllers/services/repositories
|
|
93
|
-
- module metadata stored both in the database and on disk
|
|
94
|
-
|
|
95
|
-
## Core Architectural Shape
|
|
96
|
-
|
|
97
|
-
### Package identity
|
|
98
|
-
|
|
99
|
-
From `package.json` and `README.md`:
|
|
100
|
-
|
|
101
|
-
- package name: `@solidxai/core`
|
|
102
|
-
- role: global NestJS module and backend engine for SolidX apps
|
|
103
|
-
- technology base: NestJS 10, TypeORM, TypeScript
|
|
104
|
-
- runtime concerns included: IAM, CRUD, queues, storage, scheduler, import/export, dashboards, testing, CLI, AI ingestion
|
|
105
|
-
|
|
106
|
-
### Central module
|
|
107
|
-
|
|
108
|
-
From `[/Users/harishpatel/Code/javascript/solid-core-module/src/solid-core.module.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/solid-core.module.ts)`:
|
|
109
|
-
|
|
110
|
-
- `SolidCoreModule` is marked `@Global()`
|
|
111
|
-
- it imports a very large set of entities into TypeORM
|
|
112
|
-
- it wires global infrastructure such as cache, scheduling, static media serving, multer uploads, JWT, CLS, HTTP
|
|
113
|
-
- it registers global guards, interceptors, and exception filters
|
|
114
|
-
- it exposes a wide provider surface that consuming apps can reuse directly
|
|
115
|
-
|
|
116
|
-
This file is effectively the runtime composition root of the platform.
|
|
117
|
-
|
|
118
|
-
### CLI module
|
|
119
|
-
|
|
120
|
-
From `[/Users/harishpatel/Code/javascript/solid-core-module/src/solid-core-cli.module.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/solid-core-cli.module.ts)`:
|
|
121
|
-
|
|
122
|
-
- a separate CLI composition root exists
|
|
123
|
-
- it reuses the main module but adds CLI-oriented database and config setup
|
|
124
|
-
- this is how metadata generation, seeding, test running, and ingestion workflows execute outside the HTTP server
|
|
125
|
-
|
|
126
|
-
## Folder-by-Folder Review
|
|
127
|
-
|
|
128
|
-
The `src` tree is broad. File counts are approximate indicators of emphasis:
|
|
129
|
-
|
|
130
|
-
- `services`: 121 files
|
|
131
|
-
- `dtos`: 118 files
|
|
132
|
-
- `jobs`: 108 files
|
|
133
|
-
- `controllers`: 45 files
|
|
134
|
-
- `entities`: 43 files
|
|
135
|
-
- `testing`: 42 files
|
|
136
|
-
- `helpers`: 40 files
|
|
137
|
-
- `repository`: 40 files
|
|
138
|
-
|
|
139
|
-
That distribution tells us the codebase is primarily a platform runtime with a large behavior surface, not just a small domain model.
|
|
140
|
-
|
|
141
|
-
### Top-level non-`src` folders
|
|
142
|
-
|
|
143
|
-
#### `sql/`
|
|
144
|
-
|
|
145
|
-
- database-specific SQL assets exist for `postgres`, `mysql`, `mariadb`, and `mssql`
|
|
146
|
-
- examples include metadata cleanup procedures
|
|
147
|
-
- this is evidence that SolidX already thinks in terms of backend-database portability, even if the application framework layer is currently NestJS/TypeORM
|
|
148
|
-
|
|
149
|
-
#### `docs/`
|
|
150
|
-
|
|
151
|
-
- contains internal workflow and design notes
|
|
152
|
-
- topics include test data workflow, seed changes, grouping enhancements, and type declaration issues
|
|
153
|
-
- these are useful supporting materials but are not the main runtime itself
|
|
154
|
-
|
|
155
|
-
#### `dev-grooming-docs/`
|
|
156
|
-
|
|
157
|
-
- appears to hold internal notes or prompt material
|
|
158
|
-
- not part of the runtime contract
|
|
159
|
-
|
|
160
|
-
### `src/commands`
|
|
161
|
-
|
|
162
|
-
Purpose:
|
|
163
|
-
|
|
164
|
-
- CLI entrypoints for platform operations
|
|
165
|
-
|
|
166
|
-
Notable responsibilities:
|
|
167
|
-
|
|
168
|
-
- seed metadata and system data
|
|
169
|
-
- refresh generated module/model code
|
|
170
|
-
- remove fields
|
|
171
|
-
- load test data
|
|
172
|
-
- run metadata-driven tests
|
|
173
|
-
- ingest metadata into AI/RAG systems
|
|
174
|
-
- print environment/app info
|
|
175
|
-
- manage fixture setup and teardown
|
|
176
|
-
|
|
177
|
-
Why it matters:
|
|
178
|
-
|
|
179
|
-
- this folder is the operational shell around the platform
|
|
180
|
-
- it is one of the strongest signals that the framework is not just a runtime; it also owns scaffolding, maintenance, and developer workflows
|
|
181
|
-
|
|
182
|
-
Spring Boot implication:
|
|
183
|
-
|
|
184
|
-
- this likely maps to a combination of:
|
|
185
|
-
- CLI commands via Spring Shell, Picocli, or standalone tooling
|
|
186
|
-
- Gradle/Maven plugins or generators
|
|
187
|
-
- operational admin commands
|
|
188
|
-
|
|
189
|
-
### `src/config`
|
|
190
|
-
|
|
191
|
-
Purpose:
|
|
192
|
-
|
|
193
|
-
- configuration assembly
|
|
194
|
-
|
|
195
|
-
Current contents:
|
|
196
|
-
|
|
197
|
-
- cache configuration (`cache.options.ts`)
|
|
198
|
-
|
|
199
|
-
Why it matters:
|
|
200
|
-
|
|
201
|
-
- small folder, but it centralizes how infrastructure components are registered
|
|
202
|
-
|
|
203
|
-
### `src/constants`
|
|
204
|
-
|
|
205
|
-
Purpose:
|
|
206
|
-
|
|
207
|
-
- shared constant definitions for errors, success messages, and chatter message semantics
|
|
208
|
-
|
|
209
|
-
Why it matters:
|
|
210
|
-
|
|
211
|
-
- gives the core consistent platform-wide language for API behavior and event semantics
|
|
212
|
-
|
|
213
|
-
### `src/controllers`
|
|
214
|
-
|
|
215
|
-
Purpose:
|
|
216
|
-
|
|
217
|
-
- platform-owned HTTP endpoints for metadata, IAM, runtime operations, dashboarding, imports/exports, chatter, settings, and supporting entities
|
|
218
|
-
|
|
219
|
-
Representative controller groups:
|
|
220
|
-
|
|
221
|
-
- metadata: `module-metadata`, `model-metadata`, `field-metadata`, `view-metadata`, `action-metadata`, `menu-item-metadata`, `permission-metadata`, `role-metadata`, `security-rule`
|
|
222
|
-
- IAM: `authentication`, `otp-authentication`, `google-authentication`, `user`, `user-view-metadata`, `user-activity-history`, `agent-session`, `agent-event`, `api-key` related flows through services
|
|
223
|
-
- runtime/admin: `setting`, `info`, `test`, `test-queue`, `service`
|
|
224
|
-
- integration/content: `media`, `sms-template`, `email-template`, `mq-message`, `mq-message-queue`
|
|
225
|
-
- analytics: `dashboard`, `dashboard-question`, `dashboard-variable`, `dashboard-layout`, `dashboard-question-sql-dataset-config`
|
|
226
|
-
- data movement: `import-transaction`, `import-transaction-error-log`, `export-template`, `export-transaction`
|
|
227
|
-
- collaboration: `chatter-message`, `chatter-message-details`
|
|
228
|
-
|
|
229
|
-
Observations:
|
|
230
|
-
|
|
231
|
-
- many controllers expose a direct CRUD-style contract over platform entities
|
|
232
|
-
- some route names still carry `FIXME` comments about naming consistency
|
|
233
|
-
- the core package exposes a lot of “admin runtime APIs,” not just reusable service classes
|
|
234
|
-
|
|
235
|
-
Spring Boot implication:
|
|
236
|
-
|
|
237
|
-
- these map naturally to `@RestController` classes
|
|
238
|
-
- but the bigger question is which of these remain part of a reusable core starter versus which should become generated per project
|
|
239
|
-
|
|
240
|
-
### `src/decorators`
|
|
241
|
-
|
|
242
|
-
Purpose:
|
|
243
|
-
|
|
244
|
-
- discovery and extension annotations
|
|
245
|
-
|
|
246
|
-
Important categories:
|
|
247
|
-
|
|
248
|
-
- auth/request decorators: `public`, `auth`, `active-user`, `solid-request-context`, `roles`
|
|
249
|
-
- provider registration decorators:
|
|
250
|
-
- `selection-provider`
|
|
251
|
-
- `computed-field-provider`
|
|
252
|
-
- `scheduled-job-provider`
|
|
253
|
-
- `mail-provider`
|
|
254
|
-
- `sms-provider`
|
|
255
|
-
- `whatsapp-provider`
|
|
256
|
-
- `dashboard-question-data-provider`
|
|
257
|
-
- `dashboard-selection-provider`
|
|
258
|
-
- `security-rule-config-provider`
|
|
259
|
-
- `settings-provider`
|
|
260
|
-
- `extension-user-creation-provider`
|
|
261
|
-
- `solid-database-module`
|
|
262
|
-
- validation/guardrails decorators:
|
|
263
|
-
- `disallow-in-production`
|
|
264
|
-
- `solid-password`
|
|
265
|
-
- `is-not-in-enum`
|
|
266
|
-
|
|
267
|
-
Why it matters:
|
|
268
|
-
|
|
269
|
-
- this folder is one of the key extension seams of the framework
|
|
270
|
-
- decorators are how consuming projects advertise custom providers back to the core runtime
|
|
271
|
-
|
|
272
|
-
Spring Boot implication:
|
|
273
|
-
|
|
274
|
-
- this becomes annotations plus bean discovery, often backed by:
|
|
275
|
-
- custom `@Qualifier` patterns
|
|
276
|
-
- `BeanPostProcessor` / classpath scanning
|
|
277
|
-
- Spring stereotypes and registries
|
|
278
|
-
|
|
279
|
-
### `src/dtos`
|
|
280
|
-
|
|
281
|
-
Purpose:
|
|
282
|
-
|
|
283
|
-
- request/response shape definitions for the entire platform
|
|
284
|
-
|
|
285
|
-
Coverage includes:
|
|
286
|
-
|
|
287
|
-
- metadata creation and update
|
|
288
|
-
- CRUD query/filter/grouping DTOs
|
|
289
|
-
- IAM and OTP flows
|
|
290
|
-
- import/export payloads
|
|
291
|
-
- dashboard configuration
|
|
292
|
-
- saved filters, templates, transactions, settings, chatter, sequences, agent events, and more
|
|
293
|
-
|
|
294
|
-
Why it matters:
|
|
295
|
-
|
|
296
|
-
- the DTO set describes the public API surface of the platform almost as much as the controllers do
|
|
297
|
-
- a Spring Boot rewrite will need a substantial equivalent model in request/response classes and validators
|
|
298
|
-
|
|
299
|
-
### `src/entities`
|
|
300
|
-
|
|
301
|
-
Purpose:
|
|
302
|
-
|
|
303
|
-
- core persistence model for the platform itself
|
|
304
|
-
|
|
305
|
-
Representative entity groups:
|
|
306
|
-
|
|
307
|
-
- metadata and navigation: `ModuleMetadata`, `ModelMetadata`, `FieldMetadata`, `ViewMetadata`, `ActionMetadata`, `MenuItemMetadata`
|
|
308
|
-
- security/IAM: `User`, `RoleMetadata`, `PermissionMetadata`, `SecurityRule`, `UserApiKey`, `UserViewMetadata`, `UserActivityHistory`
|
|
309
|
-
- platform runtime: `Setting`, `Locale`, `ModelSequence`
|
|
310
|
-
- communications: `EmailTemplate`, `SmsTemplate`, `Media`, `MediaStorageProviderMetadata`, `EmailAttachment`
|
|
311
|
-
- queues and async operations: `MqMessage`, `MqMessageQueue`, `ScheduledJob`, `ImportTransaction`, `ImportTransactionErrorLog`, `ExportTransaction`
|
|
312
|
-
- dashboards and analytics: `Dashboard`, `DashboardQuestion`, `DashboardVariable`, `DashboardLayout`, `DashboardQuestionSqlDatasetConfig`
|
|
313
|
-
- collaboration and AI: `ChatterMessage`, `ChatterMessageDetails`, `AiInteraction`, `AgentSession`, `AgentEvent`
|
|
314
|
-
|
|
315
|
-
Base entity model:
|
|
316
|
-
|
|
317
|
-
- `CommonEntity`
|
|
318
|
-
- `LegacyCommonEntity`
|
|
319
|
-
- `LegacyCommonWithIdEntity`
|
|
320
|
-
|
|
321
|
-
Why it matters:
|
|
322
|
-
|
|
323
|
-
- these entities define the shared schema every SolidX backend expects around the business modules
|
|
324
|
-
- this is part of the durable “platform contract” and should likely survive a Java port almost one-for-one conceptually
|
|
325
|
-
|
|
326
|
-
### `src/enums`
|
|
327
|
-
|
|
328
|
-
Purpose:
|
|
329
|
-
|
|
330
|
-
- small enum support surface
|
|
331
|
-
|
|
332
|
-
Current visible usage:
|
|
333
|
-
|
|
334
|
-
- authentication mode / auth type support
|
|
335
|
-
|
|
336
|
-
### `src/factories`
|
|
337
|
-
|
|
338
|
-
Purpose:
|
|
339
|
-
|
|
340
|
-
- runtime provider resolution for email, SMS, and WhatsApp
|
|
341
|
-
|
|
342
|
-
Why it matters:
|
|
343
|
-
|
|
344
|
-
- this is the indirection layer between settings/registry state and concrete transport implementation
|
|
345
|
-
|
|
346
|
-
Spring Boot implication:
|
|
347
|
-
|
|
348
|
-
- likely maps to strategy factories over beans selected by configuration or provider name
|
|
349
|
-
|
|
350
|
-
### `src/filters`
|
|
351
|
-
|
|
352
|
-
Purpose:
|
|
353
|
-
|
|
354
|
-
- exception normalization for HTTP
|
|
355
|
-
|
|
356
|
-
Current visible item:
|
|
357
|
-
|
|
358
|
-
- `http-exception.filter.ts`
|
|
359
|
-
|
|
360
|
-
Why it matters:
|
|
361
|
-
|
|
362
|
-
- core owns platform-wide API error behavior
|
|
363
|
-
|
|
364
|
-
### `src/guards`
|
|
365
|
-
|
|
366
|
-
Purpose:
|
|
367
|
-
|
|
368
|
-
- request authorization and authentication policy enforcement
|
|
369
|
-
|
|
370
|
-
Current guards:
|
|
371
|
-
|
|
372
|
-
- `authentication.guard`
|
|
373
|
-
- `access-token.guard`
|
|
374
|
-
- `api-key.guard`
|
|
375
|
-
- `permissions.guard`
|
|
376
|
-
- `roles.guard`
|
|
377
|
-
|
|
378
|
-
Key behavior:
|
|
379
|
-
|
|
380
|
-
- `AuthenticationGuard` combines bearer/API-key auth and supports public routes
|
|
381
|
-
- it also checks whether a permission is available to the `Public` role
|
|
382
|
-
- it populates CLS request context with IP and user-agent
|
|
383
|
-
|
|
384
|
-
Why it matters:
|
|
385
|
-
|
|
386
|
-
- this is one of the cross-cutting runtime pillars of the platform
|
|
387
|
-
|
|
388
|
-
### `src/helpers`
|
|
389
|
-
|
|
390
|
-
Purpose:
|
|
391
|
-
|
|
392
|
-
- internal platform mechanics and generation helpers
|
|
393
|
-
|
|
394
|
-
Important sub-areas:
|
|
395
|
-
|
|
396
|
-
- code generation and shelling: `command.service`, `schematic.service`
|
|
397
|
-
- metadata support: `module-metadata-helper.service`, `model-metadata-helper.service`
|
|
398
|
-
- runtime registry: `solid-registry.ts`
|
|
399
|
-
- field behavior: `field-crud-managers/*`
|
|
400
|
-
- mapping/error/date/media helpers
|
|
401
|
-
- microservice adapter helpers
|
|
402
|
-
- module discovery helpers
|
|
403
|
-
|
|
404
|
-
Important detail:
|
|
405
|
-
|
|
406
|
-
- the field CRUD managers are central to the metadata-driven engine
|
|
407
|
-
- each field type has logic for validation and transformation
|
|
408
|
-
- relation, media, computed, selection, numeric, text, password, and JSON handling are all delegated through this layer
|
|
409
|
-
|
|
410
|
-
Spring Boot implication:
|
|
411
|
-
|
|
412
|
-
- this becomes a major subsystem, likely implemented with:
|
|
413
|
-
- field-type strategy interfaces
|
|
414
|
-
- validation/transform pipelines
|
|
415
|
-
- registry-driven dispatch
|
|
416
|
-
|
|
417
|
-
### `src/interceptors`
|
|
418
|
-
|
|
419
|
-
Purpose:
|
|
420
|
-
|
|
421
|
-
- cross-cutting request/response behavior
|
|
422
|
-
|
|
423
|
-
Current items:
|
|
424
|
-
|
|
425
|
-
- logging interceptor
|
|
426
|
-
- response wrapper interceptor
|
|
427
|
-
|
|
428
|
-
Why it matters:
|
|
429
|
-
|
|
430
|
-
- these shape consistent API behavior across the platform
|
|
431
|
-
|
|
432
|
-
### `src/interfaces`
|
|
433
|
-
|
|
434
|
-
Purpose:
|
|
435
|
-
|
|
436
|
-
- core runtime contracts
|
|
437
|
-
|
|
438
|
-
Visible examples:
|
|
439
|
-
|
|
440
|
-
- active user context
|
|
441
|
-
- queue/message interfaces
|
|
442
|
-
|
|
443
|
-
Broader use:
|
|
444
|
-
|
|
445
|
-
- the package also exports many interfaces from `src/interfaces.ts` that define provider contracts for scheduled jobs, selection providers, dashboard providers, security rule config providers, and more
|
|
446
|
-
|
|
447
|
-
### `src/jobs`
|
|
448
|
-
|
|
449
|
-
Purpose:
|
|
450
|
-
|
|
451
|
-
- concrete queue publishers, subscribers, and queue option definitions
|
|
452
|
-
|
|
453
|
-
Subfolders:
|
|
454
|
-
|
|
455
|
-
- `database/`
|
|
456
|
-
- `rabbitmq/`
|
|
457
|
-
- `redis/`
|
|
458
|
-
|
|
459
|
-
Coverage:
|
|
460
|
-
|
|
461
|
-
- email delivery
|
|
462
|
-
- SMS delivery
|
|
463
|
-
- OTP
|
|
464
|
-
- WhatsApp
|
|
465
|
-
- chatter
|
|
466
|
-
- code generation
|
|
467
|
-
- computed field evaluation
|
|
468
|
-
- MCP trigger handling
|
|
469
|
-
- test queue flows
|
|
470
|
-
|
|
471
|
-
Why it matters:
|
|
472
|
-
|
|
473
|
-
- the platform abstracts logical jobs from physical transport
|
|
474
|
-
- the same business intention can be backed by DB, Redis, or RabbitMQ implementations
|
|
475
|
-
|
|
476
|
-
Spring Boot implication:
|
|
477
|
-
|
|
478
|
-
- this is a major area that needs conscious redesign
|
|
479
|
-
- Java equivalents might involve:
|
|
480
|
-
- Spring events for local async
|
|
481
|
-
- RabbitMQ/Kafka integrations
|
|
482
|
-
- Redis streams or lists
|
|
483
|
-
- DB-backed outbox/job tables
|
|
484
|
-
|
|
485
|
-
### `src/listeners`
|
|
486
|
-
|
|
487
|
-
Purpose:
|
|
488
|
-
|
|
489
|
-
- application event listeners
|
|
490
|
-
|
|
491
|
-
Current visible item:
|
|
492
|
-
|
|
493
|
-
- user registration listener
|
|
494
|
-
|
|
495
|
-
Why it matters:
|
|
496
|
-
|
|
497
|
-
- the pattern exists, but this is a relatively small surface compared with subscribers and jobs
|
|
498
|
-
|
|
499
|
-
### `src/mappers`
|
|
500
|
-
|
|
501
|
-
Purpose:
|
|
502
|
-
|
|
503
|
-
- mapping between persistence objects and response DTOs/view models
|
|
504
|
-
|
|
505
|
-
Current visible items:
|
|
506
|
-
|
|
507
|
-
- dashboard mapper
|
|
508
|
-
- list-of-values mapper
|
|
509
|
-
|
|
510
|
-
### `src/passport-strategies`
|
|
511
|
-
|
|
512
|
-
Purpose:
|
|
513
|
-
|
|
514
|
-
- Passport-based auth strategy integration
|
|
515
|
-
|
|
516
|
-
Current visible item:
|
|
517
|
-
|
|
518
|
-
- Google OAuth strategy
|
|
519
|
-
|
|
520
|
-
Spring Boot implication:
|
|
521
|
-
|
|
522
|
-
- this becomes Spring Security OAuth2 client/resource-server configuration
|
|
523
|
-
|
|
524
|
-
### `src/repository`
|
|
525
|
-
|
|
526
|
-
Purpose:
|
|
527
|
-
|
|
528
|
-
- repository layer over core entities plus shared repository behavior
|
|
529
|
-
|
|
530
|
-
Most important class:
|
|
531
|
-
|
|
532
|
-
- `SolidBaseRepository<T>`
|
|
533
|
-
|
|
534
|
-
Key behavior from `solid-base.repository.ts`:
|
|
535
|
-
|
|
536
|
-
- repositories are request-context aware
|
|
537
|
-
- security rules are applied automatically to query builders
|
|
538
|
-
- plain `createQueryBuilder()` is intentionally disabled
|
|
539
|
-
- `find`, `findOne`, `count`, `sum`, `average`, `minimum`, `maximum`, and other methods are routed through security-aware query construction
|
|
540
|
-
|
|
541
|
-
Why it matters:
|
|
542
|
-
|
|
543
|
-
- this is one of the defining architectural choices of the framework
|
|
544
|
-
- row-level security is enforced in the repository abstraction, not left to each service/controller
|
|
545
|
-
|
|
546
|
-
Spring Boot implication:
|
|
547
|
-
|
|
548
|
-
- a JPA repository layer alone is not enough
|
|
549
|
-
- you need a security-aware query abstraction or specification builder that guarantees rule enforcement centrally
|
|
550
|
-
|
|
551
|
-
### `src/seeders`
|
|
552
|
-
|
|
553
|
-
Purpose:
|
|
554
|
-
|
|
555
|
-
- bootstrapping platform metadata and standard data
|
|
556
|
-
|
|
557
|
-
Current visible responsibilities:
|
|
558
|
-
|
|
559
|
-
- core metadata seed
|
|
560
|
-
- system fields seed
|
|
561
|
-
- permission metadata seed
|
|
562
|
-
- module test data support
|
|
563
|
-
- seeded email/SMS templates
|
|
564
|
-
|
|
565
|
-
Why it matters:
|
|
566
|
-
|
|
567
|
-
- the framework assumes some platform entities are initialized by seeding
|
|
568
|
-
- this is part of environment bootstrapping, not an optional extra
|
|
569
|
-
|
|
570
|
-
### `src/services`
|
|
571
|
-
|
|
572
|
-
Purpose:
|
|
573
|
-
|
|
574
|
-
- the main behavior layer of the platform
|
|
575
|
-
|
|
576
|
-
This is the single most important folder in the package.
|
|
577
|
-
|
|
578
|
-
Major groups inside `services/`:
|
|
579
|
-
|
|
580
|
-
#### CRUD and metadata services
|
|
581
|
-
|
|
582
|
-
- `crud.service.ts`
|
|
583
|
-
- `crud-helper.service.ts`
|
|
584
|
-
- `module-metadata.service.ts`
|
|
585
|
-
- `model-metadata.service.ts`
|
|
586
|
-
- `field-metadata.service.ts`
|
|
587
|
-
- `view-metadata.service.ts`
|
|
588
|
-
- `action-metadata.service.ts`
|
|
589
|
-
- `menu-item-metadata.service.ts`
|
|
590
|
-
- `permission-metadata.service.ts`
|
|
591
|
-
- `role-metadata.service.ts`
|
|
592
|
-
- `security-rule.service.ts`
|
|
593
|
-
|
|
594
|
-
Responsibilities:
|
|
595
|
-
|
|
596
|
-
- generic CRUD engine
|
|
597
|
-
- filter parsing and query construction
|
|
598
|
-
- metadata create/update/read flows
|
|
599
|
-
- synchronization between DB metadata and JSON files
|
|
600
|
-
- code refresh/generation triggers
|
|
601
|
-
|
|
602
|
-
Important behavior:
|
|
603
|
-
|
|
604
|
-
- `CRUDService<T>` is the generic business CRUD base used by generated app services
|
|
605
|
-
- it loads model metadata, validates permissions, dispatches per-field managers, stores media, and handles generic read/update/delete logic
|
|
606
|
-
- `ModuleMetadataService` and `ModelMetadataService` are dual-mode services: they update the database and also maintain metadata JSON files on disk
|
|
607
|
-
|
|
608
|
-
This DB + filesystem duality is a defining SolidX behavior.
|
|
609
|
-
|
|
610
|
-
#### IAM and security services
|
|
611
|
-
|
|
612
|
-
- `authentication.service.ts`
|
|
613
|
-
- `api-key.service.ts`
|
|
614
|
-
- `user.service.ts`
|
|
615
|
-
- `request-context.service.ts`
|
|
616
|
-
- `refresh-token-ids-storage.service.ts`
|
|
617
|
-
- `sso-code-storage.service.ts`
|
|
618
|
-
- `hashing.service.ts`
|
|
619
|
-
- `bcrypt.service.ts`
|
|
620
|
-
- `encryption.service.ts`
|
|
621
|
-
|
|
622
|
-
Responsibilities:
|
|
623
|
-
|
|
624
|
-
- sign-up, sign-in, forgot/reset password
|
|
625
|
-
- OTP and passwordless patterns
|
|
626
|
-
- refresh token invalidation
|
|
627
|
-
- user lifecycle and account lockout behavior
|
|
628
|
-
- request identity propagation
|
|
629
|
-
- hashing and encryption
|
|
630
|
-
- extension-user creation through registry-discovered providers
|
|
631
|
-
|
|
632
|
-
Notable design point:
|
|
633
|
-
|
|
634
|
-
- authentication is highly settings-driven and provider-driven rather than hard-coded to one flow
|
|
635
|
-
|
|
636
|
-
#### Communication providers
|
|
637
|
-
|
|
638
|
-
- `mail/*`
|
|
639
|
-
- `sms/*`
|
|
640
|
-
- `whatsapp/*`
|
|
641
|
-
- `short-url/*`
|
|
642
|
-
|
|
643
|
-
Responsibilities:
|
|
644
|
-
|
|
645
|
-
- email via SMTP or Elastic Email
|
|
646
|
-
- SMS via Twilio and MSG91
|
|
647
|
-
- WhatsApp via MSG91 and 3Sixty
|
|
648
|
-
- URL shortening
|
|
649
|
-
|
|
650
|
-
These are transport integrations behind factories and decorators.
|
|
651
|
-
|
|
652
|
-
#### Storage and media services
|
|
653
|
-
|
|
654
|
-
- `file/*`
|
|
655
|
-
- `media.service.ts`
|
|
656
|
-
- `mediaStorageProviders/*`
|
|
657
|
-
- `textract.service.ts`
|
|
658
|
-
|
|
659
|
-
Responsibilities:
|
|
660
|
-
|
|
661
|
-
- local disk and S3 file storage
|
|
662
|
-
- media persistence
|
|
663
|
-
- storage path building
|
|
664
|
-
- OCR via AWS Textract
|
|
665
|
-
|
|
666
|
-
#### Import/export and documents
|
|
667
|
-
|
|
668
|
-
- `import-transaction.service.ts`
|
|
669
|
-
- `import-transaction-error-log.service.ts`
|
|
670
|
-
- `export-transaction.service.ts`
|
|
671
|
-
- `export-template.service.ts`
|
|
672
|
-
- `excel.service.ts`
|
|
673
|
-
- `csv.service.ts`
|
|
674
|
-
- `pdf.service.ts`
|
|
675
|
-
|
|
676
|
-
Responsibilities:
|
|
677
|
-
|
|
678
|
-
- create import templates
|
|
679
|
-
- infer mapping and instructions
|
|
680
|
-
- process CSV/XLSX import transactions
|
|
681
|
-
- generate exports and documents
|
|
682
|
-
|
|
683
|
-
This is a strong enterprise feature area.
|
|
684
|
-
|
|
685
|
-
#### Dashboard and analytics
|
|
686
|
-
|
|
687
|
-
- `dashboard.service.ts`
|
|
688
|
-
- `dashboard-question.service.ts`
|
|
689
|
-
- `dashboard-variable.service.ts`
|
|
690
|
-
- `dashboard-layout.service.ts`
|
|
691
|
-
- `dashboard-question-sql-dataset-config.service.ts`
|
|
692
|
-
- `dashboard-selection-providers/*`
|
|
693
|
-
- `question-data-providers/*`
|
|
694
|
-
- `sql-expression-resolver.service.ts`
|
|
695
|
-
|
|
696
|
-
Responsibilities:
|
|
697
|
-
|
|
698
|
-
- dashboard metadata management
|
|
699
|
-
- SQL-backed question datasets
|
|
700
|
-
- runtime variable substitution
|
|
701
|
-
- data shaping for chart/table widgets
|
|
702
|
-
|
|
703
|
-
Important behavior:
|
|
704
|
-
|
|
705
|
-
- dashboards are SQL-driven, not an ORM-only abstraction
|
|
706
|
-
- data providers translate SQL results into frontend-oriented visualization payloads
|
|
707
|
-
|
|
708
|
-
Spring Boot implication:
|
|
709
|
-
|
|
710
|
-
- preserve this as a first-class analytics subsystem, probably using `JdbcTemplate`, jOOQ, or a carefully controlled SQL execution layer
|
|
711
|
-
|
|
712
|
-
#### Queues and asynchronous orchestration
|
|
713
|
-
|
|
714
|
-
- `queues/*`
|
|
715
|
-
- `poller.service.ts`
|
|
716
|
-
- queue publisher factory
|
|
717
|
-
|
|
718
|
-
Responsibilities:
|
|
719
|
-
|
|
720
|
-
- abstract queue implementations
|
|
721
|
-
- standardize publisher/subscriber contracts
|
|
722
|
-
- allow different queue backends without rewriting business logic
|
|
723
|
-
|
|
724
|
-
#### Scheduled jobs
|
|
725
|
-
|
|
726
|
-
- `scheduled-jobs/scheduler.service.ts`
|
|
727
|
-
- `scheduled-job.service.ts`
|
|
728
|
-
- scheduled job selection providers
|
|
729
|
-
|
|
730
|
-
Responsibilities:
|
|
731
|
-
|
|
732
|
-
- persist job definitions
|
|
733
|
-
- compute next run time
|
|
734
|
-
- run registry-discovered job handlers
|
|
735
|
-
- support custom cron expressions and filters via environment controls
|
|
736
|
-
|
|
737
|
-
Important behavior:
|
|
738
|
-
|
|
739
|
-
- jobs are runtime-configurable data, not only code
|
|
740
|
-
|
|
741
|
-
#### Computed fields and dynamic selections
|
|
742
|
-
|
|
743
|
-
- `computed-fields/*`
|
|
744
|
-
- `selection-providers/*`
|
|
745
|
-
|
|
746
|
-
Responsibilities:
|
|
747
|
-
|
|
748
|
-
- compute values during persistence or subscriber flows
|
|
749
|
-
- supply runtime options for dynamic selection fields
|
|
750
|
-
- enable dashboard variable/provider selection
|
|
751
|
-
|
|
752
|
-
Why it matters:
|
|
753
|
-
|
|
754
|
-
- this is part of the metadata execution engine, not just UI support
|
|
755
|
-
|
|
756
|
-
#### AI and generation support
|
|
757
|
-
|
|
758
|
-
- `genai/*`
|
|
759
|
-
- `solid-ts-morph.service.ts`
|
|
760
|
-
- `solid-introspect.service.ts`
|
|
761
|
-
- `database/database-bootstrap.service.ts`
|
|
762
|
-
|
|
763
|
-
Responsibilities:
|
|
764
|
-
|
|
765
|
-
- metadata ingestion into RAG systems
|
|
766
|
-
- MCP-style dashboard generation handlers
|
|
767
|
-
- AST/code introspection support
|
|
768
|
-
- platform code generation and introspection support
|
|
769
|
-
|
|
770
|
-
Why it matters:
|
|
771
|
-
|
|
772
|
-
- SolidX is positioning itself as AI-native, and these services are the beginning of that runtime/tooling bridge
|
|
773
|
-
|
|
774
|
-
### `src/subscribers`
|
|
775
|
-
|
|
776
|
-
Purpose:
|
|
777
|
-
|
|
778
|
-
- TypeORM subscribers for platform-side side effects and metadata synchronization
|
|
779
|
-
|
|
780
|
-
Key areas:
|
|
781
|
-
|
|
782
|
-
- audit stamping
|
|
783
|
-
- created/updated by tracking
|
|
784
|
-
- computed field evaluation
|
|
785
|
-
- soft delete handling
|
|
786
|
-
- metadata and dashboard related reactions
|
|
787
|
-
- security rule and scheduled job synchronization
|
|
788
|
-
|
|
789
|
-
Why it matters:
|
|
790
|
-
|
|
791
|
-
- a lot of platform behavior is evented off ORM lifecycle hooks
|
|
792
|
-
- this will be one of the most delicate migration areas for Spring Boot
|
|
793
|
-
|
|
794
|
-
Spring Boot implication:
|
|
795
|
-
|
|
796
|
-
- likely split across:
|
|
797
|
-
- JPA entity listeners
|
|
798
|
-
- domain events
|
|
799
|
-
- application services
|
|
800
|
-
- async jobs
|
|
801
|
-
|
|
802
|
-
### `src/testing`
|
|
803
|
-
|
|
804
|
-
Purpose:
|
|
805
|
-
|
|
806
|
-
- metadata-driven testing framework
|
|
807
|
-
|
|
808
|
-
Structure suggests:
|
|
809
|
-
|
|
810
|
-
- adapters for API and Playwright UI
|
|
811
|
-
- a scenario/spec registry
|
|
812
|
-
- runtime context, interpolation, timeout handling, steps, reporter
|
|
813
|
-
- example specs and metadata
|
|
814
|
-
|
|
815
|
-
Important point:
|
|
816
|
-
|
|
817
|
-
- testing is treated as a first-class platform capability
|
|
818
|
-
- this is unusual for a framework core and should be considered a genuine product feature
|
|
819
|
-
|
|
820
|
-
Spring Boot implication:
|
|
821
|
-
|
|
822
|
-
- this may remain external tooling rather than live inside the Java backend
|
|
823
|
-
- but the contracts for metadata-driven test specs probably should remain stable
|
|
824
|
-
|
|
825
|
-
### `src/transformers`
|
|
826
|
-
|
|
827
|
-
Purpose:
|
|
828
|
-
|
|
829
|
-
- TypeORM/data conversion helpers
|
|
830
|
-
|
|
831
|
-
Examples:
|
|
832
|
-
|
|
833
|
-
- booleans
|
|
834
|
-
- arrays
|
|
835
|
-
- integers
|
|
836
|
-
- datetimes
|
|
837
|
-
- local date-time transformer
|
|
838
|
-
|
|
839
|
-
Why it matters:
|
|
840
|
-
|
|
841
|
-
- these encapsulate database quirks and value normalization
|
|
842
|
-
|
|
843
|
-
### `src/validators`
|
|
844
|
-
|
|
845
|
-
Purpose:
|
|
846
|
-
|
|
847
|
-
- custom validation helpers
|
|
848
|
-
|
|
849
|
-
Current visible item:
|
|
850
|
-
|
|
851
|
-
- parsable integer validation
|
|
852
|
-
|
|
853
|
-
## Functionality Grouped by Classification
|
|
854
|
-
|
|
855
|
-
This section reorganizes the code by platform capability rather than folder.
|
|
856
|
-
|
|
857
|
-
### 1. Platform Kernel and Runtime Composition
|
|
858
|
-
|
|
859
|
-
Primary locations:
|
|
860
|
-
|
|
861
|
-
- `solid-core.module.ts`
|
|
862
|
-
- `solid-core-cli.module.ts`
|
|
863
|
-
- `config/`
|
|
864
|
-
- `interceptors/`
|
|
865
|
-
- `filters/`
|
|
866
|
-
|
|
867
|
-
Functionality:
|
|
868
|
-
|
|
869
|
-
- global runtime wiring
|
|
870
|
-
- HTTP concerns
|
|
871
|
-
- cache/JWT/CLS/static media/bootstrap setup
|
|
872
|
-
- CLI composition
|
|
873
|
-
|
|
874
|
-
### 2. Metadata and Code Generation System
|
|
875
|
-
|
|
876
|
-
Primary locations:
|
|
877
|
-
|
|
878
|
-
- `services/module-metadata.service.ts`
|
|
879
|
-
- `services/model-metadata.service.ts`
|
|
880
|
-
- `services/field-metadata.service.ts`
|
|
881
|
-
- `helpers/schematic.service.ts`
|
|
882
|
-
- `helpers/module-metadata-helper.service.ts`
|
|
883
|
-
- `helpers/model-metadata-helper.service.ts`
|
|
884
|
-
- `commands/refresh-*`
|
|
885
|
-
- `commands/remove-fields.command.ts`
|
|
886
|
-
|
|
887
|
-
Functionality:
|
|
888
|
-
|
|
889
|
-
- manage module/model/field metadata
|
|
890
|
-
- keep metadata persisted both in DB and JSON files
|
|
891
|
-
- scaffold or refresh generated code
|
|
892
|
-
- maintain inverse relation metadata
|
|
893
|
-
- create default menus/actions/views
|
|
894
|
-
|
|
895
|
-
This is the heart of the metadata-first framework story.
|
|
896
|
-
|
|
897
|
-
### 3. Generic Data Access and CRUD Engine
|
|
898
|
-
|
|
899
|
-
Primary locations:
|
|
900
|
-
|
|
901
|
-
- `services/crud.service.ts`
|
|
902
|
-
- `services/crud-helper.service.ts`
|
|
903
|
-
- `helpers/field-crud-managers/*`
|
|
904
|
-
- `repository/solid-base.repository.ts`
|
|
905
|
-
|
|
906
|
-
Functionality:
|
|
907
|
-
|
|
908
|
-
- generic create/read/update/delete
|
|
909
|
-
- permission checks
|
|
910
|
-
- metadata-aware validation and transformation
|
|
911
|
-
- relation/media/computed/dynamic selection handling
|
|
912
|
-
- filtering, sorting, pagination, grouping
|
|
913
|
-
- security-aware repository access
|
|
914
|
-
|
|
915
|
-
This is the single most important subsystem to preserve in any Java rewrite.
|
|
916
|
-
|
|
917
|
-
### 4. Identity, Authentication, and Security
|
|
918
|
-
|
|
919
|
-
Primary locations:
|
|
920
|
-
|
|
921
|
-
- `services/authentication.service.ts`
|
|
922
|
-
- `services/user.service.ts`
|
|
923
|
-
- `services/api-key.service.ts`
|
|
924
|
-
- `services/request-context.service.ts`
|
|
925
|
-
- `guards/*`
|
|
926
|
-
- `decorators/public.decorator.ts`
|
|
927
|
-
- `decorators/auth.decorator.ts`
|
|
928
|
-
- `repository/security-rule.repository.ts`
|
|
929
|
-
- `services/security-rule.service.ts`
|
|
930
|
-
|
|
931
|
-
Functionality:
|
|
932
|
-
|
|
933
|
-
- login/signup/password reset
|
|
934
|
-
- bearer and API-key auth
|
|
935
|
-
- OTP/passwordless support
|
|
936
|
-
- Google OAuth
|
|
937
|
-
- request identity propagation
|
|
938
|
-
- RBAC and row-level security rules
|
|
939
|
-
- security rule provider extension points
|
|
940
|
-
|
|
941
|
-
### 5. Platform Metadata for Admin UX and Navigation
|
|
942
|
-
|
|
943
|
-
Primary locations:
|
|
944
|
-
|
|
945
|
-
- `entities/*Metadata*.entity.ts`
|
|
946
|
-
- `services/view-metadata.service.ts`
|
|
947
|
-
- `services/action-metadata.service.ts`
|
|
948
|
-
- `services/menu-item-metadata.service.ts`
|
|
949
|
-
- `services/permission-metadata.service.ts`
|
|
950
|
-
- `services/role-metadata.service.ts`
|
|
951
|
-
|
|
952
|
-
Functionality:
|
|
953
|
-
|
|
954
|
-
- describes module structure for the admin UI
|
|
955
|
-
- defines views, actions, menus, permissions, and roles
|
|
956
|
-
- acts as the backend source of truth that `solid-core-ui` consumes
|
|
957
|
-
|
|
958
|
-
### 6. Storage, Media, and Document Processing
|
|
959
|
-
|
|
960
|
-
Primary locations:
|
|
961
|
-
|
|
962
|
-
- `services/file/*`
|
|
963
|
-
- `services/media.service.ts`
|
|
964
|
-
- `services/mediaStorageProviders/*`
|
|
965
|
-
- `services/textract.service.ts`
|
|
966
|
-
|
|
967
|
-
Functionality:
|
|
968
|
-
|
|
969
|
-
- store and serve files
|
|
970
|
-
- abstract local vs S3 storage
|
|
971
|
-
- manage media entity references
|
|
972
|
-
- OCR/document extraction support
|
|
973
|
-
|
|
974
|
-
### 7. Communications and External Messaging
|
|
975
|
-
|
|
976
|
-
Primary locations:
|
|
977
|
-
|
|
978
|
-
- `services/mail/*`
|
|
979
|
-
- `services/sms/*`
|
|
980
|
-
- `services/whatsapp/*`
|
|
981
|
-
- `factories/*`
|
|
982
|
-
- `jobs/*` for delivery backends
|
|
983
|
-
|
|
984
|
-
Functionality:
|
|
985
|
-
|
|
986
|
-
- template-backed email
|
|
987
|
-
- SMS and OTP delivery
|
|
988
|
-
- WhatsApp delivery
|
|
989
|
-
- provider-swappable transport resolution
|
|
990
|
-
|
|
991
|
-
### 8. Import, Export, and Operational Data Movement
|
|
992
|
-
|
|
993
|
-
Primary locations:
|
|
994
|
-
|
|
995
|
-
- `services/import-transaction.service.ts`
|
|
996
|
-
- `services/export-transaction.service.ts`
|
|
997
|
-
- `services/export-template.service.ts`
|
|
998
|
-
- `services/excel.service.ts`
|
|
999
|
-
- `services/csv.service.ts`
|
|
1000
|
-
|
|
1001
|
-
Functionality:
|
|
1002
|
-
|
|
1003
|
-
- import templates
|
|
1004
|
-
- import mappings and validation instructions
|
|
1005
|
-
- background import/export workflows
|
|
1006
|
-
- transaction logging and error tracking
|
|
1007
|
-
|
|
1008
|
-
### 9. Dashboards and Analytics
|
|
1009
|
-
|
|
1010
|
-
Primary locations:
|
|
1011
|
-
|
|
1012
|
-
- `services/dashboard*.service.ts`
|
|
1013
|
-
- `services/question-data-providers/*`
|
|
1014
|
-
- `services/dashboard-selection-providers/*`
|
|
1015
|
-
- `services/sql-expression-resolver.service.ts`
|
|
1016
|
-
- dashboard entities/controllers/repositories
|
|
1017
|
-
|
|
1018
|
-
Functionality:
|
|
1019
|
-
|
|
1020
|
-
- metadata-driven dashboards
|
|
1021
|
-
- SQL-backed widgets
|
|
1022
|
-
- variable substitution
|
|
1023
|
-
- chart/table/meter payload shaping
|
|
1024
|
-
|
|
1025
|
-
### 10. Scheduling and Background Automation
|
|
1026
|
-
|
|
1027
|
-
Primary locations:
|
|
1028
|
-
|
|
1029
|
-
- `services/scheduled-jobs/*`
|
|
1030
|
-
- `services/scheduled-job.service.ts`
|
|
1031
|
-
- `jobs/*`
|
|
1032
|
-
- `decorators/scheduled-job-provider.decorator.ts`
|
|
1033
|
-
|
|
1034
|
-
Functionality:
|
|
1035
|
-
|
|
1036
|
-
- runtime-managed scheduled jobs
|
|
1037
|
-
- multiple async transports
|
|
1038
|
-
- pluggable job handler discovery
|
|
1039
|
-
|
|
1040
|
-
### 11. Collaboration, Activity, and Audit
|
|
1041
|
-
|
|
1042
|
-
Primary locations:
|
|
1043
|
-
|
|
1044
|
-
- `services/chatter-message*.service.ts`
|
|
1045
|
-
- `entities/chatter-*`
|
|
1046
|
-
- `services/user-activity-history.service.ts`
|
|
1047
|
-
- `subscribers/audit.subscriber.ts`
|
|
1048
|
-
- `subscribers/created-by-updated-by.subscriber.ts`
|
|
1049
|
-
|
|
1050
|
-
Functionality:
|
|
1051
|
-
|
|
1052
|
-
- per-record collaboration streams
|
|
1053
|
-
- activity tracking
|
|
1054
|
-
- audit behavior
|
|
1055
|
-
- event-driven change capture
|
|
1056
|
-
|
|
1057
|
-
### 12. AI, MCP, and Introspection Tooling
|
|
1058
|
-
|
|
1059
|
-
Primary locations:
|
|
1060
|
-
|
|
1061
|
-
- `services/genai/*`
|
|
1062
|
-
- `commands/ingest.command.ts`
|
|
1063
|
-
- `services/solid-introspect.service.ts`
|
|
1064
|
-
- `services/solid-ts-morph.service.ts`
|
|
1065
|
-
|
|
1066
|
-
Functionality:
|
|
1067
|
-
|
|
1068
|
-
- ingest module metadata into RAG/search systems
|
|
1069
|
-
- AI-assisted dashboard generation handlers
|
|
1070
|
-
- source introspection and code-awareness support
|
|
1071
|
-
|
|
1072
|
-
### 13. Testing and Quality Tooling
|
|
1073
|
-
|
|
1074
|
-
Primary locations:
|
|
1075
|
-
|
|
1076
|
-
- `testing/*`
|
|
1077
|
-
- `commands/run-tests.command.ts`
|
|
1078
|
-
- `commands/test-data.command.ts`
|
|
1079
|
-
- `commands/fixtures/*`
|
|
1080
|
-
|
|
1081
|
-
Functionality:
|
|
1082
|
-
|
|
1083
|
-
- metadata-driven API/UI testing
|
|
1084
|
-
- reusable test steps and reporters
|
|
1085
|
-
- fixture lifecycle support
|
|
1086
|
-
|
|
1087
|
-
## What Seems Most Core vs Most Replaceable
|
|
1088
|
-
|
|
1089
|
-
### Most core to preserve in a Spring Boot version
|
|
1090
|
-
|
|
1091
|
-
- metadata model and JSON structure
|
|
1092
|
-
- generic CRUD behavior driven by field metadata
|
|
1093
|
-
- row-level security model and repository enforcement
|
|
1094
|
-
- request context propagation
|
|
1095
|
-
- extension registry/provider model
|
|
1096
|
-
- import/export transaction model
|
|
1097
|
-
- dashboard model and SQL dataset execution pattern
|
|
1098
|
-
- scheduled job model
|
|
1099
|
-
- communications abstraction model
|
|
1100
|
-
|
|
1101
|
-
### More implementation-specific to NestJS/TypeORM
|
|
1102
|
-
|
|
1103
|
-
- Passport strategy plumbing
|
|
1104
|
-
- global guard/interceptor wiring style
|
|
1105
|
-
- TypeORM subscribers exactly as written
|
|
1106
|
-
- Angular schematics-based code generation hooks
|
|
1107
|
-
- some CLI composition details
|
|
1108
|
-
- CLS and Nest module discovery specifics
|
|
1109
|
-
|
|
1110
|
-
## Spring Boot Translation Lens
|
|
1111
|
-
|
|
1112
|
-
The cleanest way to think about the Java version is not “rewrite NestJS classes in Java.” It is:
|
|
1113
|
-
|
|
1114
|
-
1. Preserve the platform contracts.
|
|
1115
|
-
2. Re-implement the runtime mechanisms in Spring-native ways.
|
|
1116
|
-
|
|
1117
|
-
### Likely Spring Boot equivalents
|
|
1118
|
-
|
|
1119
|
-
#### Module composition
|
|
1120
|
-
|
|
1121
|
-
Current:
|
|
1122
|
-
|
|
1123
|
-
- global Nest module with exported providers
|
|
1124
|
-
|
|
1125
|
-
Java analogue:
|
|
1126
|
-
|
|
1127
|
-
- Spring Boot starter or platform library
|
|
1128
|
-
- auto-configuration modules
|
|
1129
|
-
- conditional beans for optional features
|
|
1130
|
-
|
|
1131
|
-
#### Entity/repository model
|
|
1132
|
-
|
|
1133
|
-
Current:
|
|
1134
|
-
|
|
1135
|
-
- TypeORM entities
|
|
1136
|
-
- custom repositories extending `SolidBaseRepository`
|
|
1137
|
-
|
|
1138
|
-
Java analogue:
|
|
1139
|
-
|
|
1140
|
-
- JPA entities
|
|
1141
|
-
- Spring Data repositories plus a custom base repository layer
|
|
1142
|
-
- central security-aware query/specification abstraction
|
|
1143
|
-
|
|
1144
|
-
#### Request context
|
|
1145
|
-
|
|
1146
|
-
Current:
|
|
1147
|
-
|
|
1148
|
-
- `nestjs-cls`
|
|
1149
|
-
|
|
1150
|
-
Java analogue:
|
|
1151
|
-
|
|
1152
|
-
- request-scoped beans
|
|
1153
|
-
- `SecurityContextHolder`
|
|
1154
|
-
- servlet filter/interceptor backed context holder
|
|
1155
|
-
|
|
1156
|
-
#### CRUD engine
|
|
1157
|
-
|
|
1158
|
-
Current:
|
|
1159
|
-
|
|
1160
|
-
- generic `CRUDService<T>` plus field-type managers
|
|
1161
|
-
|
|
1162
|
-
Java analogue:
|
|
1163
|
-
|
|
1164
|
-
- generic application service layer
|
|
1165
|
-
- field handler strategy registry
|
|
1166
|
-
- validation/transform pipeline
|
|
1167
|
-
|
|
1168
|
-
#### Provider discovery
|
|
1169
|
-
|
|
1170
|
-
Current:
|
|
1171
|
-
|
|
1172
|
-
- decorators + `SolidRegistry`
|
|
1173
|
-
|
|
1174
|
-
Java analogue:
|
|
1175
|
-
|
|
1176
|
-
- annotations + bean scanning + registry beans
|
|
1177
|
-
|
|
1178
|
-
#### Subscribers and lifecycle hooks
|
|
1179
|
-
|
|
1180
|
-
Current:
|
|
1181
|
-
|
|
1182
|
-
- TypeORM subscribers
|
|
1183
|
-
|
|
1184
|
-
Java analogue:
|
|
1185
|
-
|
|
1186
|
-
- JPA entity listeners
|
|
1187
|
-
- domain events
|
|
1188
|
-
- application services
|
|
1189
|
-
- async workers where hooks become too heavy
|
|
1190
|
-
|
|
1191
|
-
#### Queues
|
|
1192
|
-
|
|
1193
|
-
Current:
|
|
1194
|
-
|
|
1195
|
-
- database, Redis, RabbitMQ implementations
|
|
1196
|
-
|
|
1197
|
-
Java analogue:
|
|
1198
|
-
|
|
1199
|
-
- Spring AMQP / Redis / DB-backed job table or outbox
|
|
1200
|
-
|
|
1201
|
-
#### CLI and code generation
|
|
1202
|
-
|
|
1203
|
-
Current:
|
|
1204
|
-
|
|
1205
|
-
- `nest-commander` + schematics
|
|
1206
|
-
|
|
1207
|
-
Java analogue:
|
|
1208
|
-
|
|
1209
|
-
- Spring Shell or standalone generator tooling
|
|
1210
|
-
- possibly keep generation as an external multi-language tool if that is simpler
|
|
1211
|
-
|
|
1212
|
-
### Recommended boundary for the Java effort
|
|
1213
|
-
|
|
1214
|
-
Treat these as separate workstreams:
|
|
1215
|
-
|
|
1216
|
-
1. Platform contract preservation
|
|
1217
|
-
- metadata JSON shape
|
|
1218
|
-
- REST semantics expected by `solid-core-ui`
|
|
1219
|
-
- security rule model
|
|
1220
|
-
- dashboard payloads
|
|
1221
|
-
- import/export transaction model
|
|
1222
|
-
|
|
1223
|
-
2. Spring runtime kernel
|
|
1224
|
-
- bootstrapping
|
|
1225
|
-
- request context
|
|
1226
|
-
- auth/security
|
|
1227
|
-
- CRUD engine
|
|
1228
|
-
- repository base layer
|
|
1229
|
-
- provider registry
|
|
1230
|
-
|
|
1231
|
-
3. Operational subsystem ports
|
|
1232
|
-
- scheduling
|
|
1233
|
-
- queues
|
|
1234
|
-
- notifications
|
|
1235
|
-
- file/media storage
|
|
1236
|
-
- AI tooling
|
|
1237
|
-
|
|
1238
|
-
4. Tooling story
|
|
1239
|
-
- metadata generation
|
|
1240
|
-
- CLI replacement
|
|
1241
|
-
- test runner compatibility
|
|
1242
|
-
|
|
1243
|
-
## Suggested Decomposition for the Java Backend
|
|
1244
|
-
|
|
1245
|
-
If SolidX moves to Spring Boot, a close structural equivalent might look like:
|
|
1246
|
-
|
|
1247
|
-
- `solidx-core-boot-starter`
|
|
1248
|
-
- auto-configuration
|
|
1249
|
-
- security setup
|
|
1250
|
-
- request context
|
|
1251
|
-
- shared controllers if still desired
|
|
1252
|
-
|
|
1253
|
-
- `solidx-core-domain`
|
|
1254
|
-
- core entities
|
|
1255
|
-
- DTOs
|
|
1256
|
-
- provider interfaces
|
|
1257
|
-
- metadata contracts
|
|
1258
|
-
|
|
1259
|
-
- `solidx-core-runtime`
|
|
1260
|
-
- CRUD engine
|
|
1261
|
-
- metadata services
|
|
1262
|
-
- dashboard engine
|
|
1263
|
-
- import/export
|
|
1264
|
-
- scheduler
|
|
1265
|
-
- registry
|
|
1266
|
-
|
|
1267
|
-
- `solidx-core-integrations`
|
|
1268
|
-
- email/SMS/WhatsApp providers
|
|
1269
|
-
- file storage providers
|
|
1270
|
-
- OCR integrations
|
|
1271
|
-
- queue implementations
|
|
1272
|
-
|
|
1273
|
-
- `solidx-core-cli` or external generator
|
|
1274
|
-
- scaffolding
|
|
1275
|
-
- seed/test/import tools
|
|
1276
|
-
|
|
1277
|
-
This would mirror the conceptual layering already present in the TypeScript package, but with clearer packaging boundaries.
|
|
1278
|
-
|
|
1279
|
-
## Key Conclusions
|
|
1280
|
-
|
|
1281
|
-
1. `solid-core-module` is the backend platform kernel of SolidX, not just a shared utility library.
|
|
1282
|
-
2. The framework is deeply metadata-driven, but not metadata-only. It always combines metadata with generated Nest code.
|
|
1283
|
-
3. The most valuable reusable concepts are the metadata model, CRUD engine, repository security enforcement, provider registry, and operational platform services.
|
|
1284
|
-
4. The strongest coupling to NestJS/TypeORM exists in module wiring, guards/interceptors, subscribers, decorators, and generation tooling.
|
|
1285
|
-
5. A Spring Boot version should preserve behavior and contracts first, and only then choose Java-native mechanisms for implementing them.
|
|
1286
|
-
|
|
1287
|
-
## Appendix: Representative Files Reviewed
|
|
1288
|
-
|
|
1289
|
-
- Core composition:
|
|
1290
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/solid-core.module.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/solid-core.module.ts)`
|
|
1291
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/solid-core-cli.module.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/solid-core-cli.module.ts)`
|
|
1292
|
-
|
|
1293
|
-
- Core runtime:
|
|
1294
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/services/crud.service.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/services/crud.service.ts)`
|
|
1295
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/repository/solid-base.repository.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/repository/solid-base.repository.ts)`
|
|
1296
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/repository/security-rule.repository.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/repository/security-rule.repository.ts)`
|
|
1297
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/services/authentication.service.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/services/authentication.service.ts)`
|
|
1298
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/services/module-metadata.service.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/services/module-metadata.service.ts)`
|
|
1299
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/services/model-metadata.service.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/services/model-metadata.service.ts)`
|
|
1300
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/helpers/solid-registry.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/helpers/solid-registry.ts)`
|
|
1301
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/helpers/schematic.service.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/helpers/schematic.service.ts)`
|
|
1302
|
-
|
|
1303
|
-
- Analytics and AI:
|
|
1304
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/services/question-data-providers/chartjs-sql-data-provider.service.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/services/question-data-providers/chartjs-sql-data-provider.service.ts)`
|
|
1305
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/services/genai/ingest-metadata.service.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/services/genai/ingest-metadata.service.ts)`
|
|
1306
|
-
|
|
1307
|
-
- Scheduling:
|
|
1308
|
-
- `[/Users/harishpatel/Code/javascript/solid-core-module/src/services/scheduled-jobs/scheduler.service.ts](/Users/harishpatel/Code/javascript/solid-core-module/src/services/scheduled-jobs/scheduler.service.ts)`
|
|
1309
|
-
|
|
1310
|
-
- Consumer project examples:
|
|
1311
|
-
- `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/app.module.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/app.module.ts)`
|
|
1312
|
-
- `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/app.service.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/app.service.ts)`
|
|
1313
|
-
- `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/app-default-database.module.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/app-default-database.module.ts)`
|
|
1314
|
-
- `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/cpm/cpm.module.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/cpm/cpm.module.ts)`
|
|
1315
|
-
- `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/cpm/services/customer-master.service.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/cpm/services/customer-master.service.ts)`
|
|
1316
|
-
- `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/cpm/repositories/customer-master.repository.ts](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/src/cpm/repositories/customer-master.repository.ts)`
|
|
1317
|
-
- `[/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/module-metadata/cpm/cpm-metadata.json](/Users/harishpatel/Code/javascript/mswipe-erp-solidx/solid-api/module-metadata/cpm/cpm-metadata.json)`
|