tapflow 0.0.1 → 0.1.0-alpha.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/LICENSE CHANGED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 tapflow contributors
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 CHANGED
@@ -0,0 +1,192 @@
1
+ <div align="center">
2
+ <img src="docs/public/logo-hero.svg" height="72" alt="tapflow" />
3
+
4
+ <h3>Self-hosted iOS & Android simulator streaming for QA teams</h3>
5
+
6
+ <p>
7
+ Run simulators in the browser — no Appetize, no BrowserStack, no monthly fees.<br />
8
+ App data never leaves your network.
9
+ </p>
10
+
11
+ <p>
12
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License" /></a>
13
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="Node.js ≥ 20" /></a>
14
+ <img src="https://img.shields.io/badge/platform-macOS-lightgrey" alt="macOS Agent" />
15
+ <a href="https://github.com/jo-duchan/tapflow/blob/main/CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome" /></a>
16
+ </p>
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## Demo
22
+
23
+ <!--
24
+ Demo video placeholder.
25
+ When the recording is ready, replace this block with:
26
+
27
+ [![tapflow demo](docs/public/demo-thumbnail.png)](https://YOUR_VIDEO_URL)
28
+
29
+ Recommended thumbnail size: 1280×720, saved to docs/public/demo-thumbnail.png
30
+ -->
31
+
32
+ <div align="center">
33
+ <strong>🎬 Demo video coming soon</strong>
34
+ </div>
35
+
36
+ ---
37
+
38
+ ## Why tapflow?
39
+
40
+ | Solution | Problem |
41
+ |----------|---------|
42
+ | Appetize / BrowserStack | Expensive — app data leaves your network |
43
+ | Physical devices | Cost, loss, management overhead |
44
+ | Xcode / Android Studio | Every QA member needs their own Mac + full toolchain setup |
45
+ | **tapflow** | Use the Mac you already own — data stays on-prem, QA team uses a browser |
46
+
47
+ ## Features
48
+
49
+ - **Browser-based** — QA team needs no installation. Any modern browser works.
50
+ - **iOS Simulator** — JPEG frame streaming at ~30 fps via SimulatorKit IOSurface. No WebDriverAgent required.
51
+ - **Android Emulator** — H.264 streaming via [scrcpy](https://github.com/Genymobile/scrcpy) at ~30 fps.
52
+ - **Touch, swipe & pinch** — real-time input forwarded to the simulator.
53
+ - **App Center** — upload `.app.zip` (iOS) or `.apk` (Android), manage builds by status (Backlog / In Progress / Done / Rejected).
54
+ - **Session Recordings** — record QA sessions, share with your team. Retained for 72 hours.
55
+ - **Mac Resources** — CPU & RAM monitoring per agent. Spot overloaded hosts before assigning sessions.
56
+ - **Team management** — invite links, roles (Admin / Developer / QA / Viewer), Personal Access Tokens for CI/CD.
57
+ - **Self-hosted** — deploy anywhere. No cloud dependency.
58
+
59
+ ## How it works
60
+
61
+ ```
62
+ Browser (QA team) ←—WebSocket—→ Relay Server ←—WebSocket (outbound)—→ Mac Agent
63
+ (Linux / Mac) (iOS · Android)
64
+ ```
65
+
66
+ 1. The **Mac Agent** connects *outbound* to the relay — no inbound firewall rules needed.
67
+ 2. QA opens the **dashboard** in any browser and sees all available devices.
68
+ 3. Touch events are forwarded in real time; the screen streams back to the browser.
69
+ 4. The **relay** also serves the dashboard SPA on the same port — no separate web server needed.
70
+
71
+ ## Quick Start
72
+
73
+ ### 1. Install
74
+
75
+ ```sh
76
+ npm install -g tapflow
77
+ # or: yarn global add tapflow | pnpm add -g tapflow
78
+ ```
79
+
80
+ ### 2. Start relay + agent
81
+
82
+ ```sh
83
+ tapflow start
84
+ # ✓ Relay started on http://localhost:4000
85
+ # ✓ iOS Agent connected (3 simulators available)
86
+ ```
87
+
88
+ This starts both the relay and the agent on the same Mac (local mode).
89
+
90
+ ### 3. Create the first admin account
91
+
92
+ ```sh
93
+ tapflow init
94
+ # ? Admin email: admin@yourteam.com
95
+ # ? Password: ********
96
+ # ✓ Admin account created
97
+ ```
98
+
99
+ ### 4. Open the dashboard
100
+
101
+ Navigate to `http://localhost:4000` and sign in with the account you just created.
102
+
103
+ > **Having issues?** Run `tapflow doctor` to auto-diagnose Node.js, Xcode, `adb`, and other prerequisites.
104
+
105
+ ## Requirements
106
+
107
+ | Component | Requirements |
108
+ |-----------|-------------|
109
+ | **Relay server** | Node.js ≥ 20, any OS (Linux/macOS), ~512 MB RAM |
110
+ | **iOS Agent** | macOS, Xcode with iOS Simulator Runtime, Node.js ≥ 20 |
111
+ | **Android Agent** | macOS, Android SDK (`adb` in `$PATH` or `$ANDROID_HOME` set), AVD with `google_apis/arm64-v8a` (android-34), Node.js ≥ 20 |
112
+ | **Browser (QA)** | Any modern browser — Chrome, Firefox, Safari, Edge |
113
+
114
+ ## Self-Hosting
115
+
116
+ ### Local (single Mac)
117
+
118
+ Relay and agent on the same machine — ideal for a single developer or small team.
119
+
120
+ ```sh
121
+ tapflow start
122
+ ```
123
+
124
+ ### Team (separate relay server)
125
+
126
+ Run the relay on a Linux server or dedicated Mac. Each Mac with simulators runs the agent.
127
+
128
+ **Relay server:**
129
+
130
+ ```sh
131
+ # Recommended: PM2 for automatic restarts
132
+ npm install -g pm2 tapflow
133
+ JWT_SECRET=$(openssl rand -hex 32) pm2 start tapflow --name relay -- relay start
134
+ pm2 save && pm2 startup
135
+ ```
136
+
137
+ **Each Mac agent:**
138
+
139
+ ```sh
140
+ tapflow agent start --relay wss://your-relay-url
141
+ ```
142
+
143
+ > For nginx / Caddy reverse proxy setup and external access, see [Self-Hosting the Relay](https://jo-duchan.github.io/tapflow/guide/self-hosting).
144
+
145
+ ## CLI Reference
146
+
147
+ | Command | Description |
148
+ |---------|-------------|
149
+ | `tapflow start` | Start relay + agent together (local mode) |
150
+ | `tapflow relay start` | Start relay only |
151
+ | `tapflow agent start --relay <url>` | Start agent and connect to a relay |
152
+ | `tapflow init` | Create the first admin account |
153
+ | `tapflow doctor` | Diagnose environment (Node, Xcode, adb…) |
154
+ | `tapflow devices` | List available simulators and emulators |
155
+ | `tapflow boot <name\|udid>` | Boot a simulator or emulator |
156
+ | `tapflow status` | Show connected agents, devices, active sessions |
157
+ | `tapflow reset` | Shut down all simulators and emulators |
158
+ | `tapflow logs` | Show recent relay log entries |
159
+
160
+ Full reference → [CLI docs](https://jo-duchan.github.io/tapflow/reference/cli)
161
+
162
+ ## Documentation
163
+
164
+ **[jo-duchan.github.io/tapflow](https://jo-duchan.github.io/tapflow)**
165
+
166
+ - [Introduction](https://jo-duchan.github.io/tapflow/guide/introduction)
167
+ - [Quick Start](https://jo-duchan.github.io/tapflow/guide/getting-started)
168
+ - [Self-Hosting the Relay](https://jo-duchan.github.io/tapflow/guide/self-hosting)
169
+ - [iOS Agent Setup](https://jo-duchan.github.io/tapflow/guide/ios-agent)
170
+ - [Android Agent Setup](https://jo-duchan.github.io/tapflow/guide/android-agent)
171
+ - [Uploading Builds (CI/CD)](https://jo-duchan.github.io/tapflow/guide/upload-builds)
172
+ - [CLI Reference](https://jo-duchan.github.io/tapflow/reference/cli)
173
+ - [Troubleshooting](https://jo-duchan.github.io/tapflow/guide/troubleshooting)
174
+
175
+ ## Development
176
+
177
+ **Requirements**: Node.js ≥ 20, pnpm ≥ 9
178
+
179
+ ```sh
180
+ git clone https://github.com/jo-duchan/tapflow.git
181
+ cd tapflow
182
+ pnpm install
183
+ pnpm dev
184
+ ```
185
+
186
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for branch strategy, commit conventions, and architecture overview.
187
+
188
+ ## License
189
+
190
+ [MIT](LICENSE) — Copyright © 2025-present tapflow contributors
191
+
192
+ > tapflow bundles [scrcpy-server](https://github.com/Genymobile/scrcpy) (Apache-2.0) for Android screen streaming. See [NOTICE](NOTICE) for full attribution.
package/bin/tapflow.js CHANGED
@@ -1 +1,2 @@
1
- console.log('Tapflow is coming soon.');
1
+ #!/usr/bin/env node
2
+ import '../dist/index.js'
package/package.json CHANGED
@@ -1,15 +1,66 @@
1
1
  {
2
2
  "name": "tapflow",
3
- "version": "0.0.1",
4
- "description": "Self-hosted QA device streaming and remote control toolkit.",
3
+ "version": "0.1.0-alpha.1",
4
+ "description": "Self-hosted iOS/Android simulator streaming for QA teams",
5
+ "keywords": [
6
+ "ios",
7
+ "android",
8
+ "simulator",
9
+ "emulator",
10
+ "qa",
11
+ "testing",
12
+ "streaming",
13
+ "self-hosted"
14
+ ],
15
+ "homepage": "https://github.com/jo-duchan/tapflow",
16
+ "bugs": "https://github.com/jo-duchan/tapflow/issues",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/jo-duchan/tapflow.git"
20
+ },
5
21
  "license": "MIT",
6
- "private": false,
7
22
  "bin": {
8
23
  "tapflow": "./bin/tapflow.js"
9
24
  },
25
+ "type": "module",
26
+ "main": "dist/index.js",
27
+ "types": "dist/index.d.ts",
10
28
  "files": [
11
29
  "bin",
30
+ "dist",
12
31
  "README.md",
13
32
  "LICENSE"
14
- ]
15
- }
33
+ ],
34
+ "publishConfig": {
35
+ "access": "public"
36
+ },
37
+ "exports": {
38
+ ".": {
39
+ "source": "./src/index.ts",
40
+ "tsx": "./src/index.ts",
41
+ "import": "./dist/index.js",
42
+ "default": "./dist/index.js"
43
+ }
44
+ },
45
+ "dependencies": {
46
+ "cac": "^6.7.14",
47
+ "ws": "^8.0.0",
48
+ "@tapflow/agent-core": "0.1.0-alpha.1",
49
+ "@tapflow/ios-agent": "0.1.0-alpha.1",
50
+ "@tapflow/android-agent": "0.1.0-alpha.1",
51
+ "@tapflow/relay": "0.1.0-alpha.1"
52
+ },
53
+ "devDependencies": {
54
+ "@types/node": "^20.0.0",
55
+ "@types/ws": "^8.0.0",
56
+ "tsx": "^4.0.0",
57
+ "typescript": "^5.0.0",
58
+ "vitest": "^2.0.0"
59
+ },
60
+ "scripts": {
61
+ "build": "tsc",
62
+ "dev": "tsx src/index.ts",
63
+ "test": "vitest run",
64
+ "lint": "eslint src"
65
+ }
66
+ }