{"id":47901389,"url":"https://github.com/sgd122/contract-guardian","last_synced_at":"2026-04-04T04:07:01.889Z","repository":{"id":337986294,"uuid":"1155974824","full_name":"sgd122/contract-guardian","owner":"sgd122","description":"Contract Guardian: AI-powered contract review service for   freelancers and small businesses.","archived":false,"fork":false,"pushed_at":"2026-02-21T13:23:26.000Z","size":6216,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-21T19:56:23.996Z","etag":null,"topics":["ai-powered","anthropic","claude-ai","contract-analysis","monorepo","nextjs","react","supabase","tailwindcss","toss-payments","turborepo","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgd122.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-12T05:39:34.000Z","updated_at":"2026-02-21T13:23:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sgd122/contract-guardian","commit_stats":null,"previous_names":["sgd122/contract-guardian"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sgd122/contract-guardian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgd122%2Fcontract-guardian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgd122%2Fcontract-guardian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgd122%2Fcontract-guardian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgd122%2Fcontract-guardian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgd122","download_url":"https://codeload.github.com/sgd122/contract-guardian/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgd122%2Fcontract-guardian/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31387069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T01:22:39.193Z","status":"online","status_checked_at":"2026-04-04T02:00:07.569Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-powered","anthropic","claude-ai","contract-analysis","monorepo","nextjs","react","supabase","tailwindcss","toss-payments","turborepo","typescript"],"created_at":"2026-04-04T04:06:56.891Z","updated_at":"2026-04-04T04:07:01.884Z","avatar_url":"https://github.com/sgd122.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n```\n  ██████╗ ██████╗ ███╗   ██╗████████╗██████╗  █████╗  ██████╗████████╗\n ██╔════╝██╔═══██╗████╗  ██║╚══██╔══╝██╔══██╗██╔══██╗██╔════╝╚══██╔══╝\n ██║     ██║   ██║██╔██╗ ██║   ██║   ██████╔╝███████║██║        ██║\n ██║     ██║   ██║██║╚██╗██║   ██║   ██╔══██╗██╔══██║██║        ██║\n ╚██████╗╚██████╔╝██║ ╚████║   ██║   ██║  ██║██║  ██║╚██████╗   ██║\n  ╚═════╝ ╚═════╝ ╚═╝  ╚═══╝   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝ ╚═════╝   ╚═╝\n\n   ██████╗ ██╗   ██╗ █████╗ ██████╗ ██████╗ ██╗ █████╗ ███╗   ██╗\n  ██╔════╝ ██║   ██║██╔══██╗██╔══██╗██╔══██╗██║██╔══██╗████╗  ██║\n  ██║  ███╗██║   ██║███████║██████╔╝██║  ██║██║███████║██╔██╗ ██║\n  ██║   ██║██║   ██║██╔══██║██╔══██╗██║  ██║██║██╔══██║██║╚██╗██║\n  ╚██████╔╝╚██████╔╝██║  ██║██║  ██║██████╔╝██║██║  ██║██║ ╚████║\n   ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═════╝ ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝\n```\n\n# 계약서 지킴이\n\n### AI-Powered Contract Review for Freelancers\n\n**Upload \u0026bull; Analyze \u0026bull; Protect**\n\n[![Next.js](https://img.shields.io/badge/Next.js_16-black?style=for-the-badge\u0026logo=next.js\u0026logoColor=white)](https://nextjs.org/)\n[![React](https://img.shields.io/badge/React_19-61DAFB?style=for-the-badge\u0026logo=react\u0026logoColor=black)](https://react.dev/)\n[![Supabase](https://img.shields.io/badge/Supabase-3FCF8E?style=for-the-badge\u0026logo=supabase\u0026logoColor=white)](https://supabase.com/)\n[![Claude AI](https://img.shields.io/badge/Claude_AI-D97757?style=for-the-badge\u0026logo=anthropic\u0026logoColor=white)](https://anthropic.com/)\n[![TypeScript](https://img.shields.io/badge/TypeScript_5-3178C6?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n\n[![Turborepo](https://img.shields.io/badge/Turborepo-EF4444?style=flat-square\u0026logo=turborepo\u0026logoColor=white)](https://turbo.build/)\n[![pnpm](https://img.shields.io/badge/pnpm-F69220?style=flat-square\u0026logo=pnpm\u0026logoColor=white)](https://pnpm.io/)\n[![Docker](https://img.shields.io/badge/Docker-2496ED?style=flat-square\u0026logo=docker\u0026logoColor=white)](https://www.docker.com/)\n[![Expo](https://img.shields.io/badge/Expo_(Phase_2)-000020?style=flat-square\u0026logo=expo\u0026logoColor=white)](https://expo.dev/)\n\n\u003cbr /\u003e\n\n\u003e *프리랜서와 소규모 사업자를 위한 AI 계약서 분석 플랫폼.*\n\u003e *계약서를 업로드하면 Claude AI가 8개 항목을 분석하고, 위험도를 점수화하며, PDF 리포트를 생성합니다.*\n\n\u003cbr /\u003e\n\n\u003c/div\u003e\n\n---\n\n## Screenshots\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\" width=\"50%\"\u003e\n\u003cstrong\u003eLanding Page\u003c/strong\u003e\u003cbr/\u003e\n\u003cimg src=\"docs/screenshots/landing.png\" alt=\"Landing Page\" /\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"50%\"\u003e\n\u003cstrong\u003eHow It Works\u003c/strong\u003e\u003cbr/\u003e\n\u003cimg src=\"docs/screenshots/how-it-works.png\" alt=\"How It Works\" /\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\" width=\"50%\"\u003e\n\u003cstrong\u003ePricing\u003c/strong\u003e\u003cbr/\u003e\n\u003cimg src=\"docs/screenshots/pricing.png\" alt=\"Pricing\" /\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"50%\"\u003e\n\u003cstrong\u003eLogin\u003c/strong\u003e\u003cbr/\u003e\n\u003cimg src=\"docs/screenshots/dashboard.png\" alt=\"Login\" /\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## Overview\n\n프리랜서 계약에서 불리한 조항을 놓치고 있지 않으신가요? **계약서 지킴이**는 계약서를 업로드하면 Claude AI가 8개 핵심 조항을 분석하고 위험도를 점수화해주는 서비스입니다.\n\n```\n┌──────────────────────────────────────────────────────────────────┐\n│                                                                  │\n│   계약서 업로드  →  텍스트 추출  →  결제  →  AI 분석  →  PDF 리포트  │\n│   (PDF/JPEG/PNG)    (자동)       (Toss)   (Claude)    (다운로드)   │\n│                                                                  │\n└──────────────────────────────────────────────────────────────────┘\n```\n\n### Why Contract Guardian?\n\n- **8개 핵심 조항 분석** — 대금, 업무 범위, 지식재산권, 해지, 하자보증, 비밀유지, 손해배상, 분쟁 해결\n- **위험도 점수화** — 0~100 점수로 계약의 위험 수준을 직관적으로 표시\n- **PDF 리포트** — 분석 결과를 전문적인 PDF 보고서로 다운로드\n- **스캔 문서 지원** — PDF 텍스트 추출 + 이미지 모드로 스캔 문서도 분석 가능\n- **첫 1회 무료** — 부담 없이 서비스를 체험\n\n---\n\n## Analysis Categories\n\n| Category | Description | What AI Checks |\n|----------|------------|----------------|\n| Payment Terms | 대금/보수 지급 조건 | 지급 시기, 방법, 지연 이자 |\n| Scope of Work | 업무 범위 명확성 | 범위 정의, 변경 절차, 추가 비용 |\n| Intellectual Property | 지식재산권 귀속 | 저작권 귀속, 라이선스, 사용 범위 |\n| Termination | 계약 해지 조건 | 해지 사유, 통보 기간, 정산 방식 |\n| Warranty | 하자보증 책임 | 보증 기간, 범위, 면책 조건 |\n| Confidentiality | 비밀유지 조항 | 범위, 기간, 위반 시 제재 |\n| Liability | 손해배상 한도 | 배상 한도, 면책, 간접 손해 |\n| Dispute Resolution | 분쟁 해결 방법 | 관할 법원, 중재/조정, 준거법 |\n\n---\n\n## Architecture\n\n```\n┌───────────────────────────────────────────────────────────────────┐\n│                         Monorepo (pnpm + Turbo)                  │\n│                                                                   │\n│  ┌─────────────┐  ┌─────────────┐                                │\n│  │  apps/web   │  │ apps/mobile │  (Phase 2)                     │\n│  │  Next.js 16 │  │  Expo 52    │                                │\n│  └──────┬──────┘  └─────────────┘                                │\n│         │                                                         │\n│  ┌──────┴──────────────────────────────────────────┐             │\n│  │              Shared Packages                     │             │\n│  │  @cg/shared  │  @cg/api  │  @cg/ui  │  @cg/config │           │\n│  └──────────────────────────────────────────────────┘             │\n└───────────────────────────────────────────────────────────────────┘\n         │                    │                    │\n         ▼                    ▼                    ▼\n┌─────────────┐    ┌──────────────┐    ┌──────────────────┐\n│  Supabase   │    │  Claude AI   │    │  Toss Payments   │\n│  (DB/Auth/  │    │  (Contract   │    │  (Payment        │\n│   Storage)  │    │   Analysis)  │    │   Processing)    │\n└─────────────┘    └──────────────┘    └──────────────────┘\n```\n\n### FSD (Feature-Sliced Design)\n\n```\napp/            → Next.js pages (thin wrappers)\n  _pages/       → Page compositions\n    widgets/    → Composite UI blocks (header, footer, sections)\n      features/ → Business logic (upload, analysis, payment, auth)\n        entities/   → Domain models (analysis, payment)\n          shared/   → Utilities (supabase, auth, rate-limit)\n```\n\n### Analysis Status Flow\n\n```\npending_payment ──▶ paid ──▶ processing ──▶ completed\n                                    │\n                                    └──▶ failed\n```\n\n---\n\n## Pricing\n\n| Plan | Price | Condition |\n|------|-------|-----------|\n| Free | ₩0 | 첫 1회 무료 |\n| Standard | ₩3,900 | 5페이지 이하 |\n| Extended | ₩5,900 | 6페이지 이상 |\n\n---\n\n## Quick Start\n\n### Prerequisites\n\n- **Node.js** 18+\n- **pnpm** 9.15+\n- **Supabase CLI** (optional, for local DB)\n\n### 1. Clone \u0026 Install\n\n```bash\ngit clone https://github.com/sgd122/contract-guardian.git\ncd contract-guardian\npnpm install\n```\n\n### 2. Environment Setup\n\n```bash\ncp .env.example .env\n```\n\n| Variable | Description |\n|----------|------------|\n| `SUPABASE_URL` | Supabase project URL |\n| `SUPABASE_ANON_KEY` | Supabase public key |\n| `SUPABASE_SERVICE_ROLE_KEY` | Supabase service role key (server only) |\n| `ANTHROPIC_API_KEY` | Claude API key |\n| `TOSS_CLIENT_KEY` | Toss Payments client key |\n| `TOSS_SECRET_KEY` | Toss Payments secret key |\n\n### 3. Run\n\n```bash\n# Option A: Local development\nsupabase start        # Start local Supabase\npnpm db:generate      # Generate DB types\npnpm dev:web          # Start Next.js (localhost:3000)\n\n# Option B: Docker (full stack)\ncp .env.docker .env\ndocker compose up -d --build\n```\n\n| Service | URL |\n|---------|-----|\n| Web App | http://localhost:3000 |\n| Supabase API | http://localhost:54321 |\n| Supabase Studio | http://localhost:54323 |\n| Email Test (Inbucket) | http://localhost:54324 |\n\n---\n\n## Monorepo Structure\n\n```\ncontract-guardian/\n├── apps/\n│   ├── web/              # Next.js 16 web app (@cg/web)\n│   └── mobile/           # Expo 52 mobile app (@cg/mobile) — Phase 2\n├── packages/\n│   ├── shared/           # Types, constants, Zod schemas (@cg/shared)\n│   ├── api/              # API client, Supabase services, hooks (@cg/api)\n│   ├── ui/               # Radix + animated components (@cg/ui)\n│   └── config/           # Shared tsconfig, ESLint, Tailwind (@cg/config)\n├── docker/               # Kong config, DB init scripts\n├── supabase/             # Local dev config \u0026 migrations\n├── Dockerfile            # Multi-stage build (dev/builder/runner)\n├── docker-compose.yml    # Dev environment (with Supabase)\n└── docker-compose.prod.yml  # Production environment\n```\n\n---\n\n## API Routes\n\n| Method | Route | Description |\n|--------|-------|------------|\n| `POST` | `/api/upload` | File upload + text extraction |\n| `POST` | `/api/analyze/[id]` | Trigger Claude analysis |\n| `GET` | `/api/analyses/[id]` | Get analysis result |\n| `POST` | `/api/payment/confirm` | Confirm payment |\n| `POST` | `/api/payment/webhook` | Toss payment webhook |\n| `GET` | `/api/report/[id]` | Download PDF report |\n| `GET` | `/api/auth/callback` | OAuth callback |\n| `POST` | `/api/consent` | Privacy consent tracking |\n\n---\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|-----------|\n| Framework | [Next.js 16](https://nextjs.org/) (App Router) + [React 19](https://react.dev/) |\n| Mobile | [Expo 52](https://expo.dev/) + React Native (Phase 2) |\n| Database | [Supabase](https://supabase.com/) (PostgreSQL, Auth, Storage, RLS) |\n| AI | [Claude API](https://docs.anthropic.com/) (`claude-sonnet-4-20250514`) |\n| Payment | [Toss Payments](https://developers.tosspayments.com/) |\n| Build | [pnpm workspaces](https://pnpm.io/) + [Turborepo](https://turbo.build/) |\n| Styling | [Tailwind CSS 3.4](https://tailwindcss.com/) + [Radix UI](https://www.radix-ui.com/) |\n| Animation | [Motion](https://motion.dev/) (Framer Motion) |\n| Deploy | [Docker](https://www.docker.com/) (multi-stage) |\n| Monitoring | [Sentry](https://sentry.io/) (optional) |\n| Rate Limit | [Upstash Redis](https://upstash.com/) (with in-memory fallback) |\n\n---\n\n## Security\n\n| Feature | Description |\n|---------|------------|\n| Authentication | `requireAuth()` on all protected routes |\n| Row Level Security | Supabase RLS for data isolation |\n| Rate Limiting | Redis-based (Upstash) + in-memory fallback |\n| CORS | Origin restriction middleware |\n| Security Headers | CSP, HSTS, X-Frame-Options |\n| Webhook Verification | HMAC-SHA256 signature check |\n| PII Filtering | Allowlist-based before DB storage |\n| Audit Logging | File upload/download, payment, account events |\n| Consent Verification | Privacy policy check before file processing |\n| Auto Deletion | 90-day auto-delete via `pg_cron` |\n| Magic Bytes | Upload file type verification |\n\n---\n\n## Scripts\n\n```bash\n# Development\npnpm dev              # All dev servers (Turbo)\npnpm dev:web          # Web app only\npnpm dev:mobile       # Mobile app only\n\n# Build \u0026 Check\npnpm build            # Full build\npnpm typecheck        # Type check\npnpm lint             # ESLint\n\n# Database\npnpm db:generate      # Generate Supabase types\npnpm db:migrate       # Apply migrations\n\n# Docker\npnpm docker:dev:build # Build \u0026 start dev (with Supabase)\npnpm docker:dev:down  # Stop dev environment\npnpm docker:prod:build # Build production image\npnpm docker:clean     # Clean all (including volumes)\n```\n\n---\n\n## Pages\n\n| Route | Description | Auth |\n|-------|------------|------|\n| `/` | Landing page | - |\n| `/login` | Authentication | - |\n| `/dashboard` | Analysis history | Required |\n| `/analyze` | Upload \u0026 start analysis | Required |\n| `/analyze/[id]` | Analysis result detail | Required |\n| `/payment-history` | Payment records | Required |\n| `/settings` | Account settings | Required |\n| `/pricing` | Pricing plans | - |\n| `/about` | About the service | - |\n| `/help` | FAQ \u0026 Help | - |\n| `/terms` | Terms of Service | - |\n| `/privacy` | Privacy Policy | - |\n\n---\n\n## Contributing\n\nContributions are welcome! Feel free to open issues and pull requests.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n---\n\n## License\n\nPrivate - All rights reserved.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Built with Claude AI**\n\n*Protecting freelancers, one contract at a time.*\n\n[![Anthropic](https://img.shields.io/badge/Powered_by-Claude_AI-D97757?style=for-the-badge\u0026logo=anthropic\u0026logoColor=white)](https://anthropic.com/)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgd122%2Fcontract-guardian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgd122%2Fcontract-guardian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgd122%2Fcontract-guardian/lists"}