d3ro-voice/apps/web/.next/static/chunks/app/billing/page-4bd3aea47a65b96f.js
yunchan8804 61a96b3e9b feat(V2-6/V2-7/V2-8): Mobile MVP + Teams + Billing 스캐폴딩
V2-6 — Mobile (Expo) MVP
- apps/mobile/ 신규, npm workspace에서 제외 (Expo deps 부담 회피)
- Expo SDK 51 + Expo Router + AsyncStorage Supabase 클라이언트
- 화면: index/login/(tabs)/{meetings,record,profile}
- expo-av로 녹음 → Edge Function stt-proxy 호출
- expo-web-browser + expo-linking으로 OAuth 콜백 처리
- README에 setup/EAS build 가이드
- 루트 package.json workspaces를 명시 나열로 변경 (apps/mobile 제외)

V2-7 — 팀 기능 (Web)
- apps/web/src/app/teams/page.tsx — 가입한 팀 카드 그리드
- apps/web/src/app/teams/[id]/page.tsx — 멤버 + 공유 회의
- components/teams/create-team-form.tsx — 팀 생성 + owner 자동 team_members
- components/teams/invite-member-form.tsx — user_id 직접 초대 (V2-7b에서 invite flow)
- Sidebar에 Teams/Billing 메뉴 + 아이콘
- ko.json에 nav.teams/nav.billing 키 추가
- V2-2 teams/team_members RLS 활용

V2-8 — 결제 스캐폴딩
- apps/web/src/app/billing/page.tsx — Free/Pro/Team 가격표 + 현재 구독
- components/billing/checkout-button.tsx — Edge Function 호출 후 redirect
- server/supabase/functions/stripe-checkout/index.ts:
  - JWT 인증 -> 기존 customer 조회/생성 -> Checkout Session 생성
  - subscriptions 테이블에 customer_id upsert
- server/supabase/functions/stripe-webhook/index.ts:
  - checkout.session.completed -> subscriptions tier=pro/team active
  - customer.subscription.updated/created -> status/period 업데이트
  - customer.subscription.deleted -> tier=free, status=canceled
  - signature 검증은 placeholder (V2-8b에서 정식)
- server/supabase/config.toml에 두 함수 등록 (webhook verify_jwt=false)

검증:
- desktop typecheck OK (회귀 없음)
- web typecheck OK
- web next build OK (11 라우트)
- mobile은 별도 install 필요 (workspace 제외)

memory/project_status.md 갱신 — V2 마스터 플랜 전 페이즈 로컬 완료
2026-04-09 16:39:54 +09:00

