@doc-karta/karta 0.1.1 → 0.1.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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +84 -0
  3. package/package.json +12 -6
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sean Cabalse
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,84 @@
1
+ # @doc-karta/karta
2
+
3
+ **A living, graph-based documentation viewer for monorepos.**
4
+
5
+ Your docs are MDX files with typed frontmatter. A fast Rust core crawls them into
6
+ a single `registry.json`, and a React canvas renders the
7
+ **page → component → BFF → service-API** dependency graph. A broken reference is
8
+ a *build error* — not a wiki page that quietly went stale.
9
+
10
+ > Part of [doc-karta](https://github.com/seancabalse/doc-karta). This package is
11
+ > the CLI + dev server + UI; the native `karta-core` binary ships prebuilt per
12
+ > platform as an optional dependency (no Rust toolchain, no postinstall download).
13
+
14
+ ## Install
15
+
16
+ ```bash
17
+ npm install -g @doc-karta/karta
18
+ ```
19
+
20
+ The native core ships prebuilt for macOS (arm64/x64), Linux (x64/arm64), and
21
+ Windows (x64) via npm `optionalDependencies` — nothing to compile.
22
+
23
+ ## Usage
24
+
25
+ ```bash
26
+ karta init # scaffold .docviz/config.ts (+ example if you have no docs yet)
27
+ karta dev [dir] # serve the UI + watch [dir]; the graph hot-reloads on save
28
+ karta build [dir] # crawl [dir] into a static site (default out: karta-dist/)
29
+ karta scan [dir] # fail if any doc contains a likely secret (also gates build)
30
+ ```
31
+
32
+ - **`init`** is idempotent (never overwrites) and **zero-config**: it scans for
33
+ existing `docs/*.mdx` and narrows the `include` globs to where your docs live;
34
+ if you have none yet it writes a self-contained page→component example so your
35
+ first graph is never empty.
36
+ - **`dev`** serves the prebuilt UI and pushes updates over a WebSocket — edit any
37
+ `.mdx` and the graph hot-reloads with no refresh; a broken reference shows
38
+ inline and the last good graph stays.
39
+ - **`build`** emits a self-contained static site (UI + crawled `registry.json`)
40
+ you can host anywhere: `npx serve karta-dist`.
41
+
42
+ ## Anatomy of a doc
43
+
44
+ A doc is plain MDX with **typed** YAML frontmatter. Each `calls` entry references
45
+ another node by its bare `id`; the crawler resolves those into graph edges, and a
46
+ reference to a node that doesn't exist **fails the crawl**.
47
+
48
+ ```mdx
49
+ ---
50
+ docviz_version: "1.0"
51
+ id: dashboard-page
52
+ type: page
53
+ title: Dashboard
54
+ status: stable
55
+ audience: [business, tech]
56
+ calls:
57
+ - bff: get-portfolio
58
+ - bff: get-prices
59
+ ---
60
+
61
+ # Dashboard
62
+
63
+ The authenticated landing screen, fed by the portfolio and prices BFFs.
64
+ ```
65
+
66
+ ## Secrets scanning
67
+
68
+ Every `karta build` first scans the raw `.mdx` sources and **fails the build**
69
+ (errors, not warnings) if it finds a likely secret — credentialed URLs
70
+ (`scheme://user:pass@host`), AWS access keys (`AKIA…`/`ASIA…`), JWTs, or base64
71
+ blobs over 50 chars. Findings are redacted in the output so a CI log never
72
+ reprints the secret. Run it standalone with `karta scan [dir]`.
73
+
74
+ For an intentional example, add `<!-- karta-allow-secret -->` on the line — or the
75
+ line directly above — to suppress that finding.
76
+
77
+ ## Documentation
78
+
79
+ Full docs, the registry format contract, and the development guide live in the
80
+ [doc-karta repository](https://github.com/seancabalse/doc-karta).
81
+
82
+ ## License
83
+
84
+ [MIT](./LICENSE) © Sean Cabalse
package/package.json CHANGED
@@ -1,9 +1,15 @@
1
1
  {
2
2
  "name": "@doc-karta/karta",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "doc-karta CLI + dev server + graph UI",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/seancabalse/doc-karta.git",
11
+ "directory": "packages/karta"
12
+ },
7
13
  "bin": {
8
14
  "karta": "./bin/karta.js"
9
15
  },
@@ -43,10 +49,10 @@
43
49
  "vitest": "^3.0.0"
44
50
  },
45
51
  "optionalDependencies": {
46
- "@doc-karta/core-darwin-arm64": "0.1.1",
47
- "@doc-karta/core-darwin-x64": "0.1.1",
48
- "@doc-karta/core-linux-x64": "0.1.1",
49
- "@doc-karta/core-linux-arm64": "0.1.1",
50
- "@doc-karta/core-win32-x64": "0.1.1"
52
+ "@doc-karta/core-darwin-arm64": "0.1.2",
53
+ "@doc-karta/core-darwin-x64": "0.1.2",
54
+ "@doc-karta/core-linux-x64": "0.1.2",
55
+ "@doc-karta/core-linux-arm64": "0.1.2",
56
+ "@doc-karta/core-win32-x64": "0.1.2"
51
57
  }
52
58
  }