@tuongaz/seeflow 0.1.3
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 +95 -0
- package/bin/seeflow +32 -0
- package/bin/seeflow-mcp +23 -0
- package/dist/web/assets/html2canvas.esm-CBrSDip1.js +22 -0
- package/dist/web/assets/index-BlhIMoXf.js +8005 -0
- package/dist/web/assets/index-CIpouxGY.css +1 -0
- package/dist/web/assets/index.es-D6Hswegt.js +18 -0
- package/dist/web/assets/purify.es-CLGrRn1w.js +3 -0
- package/dist/web/index.html +13 -0
- package/examples/ecommerce-platform/.seeflow/scripts/play.ts +2 -0
- package/examples/ecommerce-platform/.seeflow/seeflow.json +250 -0
- package/examples/order-pipeline/.seeflow/scripts/play.ts +18 -0
- package/examples/order-pipeline/.seeflow/seeflow.json +86 -0
- package/examples/order-pipeline/README.md +11 -0
- package/examples/order-pipeline/package.json +6 -0
- package/package.json +55 -0
- package/public/runtime/tailwind.js +24394 -0
- package/src/api.ts +1093 -0
- package/src/cli.ts +329 -0
- package/src/demo.ts +65 -0
- package/src/diagram.ts +432 -0
- package/src/events.ts +70 -0
- package/src/mcp-shim.ts +93 -0
- package/src/mcp.ts +540 -0
- package/src/operations.ts +1192 -0
- package/src/process-spawner.ts +75 -0
- package/src/proxy.ts +393 -0
- package/src/registry.ts +139 -0
- package/src/runtime.ts +78 -0
- package/src/schema.ts +441 -0
- package/src/sdk-template.ts +37 -0
- package/src/sdk-writer.ts +37 -0
- package/src/server.ts +211 -0
- package/src/shellout.ts +30 -0
- package/src/status-runner.ts +374 -0
- package/src/watcher.ts +383 -0
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# SeeFlow
|
|
2
|
+
|
|
3
|
+
> Architecture diagrams that actually run, generated by AI agents.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
Turn your static system architecture into a live control panel wired directly to your running application. Click a node, fire a real request, watch downstream services light up as your app emits events back.
|
|
8
|
+
|
|
9
|
+
## Why
|
|
10
|
+
|
|
11
|
+
- **Diagram drift** — Confluence pages go stale. SeeFlow breaks loudly when your actual system changes.
|
|
12
|
+
- **Onboarding friction** — New engineers click through a live flow instead of reading six-month-old docs.
|
|
13
|
+
- **Demo tedium** — Script it once, replay it flawlessly. No more manually clicking through microservices for stakeholders.
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
The SeeFlow plugin reads your codebase, understands your architecture, and generates the full diagram and request scripts automatically. Works with Claude Code, Codex, Cursor, and Windsurf.
|
|
18
|
+
|
|
19
|
+
### 1. Start the studio
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx tuongaz/seeflow start
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 2. Install the plugin
|
|
26
|
+
|
|
27
|
+
**Skill installer (recommended):**
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx skills add tuongaz/seeflow
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
/plugin marketplace add tuongaz/seeflow
|
|
35
|
+
/plugin install create-seeflow@seeflow
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
curl -fsSL https://raw.githubusercontent.com/tuongaz/seeflow/main/install.sh | bash
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Cursor:** Auto-discovers the plugin via `.cursor-plugin/plugin.json` when this repo is cloned. No manual installation needed — just clone and open in Cursor.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
**Then just ask:**
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
/create-seeflow show me the shopping cart feature
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The plugin scans your routes and database connections, generates `seeflow.json`, wires up demo scripts, and opens the canvas at localhost:4321.
|
|
53
|
+
|
|
54
|
+
## MCP server
|
|
55
|
+
|
|
56
|
+
SeeFlow ships an MCP server so any MCP-aware editor can list, register, and edit demos directly. The studio must be running first.
|
|
57
|
+
|
|
58
|
+
**Claude Code:**
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
claude mcp add seeflow -- npx -y -p @tuongaz/seeflow seeflow-mcp
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Via `.mcp.json`** (Cursor, Windsurf, etc.):
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"mcpServers": {
|
|
69
|
+
"seeflow": {
|
|
70
|
+
"command": "npx",
|
|
71
|
+
"args": ["-y", "-p", "@tuongaz/seeflow", "seeflow-mcp"]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The MCP server talks to `http://127.0.0.1:4321/mcp` by default. Override with `SEEFLOW_STUDIO_URL` if needed.
|
|
78
|
+
|
|
79
|
+
## Develop
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
git clone https://github.com/tuongaz/seeflow.git
|
|
83
|
+
cd seeflow && bun install
|
|
84
|
+
make dev # Vite (5173) + Hono studio (4321), both hot-reloading
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`make help` lists every target. Toolchain: Bun ≥ 1.3, Hono, React Flow, Zod, Biome.
|
|
88
|
+
|
|
89
|
+
## Status
|
|
90
|
+
|
|
91
|
+
Early-stage. The schema is stable enough to author against, but expect changes. Issues, ideas, and PRs welcome.
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT — see [`LICENSE`](./LICENSE).
|
package/bin/seeflow
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// SeeFlow CLI launcher.
|
|
3
|
+
//
|
|
4
|
+
// The CLI is written for Bun (uses Bun.serve, Bun.file, Bun.spawn). This
|
|
5
|
+
// thin Node shim makes `npx seeflow …` work even if the user doesn't have
|
|
6
|
+
// Bun installed yet — it falls back to `npx bun` to bootstrap Bun on first
|
|
7
|
+
// run.
|
|
8
|
+
//
|
|
9
|
+
// Recommended: install Bun once (https://bun.sh) for fast startup.
|
|
10
|
+
|
|
11
|
+
import { spawnSync } from 'node:child_process';
|
|
12
|
+
import { dirname, join } from 'node:path';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
14
|
+
|
|
15
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
16
|
+
const cli = join(here, '..', 'src', 'cli.ts');
|
|
17
|
+
const args = process.argv.slice(2);
|
|
18
|
+
|
|
19
|
+
let res = spawnSync('bun', [cli, ...args], { stdio: 'inherit' });
|
|
20
|
+
|
|
21
|
+
if (res.error && res.error.code === 'ENOENT') {
|
|
22
|
+
console.error('seeflow: Bun not found in PATH. Bootstrapping via `npx bun`…');
|
|
23
|
+
console.error(' For instant startup, install Bun: https://bun.sh\n');
|
|
24
|
+
res = spawnSync('npx', ['--yes', 'bun', cli, ...args], { stdio: 'inherit' });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (res.error) {
|
|
28
|
+
console.error(`seeflow: failed to launch CLI: ${res.error.message}`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
process.exit(res.status ?? 1);
|
package/bin/seeflow-mcp
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
|
|
6
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const shim = join(here, '..', 'src', 'mcp-shim.ts');
|
|
8
|
+
const args = process.argv.slice(2);
|
|
9
|
+
|
|
10
|
+
let res = spawnSync('bun', [shim, ...args], { stdio: 'inherit' });
|
|
11
|
+
|
|
12
|
+
if (res.error && res.error.code === 'ENOENT') {
|
|
13
|
+
console.error('seeflow-mcp: Bun not found in PATH. Bootstrapping via `npx bun`…');
|
|
14
|
+
console.error(' For instant startup, install Bun: https://bun.sh\n');
|
|
15
|
+
res = spawnSync('npx', ['--yes', 'bun', shim, ...args], { stdio: 'inherit' });
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (res.error) {
|
|
19
|
+
console.error(`seeflow-mcp: failed to launch MCP shim: ${res.error.message}`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
process.exit(res.status ?? 1);
|