1 line
No EOL
5.4 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[522],{324:(e,n,r)=>{"use strict";r.d(n,{Sidebar:()=>y});var o=r(4568),s=r(7541),i=r(1284),t=r(6987),l=r(6763),a=r(6262),d=r(5431),c=r(3775),h=r(1084),b=r(2278),u=r(2775),m=r(812),v=r(1166),P=r(2010),x=r(1441),p=r(3791),g=r(7740),f=r(1037);function y(){var e,n,r,y,j,k;let A=(0,s.useRouter)(),M=(0,s.usePathname)(),{t:w}=(0,g.s9)(),C=[{key:"dashboard",path:"/dashboard",label:null!=(e=w("nav.dashboard"))?e:"Dashboard",icon:(0,o.jsx)(h.A,{})},{key:"meetings",path:"/meetings",label:null!=(n=w("nav.meetings"))?n:"Meetings",icon:(0,o.jsx)(b.A,{})},{key:"record",path:"/record",label:null!=(r=w("nav.record"))?r:"Record",icon:(0,o.jsx)(u.A,{})},{key:"teams",path:"/teams",label:null!=(y=w("nav.teams"))?y:"Teams",icon:(0,o.jsx)(m.A,{})},{key:"billing",path:"/billing",label:null!=(j=w("nav.billing"))?j:"Billing",icon:(0,o.jsx)(v.A,{})}];async function _(){let e=(0,f.c)();await e.auth.signOut(),A.replace("/login")}return(0,o.jsxs)(i.default,{sx:{width:240,minHeight:"100vh",bgcolor:p.sM.bg.sidebar,borderRight:"1px solid ".concat(p.sM.border.default),display:"flex",flexDirection:"column"},children:[(0,o.jsx)(i.default,{sx:{p:3,borderBottom:"1px solid ".concat(p.sM.border.default)},children:(0,o.jsx)(x.Rk,{variant:"heading",children:"D3RO VOICE"})}),(0,o.jsx)(t.A,{sx:{flex:1,py:2},children:C.map(e=>{let n=M===e.path||M.startsWith("".concat(e.path,"/"));return(0,o.jsx)(l.Ay,{disablePadding:!0,children:(0,o.jsxs)(a.A,{selected:n,onClick:()=>A.push(e.path),sx:{"&.Mui-selected":{bgcolor:p.sM.bg.inset,borderLeft:"3px solid ".concat(p.sM.accent.amber)}},children:[(0,o.jsx)(d.A,{sx:{color:n?p.sM.accent.amber:p.sM.text.label},children:e.icon}),(0,o.jsx)(c.A,{primary:e.label,primaryTypographyProps:{color:n?p.sM.text.primary:p.sM.text.secondary}})]})},e.key)})}),(0,o.jsx)(t.A,{sx:{borderTop:"1px solid ".concat(p.sM.border.default)},children:(0,o.jsx)(l.Ay,{disablePadding:!0,children:(0,o.jsxs)(a.A,{onClick:()=>void _(),children:[(0,o.jsx)(d.A,{sx:{color:p.sM.text.label},children:(0,o.jsx)(P.A,{})}),(0,o.jsx)(c.A,{primary:null!=(k=w("nav.logout"))?k:"Logout",primaryTypographyProps:{color:p.sM.text.secondary}})]})})})]})}},1441:(e,n,r)=>{"use strict";r.d(n,{Rk:()=>s.PhosphorText,Uu:()=>o.MetalCard}),r(4070),r(9006),r(5281),r(6652);var o=r(9502),s=r(215);r(2517),r(1459),r(984)},3320:(e,n,r)=>{"use strict";r.d(n,{CheckoutButton:()=>h});var o=r(4568),s=r(7620),i=r(1284),t=r(2622),l=r(5663),a=r(6032),d=r(1037),c=r(459);function h(e){let{tier:n}=e,[r,h]=(0,s.useState)(!1),[b,u]=(0,s.useState)(null);async function m(){u(null),h(!0);try{let e=(0,d.c)(),{data:{session:r}}=await e.auth.getSession();if(!r)return void u("로그인이 필요합니다");let o=await fetch("".concat(c.env.NEXT_PUBLIC_SUPABASE_URL,"/functions/v1/stripe-checkout"),{method:"POST",headers:{Authorization:"Bearer ".concat(r.access_token),"Content-Type":"application/json"},body:JSON.stringify({tier:n,success_url:"".concat(window.location.origin,"/billing?success=1"),cancel_url:"".concat(window.location.origin,"/billing?canceled=1")})});if(!o.ok){let e=await o.text();throw Error("Checkout 시작 실패: ".concat(o.status," ").concat(e))}let s=await o.json();s.url?window.location.href=s.url:u("Checkout URL을 받지 못했습니다")}catch(e){u(e instanceof Error?e.message:"Unknown error")}finally{h(!1)}}return(0,o.jsxs)(i.default,{children:[(0,o.jsx)(t.A,{fullWidth:!0,variant:"contained",size:"large",onClick:()=>void m(),disabled:r,startIcon:r?(0,o.jsx)(l.A,{size:16,color:"inherit"}):null,children:"업그레이드"}),b&&(0,o.jsx)(a.A,{severity:"error",variant:"outlined",sx:{mt:1,fontSize:11},children:b})]})}},5246:(e,n,r)=>{Promise.resolve().then(r.bind(r,3320)),Promise.resolve().then(r.bind(r,324)),Promise.resolve().then(r.bind(r,1284)),Promise.resolve().then(r.bind(r,7960)),Promise.resolve().then(r.bind(r,7301)),Promise.resolve().then(r.bind(r,8613)),Promise.resolve().then(r.bind(r,9746)),Promise.resolve().then(r.bind(r,1379)),Promise.resolve().then(r.bind(r,1774)),Promise.resolve().then(r.bind(r,8448)),Promise.resolve().then(r.bind(r,7273)),Promise.resolve().then(r.bind(r,5608)),Promise.resolve().then(r.bind(r,1238)),Promise.resolve().then(r.bind(r,4590)),Promise.resolve().then(r.bind(r,3174)),Promise.resolve().then(r.bind(r,2421)),Promise.resolve().then(r.bind(r,8758)),Promise.resolve().then(r.bind(r,9969)),Promise.resolve().then(r.bind(r,8356)),Promise.resolve().then(r.bind(r,5845)),Promise.resolve().then(r.bind(r,3292)),Promise.resolve().then(r.bind(r,2406)),Promise.resolve().then(r.bind(r,2105)),Promise.resolve().then(r.bind(r,1374)),Promise.resolve().then(r.bind(r,1580)),Promise.resolve().then(r.bind(r,850)),Promise.resolve().then(r.bind(r,6310)),Promise.resolve().then(r.bind(r,984)),Promise.resolve().then(r.bind(r,4070)),Promise.resolve().then(r.bind(r,9006)),Promise.resolve().then(r.bind(r,5281)),Promise.resolve().then(r.bind(r,9502)),Promise.resolve().then(r.bind(r,2517)),Promise.resolve().then(r.bind(r,215)),Promise.resolve().then(r.bind(r,6652)),Promise.resolve().then(r.bind(r,1459))},7960:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>l});var o=r(9969),s=r(8613),i=r(5120),t=r(1774);let l=(0,o.default)({createStyledComponent:(0,s.default)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,n)=>{let{ownerState:r}=e;return[n.root,r.container&&n.container]}}),componentName:"MuiGrid",useThemeProps:e=>(0,i.b)({props:e,name:"MuiGrid"}),useTheme:t.default})}},e=>{e.O(0,[385,77,988,189,949,473,746,605,32,791,803,910,587,18,358],()=>e(e.s=5246)),_N_E=e.O()}]);