Commit Graph

15 Commits

Author SHA1 Message Date
Johngreen 0c705d00e2 fix: 프로덕션 DB 스키마 미적용 및 PrismaClient 싱글톤 수정
- deploy.sh에 prisma db push 단계 추가 (배포 시 스키마 자동 적용)
- Dockerfile에 Prisma schema 런타임 이미지 복사 추가
- PrismaClient 프로덕션 싱글톤 캐시 활성화 (커넥션 풀 소진 방지)
2026-03-08 23:26:29 +09:00
Johngreen de531bfe11 Protect admin pages, add store/subsidy actions
Enforce authentication/authorization for admin pages and add several management actions and UI improvements.

Key changes:
- Added auth checks and redirects on admin pages (contracts, stores, subsidies, vendors) to restrict access to SUPER_ADMIN/OPS_MANAGER.
- Hooked server actions to authenticated user IDs (release escrow, review/publish stores, review subsidies/vendors, open disputes, create subsidy cases, create match requests, submit/delete store drafts).
- Implemented store publish flow including policy version resolution and StoreActionButtons update to show approve/reject/publish based on reviewStatus.
- Added filtering UIs and query handling: admin lists (stores/subsidies/vendors) now support status filters; public stores list uses a new client StoreFilters component to build search params.
- New client-side improvements: invite form triggers router.refresh() after success; register page accepts/validates optional phone and persists it; store creation now uses createStoreDraftService and shows error banner on failure.
- Matching and subsidies pages now support contextual forms to create match requests and subsidy cases when a storeId is provided.
- Various UX tweaks: disabled inspection button, dispute form, list link styling, and revalidation calls after server actions.
- Added docs/BUG-REPORT-2026-03-08.md.

These changes centralize auth, connect actions to real user IDs, and improve admin and store workflows and filtering.
2026-03-08 23:15:21 +09:00
Johngreen 98406af090 fix: AUTH_TRUST_HOST 환경변수 추가 (리버스 프록시 신뢰) 2026-03-08 20:27:00 +09:00
Johngreen 7f59b94dcf Rename project from Re:Link to Startover
Rebrand repository from "Re:Link" to "Startover" across the codebase. Updates include package names and scopes (@relink/* -> @startover/*), import paths, Next.js transpile settings, vitest name, UI text and docs, Dockerfile and CI/workflow names, deploy scripts and repo paths, and example/production env values. Also add auth-related env vars, an apps/web .env symlink, and small formatting/typing cleanups in several TSX/TS files and tests to accommodate the rename.
2026-03-08 20:22:08 +09:00
Johngreen 557559c654 feat: HTTPS 설정 - Let's Encrypt + startover.co.kr 도메인 적용 2026-03-08 17:22:07 +09:00
Johngreen 4802e70387 fix: docker-compose.prod.yml에 카카오 인증 환경변수 추가 2026-03-08 13:27:53 +09:00
Johngreen 5dea44046d feat: Auth.js v5 인증 시스템 구현 - 카카오 소셜 + 이메일/비번 로그인
- Auth.js v5 (next-auth beta.30) + 커스텀 Prisma 어댑터 (BigInt PK 호환)
- 카카오 OAuth2 소셜 로그인 (PKCE 비활성화, placeholder 이메일 처리)
- 이메일/비밀번호 자격증명 로그인 (argon2 해시)
- JWT 세션 전략 + 커스텀 클레임 (publicId, primaryRole, userStatus)
- 역할 기반 미들웨어 (/admin 운영자 전용, /auth 비인증 전용)
- Prisma 스키마: Account, VerificationToken, InviteToken 모델 추가
- ConsentType enum 7개로 업데이트
- 로그인/회원가입/프로필완성/403 페이지 구현
- 운영자 초대 시스템 (admin/settings/invite)
2026-03-08 12:59:21 +09:00
Johngreen 636eaaca23 feat: 샘플 데이터를 실제 Prisma DB 연동으로 전환
- admin 페이지: contracts, stores, subsidies, vendors 실제 DB 조회
- ActionButtons 컴포넌트 분리 (클라이언트 컴포넌트)
- 사용자 페이지: contracts, matching, stores, subsidies, vendors DB 연동
- vendor 신청 폼 및 server actions 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 01:06:56 +09:00
Johngreen 713b4d7241 feat: Traefik에 webhook 프록시 추가 및 cron 폴링 제거
- Traefik file provider로 호스트 webhook(9000) 프록시
- /deploy 경로로 Gitea webhook 수신
- extra_hosts로 Linux host.docker.internal 지원
- 불필요한 Docker webhook 서비스 제거

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 00:45:40 +09:00
Johngreen 097d102dd9 feat: nginx를 Traefik v3.2로 교체
- Docker 라벨 기반 자동 라우팅으로 전환
- /admin/* → admin 서비스 (StripPrefix 미들웨어)
- /* → web 서비스 (catch-all)
- Let's Encrypt 설정 준비 (도메인 확보 시 활성화)
- 다른 서비스 추가 시 라벨만 붙이면 자동 등록

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:58:39 +09:00
Johngreen e95acfc6af fix: Dockerfile builder 단계에서 public 디렉토리 보장
- builder에서 mkdir -p로 public 디렉토리 생성 (앱에 없을 경우 대비)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:51:10 +09:00
Johngreen 3f7c0f8e79 fix: admin public 디렉토리 누락 및 Dockerfile COPY 안전 처리
- apps/admin/public/.gitkeep 추가
- Dockerfile: public 디렉토리 미존재 시에도 COPY 성공하도록 수정

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:45:22 +09:00
Johngreen 41fc108803 fix: Docker 빌드 오류 수정 - prisma generate 명령어 및 타입 명시
- Dockerfile: prisma generate 명령어를 npx prisma generate로 수정
- feature-flag.ts: map 콜백 파라미터에 명시적 타입 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:39:28 +09:00
Johngreen bd48cafcc9 ci: IDC 서버 자동배포 파이프라인 구축
- Dockerfile: Turborepo 멀티스테이지 빌드 (Next.js standalone)
- docker-compose.prod.yml: PostgreSQL/Redis/Nginx/Web/Admin 프로덕션 스택
- deploy/poll-deploy.sh: cron 기반 자동배포 (매분 Gitea 폴링)
- deploy/nginx/default.conf: 리버스 프록시 설정
- next.config.ts: output standalone 추가
- .env.production.example: 환경변수 템플릿

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:28:09 +09:00
Johngreen 16bd2cb92a feat: Re:Link MVP 초기 구현 - 도메인/서비스/프론트엔드 전체
- 모노레포 구조 (Turborepo + pnpm): @relink/domain, @relink/shared, @relink/infrastructure, @relink/database, @relink/web
- 도메인 레이어: 매장(store), 매칭(matching), 업체(vendor), 보조금(subsidy), 계약/에스크로(contract) TDD 완료 (158 단위 테스트)
- 서비스 레이어: 전 도메인 서비스 함수 + 통합 테스트 (58 테스트)
- 프론트엔드: Next.js 15 App Router, 13개 페이지 (사용자 6 + 관리자 7)
- 인프라: PostgreSQL 16 + PostGIS, Prisma ORM, Docker Compose, AuditLog + OutboxEvent 패턴
- .env 파일 포함 (로컬 개발 기본값만 포함, 실제 시크릿 없음)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:39:56 +09:00