You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Categories: ott, music, gaming, shopping, productivity, cloud, news, fitness, education, finance, food, other
Locales: ko (한국어), en (English), ja (日本語)
API Endpoints
Auth
Method
Endpoint
Description
GET
/auth/login/google
Start Google OAuth flow
GET
/auth/callback/google
Google OAuth callback
POST
/auth/signup/email
Email signup
POST
/auth/login/email
Email login
POST
/auth/logout
Logout
GET
/auth/me
Get current user
Subscriptions
Method
Endpoint
Description
GET
/subscriptions
List user's subscriptions
POST
/subscriptions
Create subscription
PUT
/subscriptions/:id
Update subscription
DELETE
/subscriptions/:id
Delete subscription
Development Commands
pnpm install # Install dependencies
pnpm dev # Run API + Web concurrently
pnpm dev:api # API only (http://localhost:8787)
pnpm dev:web # Web only (http://localhost:3000)
pnpm db:generate # Generate Drizzle migrations
pnpm db:migrate # Apply migrations to local D1
pnpm db:seed # Seed service providers to local D1
pnpm db:seed:prod # Seed service providers to production D1
pnpm test# Run tests
Code Conventions
TypeScript
Strict mode enabled
Use interface for object types, type for unions/primitives
Prefer const over let
React/Next.js
Use App Router (app/ directory)
Client components marked with 'use client'
Server components by default
Use shadcn/ui components from @/components/ui
API
Use Hono's type-safe routing
All routes require auth except /auth/*
Return JSON responses with proper status codes
User data isolation via userId in queries
Styling
Tailwind CSS with shadcn/ui design tokens
Dark mode via CSS variables in globals.css
Use cn() utility for conditional classes
Testing
Test Framework
Framework: Vitest
Test files: *.test.ts
Run tests: pnpm test
Coverage: coverage/ directory
Coverage Requirements
최소 커버리지: 70% 이상 유지 필수
새 기능 추가 시 해당 코드에 대한 테스트 필수 작성
PR 머지 전 pnpm test 통과 필수
Test Policy
Test Type
Required
When to Write
Unit Test
Always
모든 새 함수, 유틸리티, 비즈니스 로직에 필수 작성
Integration Test
As Needed
API 엔드포인트, DB 연동, 외부 서비스 연동 시
E2E Test
As Needed
중요 사용자 플로우, 결제 등 크리티컬 기능 시
Unit Test Guidelines
모든 새 코드에는 Unit Test 작성 필수
테스트 파일은 소스 파일과 같은 디렉토리에 위치 (예: auth.ts → auth.test.ts)