fix(ops): send apikey with push drain, read the web push public key from release/, record 2026-11-17 backlog evidence
The scheduled push drain got HTTP 401 because modern Supabase service keys need the apikey header next to Bearer. NAS deploy scripts fall back to release/webpush-vapid-public.key (public key only). Map, mobile SSOT and deployment runbooks are synced with the verified operations run in docs/evidence/2026-11-17-backlog-operations.md.
This commit is contained in:
parent
8d8aaf5794
commit
6791e29f27
16 changed files with 254 additions and 96 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# 02 — Repository & Infrastructure Map
|
||||
|
||||
> Surface: whole repo
|
||||
> Last updated: 2026-11-14 — `v1.17.1` 전 표면 운영 배포 반영(Desktop/Runtime/Portable Forgejo `200`, Supabase 74 migrations + 24 Edge Functions, Site Pages `d3ro.chanpaca.net`, Worker `d3ro-voice-api`, NAS Docker `api`/`admin`/`web`), 루트 `.dockerignore` 빌드 컨텍스트 격리(대용량 `apps/desktop/`·`scratch/`·`.chrome-*` 제외), `verify-desktop-installer-smoke.mjs` ASAR Pickle 32 MiB 헤더 판독 수정(`405ae16`)
|
||||
> Last updated: 2026-11-17 — `v1.17.1` + Wave 7 NAS·Worker·Site Bridge 운영 반영, Supabase 74 migrations + 24 Edge Functions, 생산 audio-purge/push drain 검증, `release/webpush-vapid-public.key` 공개키 SSOT와 NAS `-BuildOnly` 경로 추가
|
||||
> Source of truth for: layout, workspaces, build/test commands, CI/CD, Docker, deploy, scripts, resources
|
||||
|
||||
---
|
||||
|
|
@ -59,7 +59,9 @@ Note: root `package.json` is the only workspace manifest and declares npm worksp
|
|||
| .NET SDK | 10.0.300 (rollForward latestPatch) | `global.json` |
|
||||
| Deno | 2.8.1 | CI (`edge-functions`) |
|
||||
| JDK | 17 | mobile CI |
|
||||
| Electron | 33.4.11 | `apps/desktop/electron-builder.yml` |
|
||||
| Electron | 43.8.10 | `apps/desktop/package.json` — 44의 Clipboard 전면 재작성 전 마지막 지원 라인; 43의 비동기 text read/write는 await로 처리 |
|
||||
| Next.js | 16.4.6 | `apps/web/package.json`, `apps/admin/package.json` |
|
||||
| Vite / electron-vite / Vitest | 8.3.8 / 6.0.0 / 5.1.0 | root·desktop·web·admin `package.json`; Node 24 필요 |
|
||||
| koffi | 3.3.1 | `apps/desktop/package.json` — FFI into user32/kernel32 for foreground window title/pid/exe/bounds (`utils/win32-foreground.ts`). Chosen over `get-windows` because that package needs an install script this repo does not run; koffi ships N-API 8 prebuilds as optional deps. `asarUnpack` covers `koffi`/`@koromix`. |
|
||||
| uiautomation / comtypes | 2.0.29 / 1.4.17 | `apps/desktop/sidecar/requirements.txt` (Windows only) — UI Automation snapshot behind `GET /uia/focus` (`sidecar/uia_bridge.py`). Dev install: `apps/desktop/sidecar/.venv/Scripts/python.exe -m pip install uiautomation comtypes`. |
|
||||
| React Native | 0.85 | `apps/mobile-rn/package.json` |
|
||||
|
|
@ -205,7 +207,7 @@ Stages `validate → test → build → e2e → package → publish → deploy`.
|
|||
| `docker-compose.yml` | Dev/self-host: `d3ro-api-server` (5050→5000, `./data` volume), `d3ro-admin` (3001), `d3ro-web` (3002, `@d3ro/web` basePath `/app`, Supabase/Payple keys as build args), optional `ollama` (profile `ai`, 11434) |
|
||||
| `docker-compose.nas.yml` | NAS: prebuilt `d3ro-voice-api:latest` / `d3ro-voice-admin:latest` / `d3ro-voice-web:latest` (3002) / `d3ro-whisper` (faster-whisper, OpenAI-compatible). No legal-doc `wwwroot` mount and no `NEXT_PUBLIC_API_URL` — both were dropped 2026-09-26 (Wave 3, b6fe588); legal pages are served only from `site/public`. Root `.dockerignore` excludes non-web/admin directories (`apps/desktop/`, `scratch/`, browser profiles, etc.) so remote `DOCKER_HOST=ssh://...` builds of `admin`/`web` skip local release artifacts; `apps/api-server` builds with `./apps/api-server` context. |
|
||||
|
||||
Deploy scripts: `scripts/deploy-nas.ps1`, `scripts/deploy-nas.sh`, `scripts/nas-control.sh` (start/stop/restart/status/logs/backup/update). `scripts/deploy-site-to-nas.js` was deleted 2026-09-26 (Wave 3, cd9d199) — site deploy is Cloudflare Pages only (`.forgejo/workflows/deploy-site.yml`).
|
||||
Deploy scripts: `scripts/deploy-nas.ps1`, `scripts/deploy-nas.sh`, `scripts/nas-control.sh` (start/stop/restart/status/logs/backup/update). **2026-11-17:** PowerShell `-BuildOnly` builds remote images without tar/secret packaging; both NAS scripts fall back to the versioned public `release/webpush-vapid-public.key` when VAPID env is blank. **2026-11-18:** PowerShell `-Services api,admin,web` selects image builds; `-BuildOnly -Services web` preserves already-built API/Admin images during a targeted rebuild. `scripts/deploy-site-to-nas.js` was deleted 2026-09-26 — site deploy is Cloudflare Pages only.
|
||||
|
||||
Public endpoints (production): `https://d3ro.chanpaca.net` — **랜딩/다운로드 센터**(site/, Pages `d3ro` 배포본을 Workers 라우트 브리지가 서빙), `https://d3ro.chanpaca.net/app` — **웹앱**(`apps/web`, basePath `/app`; 사이트 브리지 워커가 `WEB_APP_ORIGIN`(터널 호스트)으로 전달하며, 호스트가 비어 있으면 `/app`은 503을 반환한다 — 터널 호스트 설정 대기), `https://d3ro-admin.chanpaca.net` (admin CRM). Edge: `server/cloudflare-worker` proxying to the NAS origin, plus a **Cron Trigger** (`* * * * *`) that drains the Supabase push outbox via `send-push?mode=drain` (`src/push-drain.ts`; needs `SUPABASE_URL` var + `SUPABASE_SERVICE_ROLE_KEY` secret). Tunnel: Cloudflare Tunnel `kd-nas` (NAS 포털/API는 현재 이 호스트네임에 바인딩되어 있지 않다).
|
||||
|
||||
|
|
@ -213,7 +215,7 @@ Public endpoints (production): `https://d3ro.chanpaca.net` — **랜딩/다운
|
|||
|
||||
## 7. `server/supabase` (backend)
|
||||
|
||||
- `config.toml` — project `d3ro-voice`, ports 55321-55324, DB major 17, Supabase CLI 3.x `[local_smtp]`, auth redirects (localhost, `d3ro.chanpaca.net`, `d3ro-voice://auth-callback`), providers Google/GitHub/Apple. `audio-purge` has an explicit function stanza with gateway JWT verification disabled because its handler verifies the exact pg_cron service credential. An isolated local stack proved missing/non-service key 401, service 200, and pg_cron/Vault/pg_net removal of the queue row, `audio_files` row, and Storage object; deployment and the production schedule remain unverified.
|
||||
- `config.toml` — project `d3ro-voice`, ports 55321-55324, DB major 17, Supabase CLI 3.x `[local_smtp]`, auth redirects (localhost, `d3ro.chanpaca.net`, `d3ro-voice://auth-callback`), providers Google/GitHub/Apple. `audio-purge` disables gateway JWT verification because its handler verifies the exact service credential. Local proof and the 2026-11-17 production scheduled run both passed; production Vault/pg_net returned HTTP 200 and deleted an isolated real WAV object and queue row.
|
||||
- `migrations/` — **74 SQL migrations** (schema, RLS, auth triggers, storage, team invites, knowledge/pgvector, push outbox, Payple billing (legacy Stripe columns/provider values kept for history), admin roles, mobile platform/monetization, atomic command reorder, device revocation, content reporting, audit log, meeting documents, STT quota reservations, ad reward replay protection, team activity feed, cross-device sync parity & tombstones, and immutable `meeting_memos.revision` CAS `20261113000001`).
|
||||
- `functions/` — **24 Deno Edge Functions** (`stt-proxy`, `llm-proxy`, `content-report`, `generate-meeting-document`, `embed-chunks`, `search-knowledge`, `realtime-token`, `team-invite`, `team-accept`, `send-push`, `audio-purge`, `account-delete`, `admin-users`, `admin-subscriptions`, `admin-payments`, `admin-audit-log`, billing `billing-catalog`/`payple-checkout`/`payple-manage`/`payple-renew`/`payple-webhook`, `iap-verify`, `admob-ssv`, `google-play-rtdn`; Stripe functions removed 2026-09-26). Shared contracts in `functions/_shared/` — push transports now include `webpush.ts` (VAPID + RFC 8291) and `apns.ts` (.p8 token) alongside FCM. CI (`edge-functions`) runs `deno check` + `deno test` and also the Cloudflare worker drain test.
|
||||
- `tests/` — integration/E2E for content report, mobile platform/recording/reward-race, payments, mobile release preflight, push, team push security, STT quota.
|
||||
|
|
@ -247,6 +249,7 @@ Full detail: [`09-supabase-backend.md`](./09-supabase-backend.md).
|
|||
| `release/android-release-identity.json` | package `com.d3ro.voice`, Play app ID, app-signing SHA-256, upload cert SHA-256, evidence keyId, AdMob unit IDs |
|
||||
| `release/desktop-license-public.pem` | Ed25519 public key for desktop offline licenses |
|
||||
| `release/mobile-release-evidence-public.pem` | Ed25519 public key for mobile release evidence |
|
||||
| `release/webpush-vapid-public.key` | Base64url P-256 Web Push public key; private key exists only in Supabase secrets. NAS web builds use this file when VAPID env is blank |
|
||||
| `apps/desktop/electron-builder.yml` | appId `com.d3ro.voice`, NSIS x64 (forced code signing), macOS DMG/ZIP arm64, generic Forgejo publish feed, asarUnpack native modules (`better-sqlite3`, `uiohook-napi`, `koffi`, `@koromix`, `@ffmpeg-installer`; `@nut-tree-fork` unpacked on macOS only), extraResources (icons, sounds, filtered `sox.exe`+`zlib1.dll`+`LICENSE.GPL.txt`, **sidecar**, ffmpeg, ollama) |
|
||||
| `apps/desktop/src/main/update-feed.ts` | Auto-update feed SSOT (canonical Forgejo + legacy GitLab mirror, channels) |
|
||||
| `release/update-policy.json` | Update policy SSOT (channels, minimum supported version, forced update, delta/full, staged rollout, kill switch) |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue