realitydb 0.1.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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +99 -0
  3. package/dist/index.js +7164 -0
  4. package/package.json +59 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 emkwambe
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,99 @@
1
+ # SeedForge
2
+
3
+ > Production-like data before production exists.
4
+
5
+ SeedForge is a developer tool that instantly populates your database with
6
+ realistic, schema-aware data. One command, realistic environments.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install -g seedforge
12
+ ```
13
+
14
+ ## Quick Start
15
+
16
+ ```bash
17
+ seedforge scan # Understand your schema
18
+ seedforge seed --seed 42 # Populate with realistic data
19
+ seedforge reset --confirm # Clear and start fresh
20
+ ```
21
+
22
+ Or use npx without installing:
23
+
24
+ ```bash
25
+ npx seedforge scan
26
+ npx seedforge seed --template saas --records 1000 --seed 42
27
+ ```
28
+
29
+ ## Features
30
+
31
+ - **Schema Intelligence** — Automatically understands your database structure
32
+ - **Domain Templates** — SaaS, e-commerce, education with realistic distributions
33
+ - **Timeline Generation** — Datasets spanning months with growth curves
34
+ - **Scenario Injection** — Payment failures, churn spikes, fraud patterns
35
+ - **Reality Packs** — Portable, shareable environment packages
36
+ - **Deterministic** — Same seed = same data, every time
37
+
38
+ ## Templates
39
+
40
+ ```bash
41
+ seedforge seed --template saas --records 1000 --seed 42
42
+ seedforge seed --template ecommerce --records 1000 --seed 42
43
+ seedforge seed --template education --records 1000 --seed 42
44
+ ```
45
+
46
+ ## Timeline & Scenarios
47
+
48
+ ```bash
49
+ seedforge seed --template saas --timeline 12-months --seed 42
50
+ seedforge seed --template saas --scenario payment-failures --scenario-intensity high
51
+ ```
52
+
53
+ ## Reality Packs
54
+
55
+ ```bash
56
+ seedforge pack export --template saas --name my-saas-env --seed 42
57
+ seedforge pack import ./my-saas-env.databox-pack.json --confirm
58
+ ```
59
+
60
+ ## Configuration
61
+
62
+ Create `seedforge.config.json` (also reads `databox.config.json` for backward compatibility):
63
+
64
+ ```json
65
+ {
66
+ "database": {
67
+ "client": "postgres",
68
+ "connectionString": "postgres://user:pass@localhost:5432/mydb"
69
+ },
70
+ "seed": {
71
+ "defaultRecords": 5000,
72
+ "batchSize": 1000,
73
+ "randomSeed": 42
74
+ },
75
+ "template": "saas"
76
+ }
77
+ ```
78
+
79
+ ## Prerequisites
80
+
81
+ - Node.js 20+
82
+ - PostgreSQL database
83
+
84
+ ## Commands
85
+
86
+ | Command | Description |
87
+ |---------|-------------|
88
+ | `seedforge scan` | Scan and display database schema |
89
+ | `seedforge seed` | Generate and insert realistic data |
90
+ | `seedforge reset` | Clear seeded data |
91
+ | `seedforge export` | Export dataset to JSON/CSV/SQL files |
92
+ | `seedforge templates` | List available domain templates |
93
+ | `seedforge scenarios` | List available scenarios |
94
+ | `seedforge pack export` | Export environment as Reality Pack |
95
+ | `seedforge pack import` | Import Reality Pack into database |
96
+
97
+ ## License
98
+
99
+ MIT