@hamak/smart-data-dico 1.6.1 → 1.8.1
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 +52 -11
- package/backend/dist/server.mjs +952 -189
- package/frontend/dist/assets/index-95cbb2c0.js +543 -0
- package/frontend/dist/index.html +1 -1
- package/package.json +1 -1
- package/frontend/dist/assets/index-8e272f2d.js +0 -543
package/README.md
CHANGED
|
@@ -236,33 +236,72 @@ All files are git-tracked for versioning, branching, and collaboration.
|
|
|
236
236
|
|
|
237
237
|
### Prerequisites
|
|
238
238
|
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
| Tool | Version | Notes |
|
|
240
|
+
|------|---------|-------|
|
|
241
|
+
| **Node.js** | 18+ (LTS) | Hard requirement; checked via `engines` field |
|
|
242
|
+
| **npm** | 9+ | Ships with Node 18+ |
|
|
243
|
+
| **Git** | 2.x+ | Required — dictionaries are versioned in a git repository |
|
|
244
|
+
| **Docker** | 20+ | Optional, only for the containerized deployment path |
|
|
241
245
|
|
|
242
|
-
|
|
246
|
+
Optional database peer dependencies (only needed if you use **Physical Sync** to introspect a live database — see `peerDependencies` in `package.json`): `pg`, `mysql2`, `mssql`, or `oracledb`. Install just the one(s) you need.
|
|
247
|
+
|
|
248
|
+
### Option A — Install from npm (end users)
|
|
249
|
+
|
|
250
|
+
The fastest way to run the app against a fresh, empty data directory:
|
|
243
251
|
|
|
244
252
|
```bash
|
|
245
|
-
#
|
|
246
|
-
|
|
247
|
-
|
|
253
|
+
# One-off run with auto-bootstrap of ./data-dictionaries
|
|
254
|
+
npx @hamak/smart-data-dico
|
|
255
|
+
|
|
256
|
+
# Or install globally
|
|
257
|
+
npm install -g @hamak/smart-data-dico
|
|
258
|
+
smart-data-dico
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
CLI flags:
|
|
262
|
+
|
|
263
|
+
| Flag | Default | Purpose |
|
|
264
|
+
|------|---------|---------|
|
|
265
|
+
| `--port <n>` | `3001` | Server port |
|
|
266
|
+
| `--data-dir <path>` | `./data-dictionaries` | Project folder (the one containing `dico.config.json`) |
|
|
267
|
+
| `--no-open` | — | Don't auto-open the browser |
|
|
268
|
+
| `-h, --help` | — | Show help |
|
|
248
269
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
270
|
+
On first run, the CLI creates `<data-dir>/dico.config.json` and `<data-dir>/.dico/` if they don't exist. Point it at an existing project folder to keep working on the data you already have.
|
|
271
|
+
|
|
272
|
+
### Option B — Run from source (contributors)
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
# 1. Clone
|
|
276
|
+
git clone https://github.com/amah/smart-data-dico.git
|
|
277
|
+
cd smart-data-dico
|
|
278
|
+
|
|
279
|
+
# 2. Install dependencies — root, backend, frontend
|
|
280
|
+
npm install
|
|
281
|
+
cd backend && npm install && cd ..
|
|
282
|
+
cd frontend && npm install && cd ..
|
|
283
|
+
|
|
284
|
+
# 3. Start the dev servers in two terminals
|
|
285
|
+
cd backend && npm run dev # port 3001
|
|
286
|
+
cd frontend && npm run dev # port 3000
|
|
252
287
|
```
|
|
253
288
|
|
|
254
289
|
- Frontend: http://localhost:3000
|
|
255
290
|
- Backend API: http://localhost:3001
|
|
256
291
|
- API docs: http://localhost:3001/api-docs
|
|
257
292
|
|
|
258
|
-
|
|
293
|
+
In dev, the backend serves the bundled sample project at `samples/eshop/` (three packages: `order-service`, `product-service`, `user-service`). Override with `DATA_DIR=/path/to/your/project npm run dev` to point at your own data.
|
|
294
|
+
|
|
295
|
+
### Option C — Docker
|
|
259
296
|
|
|
260
297
|
```bash
|
|
261
298
|
docker-compose up
|
|
262
299
|
# App available at http://localhost:3001
|
|
263
300
|
```
|
|
264
301
|
|
|
265
|
-
|
|
302
|
+
The image ships with **no bundled sample data** — `docker-compose.yml` mounts `./data-dictionaries` from the host into the container. Either place your own project there, or copy `samples/eshop/` into `./data-dictionaries/` before starting.
|
|
303
|
+
|
|
304
|
+
### Dev Credentials (mock auth, dev mode only)
|
|
266
305
|
|
|
267
306
|
| User | Password | Role |
|
|
268
307
|
|------|----------|------|
|
|
@@ -270,6 +309,8 @@ docker-compose up
|
|
|
270
309
|
| editor | editor123 | EDITOR (create/edit) |
|
|
271
310
|
| viewer | viewer123 | VIEWER (read-only) |
|
|
272
311
|
|
|
312
|
+
A `Bearer mock-token-for-testing` header also works for API testing.
|
|
313
|
+
|
|
273
314
|
### Configuration Profiles
|
|
274
315
|
|
|
275
316
|
Set via `PROFILE` environment variable:
|