Skip to content

Commit 89cbc59

Browse files
ralyodioclaude
andcommitted
chore: mobile android default, Email shipping, stub READMEs
- mobile-release.yml: tag pushes default to --platform android so iOS credential setup doesn't stall every release - SURFACES.md: Email channel promoted alpha → shipping now that apps/cli/src/daemon/alerts/smtp.ts ships a real nodemailer backend - apps/mobile/README.md: Expo / EAS dev + iOS/Android setup notes - apps/extension/README.md: sideload + per-browser build instructions Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 81cc77c commit 89cbc59

4 files changed

Lines changed: 129 additions & 4 deletions

File tree

.github/workflows/mobile-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ jobs:
7777
PROFILE="production"
7878
fi
7979
80+
# Default to Android on tag pushes so releases don't stall on
81+
# iOS credentials setup. Override with workflow_dispatch.
8082
if [ -n "${{ github.event.inputs.platform }}" ]; then
8183
PLATFORM="${{ github.event.inputs.platform }}"
82-
elif [ "$PROFILE" = "preview" ]; then
83-
PLATFORM="android"
8484
else
85-
PLATFORM="all"
85+
PLATFORM="android"
8686
fi
8787
8888
if [ "${{ github.event.inputs.auto_submit }}" = "true" ] && [ "$PROFILE" = "production" ]; then

apps/extension/README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# ThreatCrush Browser Extension
2+
3+
MV3 extension built with Vite + React 19 + Tailwind. **Status:** dev preview. Sideload-from-source works today; store submissions happen post-launch.
4+
5+
## Dev
6+
7+
```bash
8+
# from repo root
9+
pnpm install
10+
cd apps/extension
11+
pnpm dev # vite dev server for popup/options
12+
```
13+
14+
## Build
15+
16+
Per-browser builds via `scripts/build.js`:
17+
18+
```bash
19+
pnpm build # → dist/chrome, dist/firefox, dist/safari
20+
node scripts/build.js chrome
21+
node scripts/build.js firefox
22+
node scripts/build.js safari
23+
node scripts/build.js all
24+
```
25+
26+
## Sideload (while stores are pending)
27+
28+
**Chrome / Edge:**
29+
1. `pnpm build` and open `chrome://extensions`
30+
2. Enable *Developer mode*
31+
3. *Load unpacked* → select `apps/extension/dist/chrome/`
32+
33+
**Firefox:**
34+
1. Open `about:debugging#/runtime/this-firefox`
35+
2. *Load Temporary Add-on* → select `apps/extension/dist/firefox/manifest.json`
36+
37+
**Safari:**
38+
Requires Xcode to convert to a Safari Web Extension bundle. See Apple's [Safari Web Extensions docs](https://developer.apple.com/documentation/safariservices/safari_web_extensions).
39+
40+
## Features
41+
42+
- Scan any site (security headers, mixed content, basic checks)
43+
- Real-time alert popup when a ThreatCrush server emits a critical event
44+
- Dashboard popup — recent events + module status
45+
46+
## Structure
47+
48+
```
49+
apps/extension/
50+
├── manifest.json MV3 manifest (per-browser variants in src/manifests/)
51+
├── src/
52+
│ ├── background/ Service worker
53+
│ ├── popup/ React popup UI
54+
│ ├── options/ React options page
55+
│ ├── content/ Content scripts
56+
│ └── store/ Zustand stores (shared)
57+
└── scripts/build.js Per-browser packager
58+
```
59+
60+
## Store submission (post-launch)
61+
62+
Each store has its own review process:
63+
- **Chrome Web Store** — requires dev fee, screenshots, privacy policy, scope justification
64+
- **Firefox AMO** — free; source review if minified
65+
- **Safari** — App Store Connect, Apple Developer membership required
66+
67+
None submitted yet.

apps/mobile/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# ThreatCrush Mobile
2+
3+
Expo / React Native app. **Status:** deferred from v0.1.0. The Android pipeline builds cleanly on a tag push; iOS requires an Apple Developer account + one-time credentials setup.
4+
5+
## Dev
6+
7+
```bash
8+
# from repo root
9+
pnpm install
10+
cd apps/mobile
11+
pnpm expo start # dev client (needs expo-dev-client)
12+
```
13+
14+
App config lives in `app.config.ts` (code) — `app.json` is unused.
15+
16+
## EAS Build
17+
18+
Uses `eas.json` profiles:
19+
20+
- `development` — internal dev-client builds, loads `http://localhost:3000`
21+
- `preview` — internal testers (TestFlight / internal track)
22+
- `production` — app store submission, auto-increments build number
23+
24+
```bash
25+
eas build --profile preview --platform android
26+
eas build --profile preview --platform ios
27+
```
28+
29+
## GitHub Actions — mobile-release.yml
30+
31+
Triggers on every `v*` tag. Defaults to `--platform android` because iOS needs interactive credential setup (see below). Override via `workflow_dispatch``platform: ios | all`.
32+
33+
Requires these repo secrets:
34+
- `EXPO_TOKEN` — create at https://expo.dev/settings/access-tokens
35+
- `ENV_FILE` — full contents of `.env` dumped as a single secret
36+
37+
## iOS setup (one-time, interactive)
38+
39+
```bash
40+
cd apps/mobile
41+
eas credentials
42+
```
43+
44+
Pick `iOS → Set up a new Distribution Certificate`. Expo stores the cert + provisioning profile in their vault; future CI builds then work non-interactively.
45+
46+
Requires:
47+
- Apple Developer account ($99/yr)
48+
- App Store Connect app record with bundle `com.threatcrush.mobile`
49+
50+
## Android setup
51+
52+
Expo can auto-generate a keystore on first build — no pre-work needed. For Play Console submission later, add a Google Service Account JSON at `apps/mobile/google-service-account.json` (gitignored) and reference it in `eas.json → submit.production.android.serviceAccountKeyPath`.
53+
54+
## Not wired up yet
55+
56+
- Push notifications (`expo-notifications`)
57+
- Real event stream — `src/stores/events.ts` still returns demo data
58+
- E2E encryption integration — `src/lib/crypto.ts` is standalone

docs/SURFACES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Status values:
2626
| **TUI** | `shipping` | `apps/cli/src/tui/` | Bundled with CLI | react-blessed dashboard. `threatcrush tui`. |
2727
| **API** | `shipping` | `apps/web/src/app/api/` | Same origin as web | REST, bearer-token auth. Used by CLI, desktop, extension. |
2828
| **Webhooks (outbound)** | `shipping` | `apps/cli/src/daemon/alerts/` | Slack, generic webhook | Threat alerts emit when severity ≥ high. |
29-
| **Email (outbound)** | `alpha` | Planned in `alerts/` | SMTP via module | Wire real SMTP before promoting. |
29+
| **Email (outbound)** | `shipping` | `apps/cli/src/daemon/alerts/smtp.ts` | SMTP via `nodemailer` | Configure `[alerts.email]` in `threatcrushd.conf`. |
3030
| **Desktop** | `preview` | `apps/desktop/` | GitHub Releases (unsigned) | Electron. IPC bridge to local `threatcrushd` via Unix socket. macOS/Windows CI still untested. |
3131
| **Browser extension** | `preview` | `apps/extension/` | Sideload from source | Vite + React 19 + MV3. Store submissions post-v0.1.0. |
3232
| **SDK** | `alpha` | `apps/sdk/` | npm (`@threatcrush/sdk`) — not yet published | Types for module authors. Publish ties to marketplace readiness. |

0 commit comments

Comments
 (0)