d3ro-voice/apps/mobile
yunchan8804 1fa24ce3c9 feat(V2-4차): Database 제네릭 복원 + /chat + /knowledge + Resend + Push + 문서 생성
묶음 K — Database 제네릭 완전 주입:
- @supabase/ssr 0.5→0.10, @supabase/supabase-js 2.45→2.103 bump
- 버전 정합으로 @supabase/ssr의 Database 제약이 정상 동작
- packages/api-client/src/types.ts:
  - TypedTable<Row, Insert, Update>로 Row & Record<string, unknown> 교차 유지
  - 각 테이블 Insert를 Partial<Row> & Pick<필수필드>로 교체
    (optional 컬럼이 required로 추론되던 문제 해결)
  - push_tokens / team_invites 테이블 타입도 inline 추가
- index.ts: types + client + auth + meetings + history + usage 전체 re-export 복원
- apps/web supabase-browser/server에 <Database> 제네릭 주입

묶음 L — /chat 페이지 (Voice Conversation 이식):
- apps/web/src/components/chat/chat-panel.tsx (client)
  - 메시지 state, user/assistant 말풍선, MetalCard 래핑
  - llm-proxy POST (non-streaming JSON), Anthropic 응답 형식 파싱
  - Enter 전송, Shift+Enter 줄바꿈, 초기화 버튼
- apps/web/src/app/(app)/chat/page.tsx
- Sidebar에 Chat 메뉴 추가 (ChatIcon)
- ko.json nav.chat 키

묶음 M — /knowledge 페이지 (RAG 이식):
- migrations/20260410000002_knowledge_documents.sql
  - knowledge_documents + knowledge_chunks 테이블
  - tsvector 자동 생성 컬럼 + GIN 인덱스 (전문 검색)
  - RLS: 개인/팀 분기 (team_id NULL 가능)
  - pgvector는 주석 처리 (V2-M+1에서 활성화)
- apps/web/src/app/(app)/knowledge/page.tsx — 카드 리스트 + 상태 배지
- components/knowledge/add-knowledge-form.tsx — 제목/타입/본문 입력,
  800자 단위 청킹 후 documents+chunks INSERT
- api-client types.ts에 KnowledgeDocument/Chunk 추가 + Database 등록
- Sidebar Knowledge 메뉴 (LibraryBooksIcon) + ko.json 키

묶음 N — team-invite Resend 이메일:
- functions/team-invite/index.ts에 Resend API 호출 로직 추가
- RESEND_API_KEY 설정 시 HTML 이메일 발송 (팀 이름/초대자/버튼/만료)
- 응답에 email_sent / email_error 포함
- API 키 없으면 기존대로 URL만 반환

묶음 O — Expo Push notification:
- migrations/20260410000003_push_tokens.sql (user_id, token unique, platform)
- functions/send-push/index.ts: 호출자 인증 + 본인/팀 멤버 권한 체크,
  대상 사용자 push_tokens 조회, Expo Push API 배치 호출
- config.toml에 send-push 함수 등록
- apps/mobile/package.json에 expo-device + expo-notifications 추가
- apps/mobile/lib/push.ts: registerPushToken (권한 요청, projectId,
  Android 채널, Supabase upsert)
- auth-context.tsx에서 로그인 직후 자동 등록
- app.json plugins에 expo-notifications

묶음 P — meetings/[id] 문서 생성:
- apps/web/components/meetings/generate-document-button.tsx (client)
  - 4개 템플릿 메뉴 (minutes/report/idea-note/mindmap)
  - 각 템플릿별 systemPrompt 지정
  - llm-proxy 호출 → meeting_documents INSERT
  - latency 측정, prompt_used 기록
- meetings/[id]/page.tsx DOCUMENTS 섹션에 버튼 노출
  (transcript는 edited_transcript ?? raw_transcript 우선)

검증:
- desktop typecheck + build OK
- web typecheck + build OK (14 라우트: 기존 12 + chat + knowledge)
- api-client test 19 passed

통계:
- 총 Edge Functions 10개: stt/llm-proxy, stripe-checkout/portal/webhook,
  team-invite/accept, send-push
- 총 SQL 마이그레이션 7개
- 웹 라우트 14개, 모바일 화면 5개
- 테스트 19개 passed
2026-04-10 08:51:53 +09:00
..
app feat(V2-3차): pull 확장 + invite flow + Realtime + 테스트 + mobile UI 교체 2026-04-10 08:34:52 +09:00
lib feat(V2-4차): Database 제네릭 복원 + /chat + /knowledge + Resend + Push + 문서 생성 2026-04-10 08:51:53 +09:00
app.json feat(V2-4차): Database 제네릭 복원 + /chat + /knowledge + Resend + Push + 문서 생성 2026-04-10 08:51:53 +09:00
package.json feat(V2-4차): Database 제네릭 복원 + /chat + /knowledge + Resend + Push + 문서 생성 2026-04-10 08:51:53 +09:00
README.md feat(V2-6/V2-7/V2-8): Mobile MVP + Teams + Billing 스캐폴딩 2026-04-09 16:39:54 +09:00
tsconfig.json feat(V2-6/V2-7/V2-8): Mobile MVP + Teams + Billing 스캐폴딩 2026-04-09 16:39:54 +09:00

@d3ro/mobile — D3RO Voice Mobile (Expo)

D3RO Voice의 React Native (Expo) 앱. npm workspace에서 제외됨 — Expo의 무거운 native 의존성 때문에 별도 install 필요.

설치

cd apps/mobile
npm install

실행

# Expo dev server 실행 (브라우저에 QR 표시)
npm start

# iOS 시뮬레이터
npm run ios

# Android 에뮬레이터
npm run android

Supabase 설정

app.jsonexpo.extra에 환경변수를 추가하거나, EAS Secrets 사용:

{
  "expo": {
    "extra": {
      "supabaseUrl": "https://your-project.supabase.co",
      "supabaseAnonKey": "eyJ..."
    }
  }
}

또는 app.config.ts로 변환해서 process.env에서 읽기.

화면 구성

Route 설명
/ 진입점, auth 상태에 따라 리다이렉트
/login OAuth (Google/GitHub) 로그인
/(tabs)/meetings 회의 리스트 (Supabase fetch)
/(tabs)/record 녹음 (expo-av) → stt-proxy
/(tabs)/profile 사용자 정보 + 로그아웃

OAuth 콜백

app.jsonscheme: "d3ro-voice"로 deep link 등록. Supabase Auth providers의 redirect URL에 다음 추가:

  • d3ro-voice://auth-callback
  • https://auth.expo.io/@your-username/d3ro-voice (Expo Go 사용 시)

빌드 (EAS)

npm install -g eas-cli
eas login
eas build:configure
eas build --platform ios
eas build --platform android

의존성 비고

@d3ro/core, @d3ro/i18n, @d3ro/api-client 등 monorepo 패키지는 향후 file: link로 재사용 예정. 현재 V2-6 MVP는 코드 중복 (lib/supabase.ts) 허용.

V2-6 MVP 한계

  • DS 컴포넌트 (@d3ro/ui)는 MUI 기반이라 RN에서 미사용. 별도 @d3ro/ui-native 패키지가 V2-6b에서 필요.
  • 푸시 알림 미구현 (V2-6b)
  • 회의 상세 화면 미구현 (V2-6b)
  • 오프라인 캐싱 미구현 (V2-6b)