|
| 1 | +# ThreatCrush TODO |
| 2 | + |
| 3 | +Generated: 2026-04-11 |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## 🔴 Blockers (Must fix before production launch) |
| 8 | + |
| 9 | +### 1. Phone / SMS Verification ✅ FIXED |
| 10 | +- [x] **Replaced stub phone verification** — `src/app/api/auth/verify-phone/route.ts` now calls `supabase.auth.verifyOtp()` to validate the OTP against Supabase's stored code. |
| 11 | +- [x] **Created `send-phone-code` endpoint** — `src/app/api/auth/send-phone-code/route.ts` triggers Supabase OTP generation, which fires the Telnyx webhook. |
| 12 | +- [x] **Updated frontend** — `src/app/auth/verify/page.tsx` now has a "Send verification code" button and proper OTP input flow. Removed "Beta: Any 6-digit code" warning. |
| 13 | +- [x] **Tests updated** — Added tests for invalid OTP, wrong user OTP, and new `send-phone-code` endpoint tests. |
| 14 | +- [ ] **Runtime requirement**: `TELNYX_API_KEY` and `TELNYX_PHONE_NUMBER` env vars must be configured (Telnyx hook at `src/app/api/hooks/send-sms/route.ts` is already implemented). |
| 15 | +- [ ] **Supabase dashboard**: Set the SMS webhook URL to `https://your-domain.com/api/hooks/send-sms` in Supabase Auth settings. |
| 16 | + |
| 17 | +### 2. Supabase Credentials ✅ FIXED |
| 18 | +- [x] Removed placeholder fallbacks in `src/lib/supabase.ts` — now throws at startup if env vars are not set. |
| 19 | +- [x] Added same guard to `src/app/api/auth/callback/route.ts`. |
| 20 | +- [x] Added runtime validation with clear error messages. |
| 21 | +- [x] **Linked remote project** via `supabase link --project-ref odhaoehucfyrqhanthyq`. |
| 22 | +- [x] **Synced migration history** — all 5 migrations (waitlist, referrals, modules_marketplace, users, + remote 20260406180000) are applied and matched. |
| 23 | +- [x] **Verified `user_profiles` table** exists and accessible on remote. |
| 24 | +- [x] **Verified Telnyx SMS** — API key works, `+19492847328` is active with messaging enabled. |
| 25 | +- [ ] **Supabase dashboard (manual step)**: In Supabase Dashboard → Auth → SMS → configure webhook URL to `https://threatcrush.com/api/hooks/send-sms` with secret `ad6a68662e81fba4c6beb8f7674a15cbdc28946eec8066397bcaf36599f7ceda`. Enable phone provider "Twilio Verify / custom provider" pointing to the webhook. |
| 26 | + |
| 27 | +### 3. CLI Commands — All Gated |
| 28 | +All commands below currently just prompt for email and say "Coming soon — ThreatCrush is in private beta." (`cli/src/index.ts`): |
| 29 | +- [ ] `threatcrush monitor` |
| 30 | +- [ ] `threatcrush tui` |
| 31 | +- [ ] `threatcrush init` |
| 32 | +- [ ] `threatcrush scan` |
| 33 | +- [ ] `threatcrush pentest` |
| 34 | +- [ ] `threatcrush status` |
| 35 | +- [ ] `threatcrush start` |
| 36 | +- [ ] `threatcrush stop` |
| 37 | +- [ ] `threatcrush logs` |
| 38 | +- [ ] `threatcrush activate` |
| 39 | +- [ ] `threatcrush modules` (gated at line 283) |
| 40 | +- [ ] `threatcrush store` (gated at line 290) |
| 41 | +- [ ] `threatcrush store search` (gated at line 296) |
| 42 | +- [ ] `threatcrush update --modules` — says "Module updates coming soon" (line 235) |
| 43 | + |
| 44 | +### 4. TUI Dashboard — Not Implemented |
| 45 | +- [ ] Create `cli/src/tui/dashboard.js` — referenced by `cli/src/commands/monitor.ts:31` but the entire `cli/src/tui/` directory does not exist. |
| 46 | + |
| 47 | +### 5. Module Marketplace — Not Functional |
| 48 | +- [ ] `threatcrush modules install` — says "Module marketplace is not yet available" (`cli/src/commands/modules.ts:57-60`). |
| 49 | +- [ ] Local module install (`./path`) — says "This feature is coming soon" (`cli/src/commands/modules.ts:54`). |
| 50 | +- [ ] Build real backend for module install/purchase flows (store pages exist but are UI-only). |
| 51 | + |
| 52 | +### 6. Module SDK — Not Published |
| 53 | +- [ ] Publish `@threatcrush/sdk` package. The `boilerplates/module-example/src/index.ts` defines its own `ModuleContext` and `EventPayload` interfaces instead of importing from `@threatcrush/sdk`. |
| 54 | + |
| 55 | +### 7. Desktop Release Pipeline — Failing |
| 56 | +- [ ] Fix packaging configuration in GitHub Actions desktop release workflow (fails on all matrix targets: Linux, macOS, Windows). |
| 57 | +- [ ] Configure macOS signing/notarization secrets: `APPLE_CERTIFICATE`, `APPLE_CERTIFICATE_PASSWORD`, `KEYCHAIN_PASSWORD`, `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, `APPLE_TEAM_ID`. |
| 58 | +- [ ] Configure Windows signing secrets: `WINDOWS_CERTIFICATE`, `WINDOWS_CERTIFICATE_PASSWORD`. |
| 59 | +- [ ] Verify GitHub Releases are created properly on tag pushes. |
| 60 | +- [ ] Generate and attach checksums. |
| 61 | +- [ ] Decide how website download buttons should work (direct GitHub release assets vs. first-party downloads page). |
| 62 | +- [ ] Update `/docs/releases` with confirmed artifact names. |
| 63 | +- [ ] Update homepage/download section only after at least one successful release. |
| 64 | + |
| 65 | +### 8. Desktop App — Placeholder IPC |
| 66 | +- [ ] `connectDaemon()` in `desktop/src/preload/index.ts` is a placeholder — always returns `Promise.resolve(false)`. No real IPC with the daemon is implemented. |
| 67 | + |
| 68 | +--- |
| 69 | + |
| 70 | +## 🟡 Significant Gaps |
| 71 | + |
| 72 | +### 9. Mobile App — Skipped for now |
| 73 | +- [ ] EAS login, Expo project setup, `EXPO_TOKEN` GitHub secret |
| 74 | +- [ ] Produce preview build in EAS |
| 75 | +- [ ] Apple App Store Connect and Google Play setup |
| 76 | +- [ ] Replace minimal sanity screen in `mobile/app/index.tsx` with real functionality |
| 77 | +- [ ] Replace hardcoded demo data in `mobile/src/stores/events.ts` with real API calls |
| 78 | +- [ ] Integrate E2E encryption (`mobile/src/lib/crypto.ts`) into real communication flow |
| 79 | + |
| 80 | +### 10. Browser Extension — Demo Data Only |
| 81 | +- [ ] Replace `checkForEvents()` demo data with real API calls (`extension/src/background/index.js:58-59`). |
| 82 | +- [ ] Implement real `scanUrl()` — currently always returns `{ status: 'secure' }` (line 130). |
| 83 | +- [ ] Show scan results in popup UI instead of just logging to console (`extension/src/popup/components/QuickActions.jsx:19`). |
| 84 | +- [ ] Replace demo data in `fetchStats()` with real API calls (`extension/src/store/events.js:4`). Uncomment real `chrome.runtime.sendMessage` call (line 50). |
| 85 | +- [ ] Submit to Chrome Web Store, Firefox Add-ons, Safari (all "coming soon" per README). |
| 86 | + |
| 87 | +### 11. Usage / Billing API — Demo Data Fallback |
| 88 | +- [ ] Connect real CoinPayPortal API (requires `COINPAYPORTAL_API_KEY` and `COINPAYPORTAL_BUSINESS_ID` env vars). |
| 89 | +- [ ] Implement `daily_spend` and `module_breakdown` arrays (currently returned empty even when API is connected, `src/app/api/usage/route.ts:186-187`). |
| 90 | +- [ ] Implement real top-up flow (currently shows alert: "Demo mode: Top-up simulated!" at `src/app/usage/usage-content.tsx:86`). |
| 91 | + |
| 92 | +### 12. Waitlist API — Payment Methods Not Implemented |
| 93 | +- [ ] Implement crypto payments — currently says "Crypto payments coming soon" (`src/app/api/waitlist/route.ts:142`). |
| 94 | +- [ ] Implement card payments — currently says "Card payments coming soon" (`src/app/api/waitlist/route.ts:245`). |
| 95 | +- [ ] Implement payment method selection in UI (`src/components/WaitlistModal.tsx:116`). |
| 96 | + |
| 97 | +### 13. Homepage — Features Marked "Coming Soon" |
| 98 | +- [ ] Implement three "Coming soon" feature sections on homepage (`src/app/page.tsx:601, 624, 650`). |
| 99 | + |
| 100 | +### 14. Package Manager Submissions — Placeholder Hashes |
| 101 | +- [ ] Replace `SHA256_PLACEHOLDER` in Homebrew submission (`scripts/lib/package-managers/homebrew.ts:58-59`). |
| 102 | +- [ ] Replace `SHA256_PLACEHOLDER` in Winget submission (`scripts/lib/package-managers/winget.ts:41`). |
| 103 | +- [ ] Replace `SHA256_PLACEHOLDER` in Scoop submission (`scripts/lib/package-managers/scoop.ts:69`). |
| 104 | + |
| 105 | +--- |
| 106 | + |
| 107 | +## 🔵 Future / Nice-to-Have |
| 108 | + |
| 109 | +### 15. PRD Roadmap — Phase 1 (MVP) |
| 110 | +- [ ] CLI scaffold with `init`, `monitor`, `status` commands (exists but gated). |
| 111 | +- [ ] Core module: `log-watcher` (partially implemented in CLI monitor command). |
| 112 | +- [ ] Core module: `ssh-guard` (partially implemented in CLI monitor command). |
| 113 | +- [ ] Alert system (webhook). |
| 114 | +- [ ] systemd unit file. |
| 115 | + |
| 116 | +### 16. PRD Roadmap — Phase 2 (Beta) |
| 117 | +- [ ] Core module: `network-monitor` (pcap-based). |
| 118 | +- [ ] Core module: `code-scanner` (CLI scan command exists but is gated). |
| 119 | +- [ ] Core module: `pentest-engine`. |
| 120 | +- [ ] Module store on threatcrush.com (store pages exist but are UI-only). |
| 121 | +- [ ] `threatcrush modules install/publish` commands (gated). |
| 122 | +- [ ] License activation (gated). |
| 123 | + |
| 124 | +### 17. PRD Roadmap — Phase 3 (Launch) |
| 125 | +- [ ] Core module: `dns-monitor`. |
| 126 | +- [ ] Core module: `firewall-rules`. |
| 127 | +- [ ] Dashboard web UI. |
| 128 | +- [ ] Cloud sync. |
| 129 | +- [ ] Enterprise features. |
| 130 | + |
| 131 | +### 18. Docker / NPM / CI Workflows |
| 132 | +- [ ] Retest Docker publish workflow (had issues with Docker Hub auth; needs retest after GHCR-only fallback fix). |
| 133 | +- [ ] Confirm `npm-publish.yml` workflow works with real secrets. |
| 134 | +- [ ] Confirm `docker-publish.yml` workflow works with real secrets. |
| 135 | +- [ ] Confirm `submit-packages.yml` workflow works with real secrets. |
| 136 | + |
| 137 | +### 19. Hardware Appliance — Future Plans Only |
| 138 | +- The entire "ThreatCrush Box" hardware appliance line (Stick, Mini, Rack) is a future plan per `docs/FUTURE_PLANS.md`. Timeline starts Q3 2026 for software MVP and extends to 2028 for enterprise hardware. No action needed now. |
| 139 | + |
| 140 | +--- |
| 141 | + |
| 142 | +## Quick Reference |
| 143 | + |
| 144 | +| Category | Key Files | |
| 145 | +|---|---| |
| 146 | +| Phone verification | `src/app/api/auth/verify-phone/route.ts` | |
| 147 | +| Supabase config | `src/lib/supabase.ts` | |
| 148 | +| CLI commands | `cli/src/index.ts`, `cli/src/commands/*.ts` | |
| 149 | +| TUI dashboard | `cli/src/tui/` (missing entirely) | |
| 150 | +| Module marketplace | `cli/src/commands/modules.ts` | |
| 151 | +| Desktop app | `desktop/src/preload/index.ts`, `.github/workflows/desktop-release.yml` | |
| 152 | +| Mobile app | `mobile/app/index.tsx`, `mobile/src/stores/events.ts`, `mobile/src/lib/crypto.ts` | |
| 153 | +| Browser extension | `extension/src/background/index.js`, `extension/src/store/events.js` | |
| 154 | +| Usage/billing | `src/app/api/usage/route.ts`, `src/app/usage/usage-content.tsx` | |
| 155 | +| Waitlist/payments | `src/app/api/waitlist/route.ts`, `src/components/WaitlistModal.tsx` | |
| 156 | +| Homepage | `src/app/page.tsx` | |
| 157 | +| Package managers | `scripts/lib/package-managers/homebrew.ts`, `winget.ts`, `scoop.ts` | |
0 commit comments