{"id":28996779,"url":"https://github.com/hunkim/before-sign","last_synced_at":"2025-07-26T18:13:33.419Z","repository":{"id":295467972,"uuid":"990199875","full_name":"hunkim/before-sign","owner":"hunkim","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-25T18:32:58.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-25T18:46:27.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://before-sign.vercel.app","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/hunkim.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}},"created_at":"2025-05-25T17:46:05.000Z","updated_at":"2025-05-25T18:33:02.000Z","dependencies_parsed_at":"2025-05-25T18:56:30.863Z","dependency_job_id":null,"html_url":"https://github.com/hunkim/before-sign","commit_stats":null,"previous_names":["hunkim/before-sign"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hunkim/before-sign","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fbefore-sign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fbefore-sign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fbefore-sign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fbefore-sign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hunkim","download_url":"https://codeload.github.com/hunkim/before-sign/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fbefore-sign/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261808072,"owners_count":23212694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-06-25T05:11:30.125Z","updated_at":"2025-06-25T05:11:30.797Z","avatar_url":"https://github.com/hunkim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Before.sign - AI-Powered Contract Risk Analysis\n\nA professional contract analysis tool that uses Upstage Document Parse and Solar LLM to identify risks and provide detailed recommendations.\n\n## Features\n\n- **Smart Document Parsing**: Upload PDF, DOC, and DOCX files using Upstage Document Parse\n- **AI Risk Identification**: Uses Solar LLM to identify specific problematic clauses\n- **Detailed Analysis**: Provides business impact assessment, legal risks, and recommendations\n- **Professional UI**: Modern, responsive interface built with Next.js and Tailwind CSS\n\n## Setup Instructions\n\n### 1. Environment Variables\n\nCreate a `.env.local` file in the root directory:\n\n```bash\nUPSTAGE_API_KEY=your_upstage_api_key_here\nUPSTAGE_MODEL_NAME=solar-pro2-preview\n```\n\nGet your API key from: https://console.upstage.ai/services/solar\n\n**Model Configuration:**\n- `UPSTAGE_MODEL_NAME` (optional): Specify which Upstage model to use\n- Default: `solar-pro2-preview` if not specified\n- Available models: `solar-pro`, `solar-pro2-preview`, etc.\n\n### 2. Install Dependencies\n\n```bash\nnpm install\n# or\nyarn install\n# or\npnpm install\n```\n\n### 3. Run the Development Server\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\n## Architecture\n\n### Document Processing Flow\n\n1. **File Upload**: Users upload contracts via drag-and-drop or file selection\n2. **Document Parse**: Upstage Document Parse extracts text from PDF/DOC/DOCX files\n3. **Risk Identification**: Solar LLM analyzes the text to identify potential risks\n4. **Detailed Analysis**: For each risk, Solar LLM provides:\n   - Detailed explanation of the issue\n   - Business and legal impact assessment\n   - Prioritized recommendations\n   - Suggested alternative text\n\n### API Endpoints\n\n- `POST /api/upload` - Handles file uploads and document parsing\n- `POST /api/analysis` - Performs contract risk analysis\n\n### Technology Stack\n\n- **Frontend**: Next.js 15, React 19, TypeScript\n- **Styling**: Tailwind CSS, shadcn/ui components\n- **Document Processing**: Upstage Document Parse API\n- **AI Analysis**: Upstage Solar LLM API\n- **Icons**: Lucide React\n\n## Professional Features\n\n### Enhanced Risk Analysis\n\nEach identified risk includes:\n\n- **Original Text**: Exact problematic clause from the contract\n- **Severity Level**: High/Medium/Low risk classification\n- **Business Impact**: Financial, operational, and reputational implications\n- **Legal Risks**: Specific legal exposures that could materialize\n- **Recommendations**: Prioritized actions with effort estimates\n- **Suggested Text**: Alternative clauses that would be more favorable\n\n### User Experience\n\n- Real-time upload progress\n- Professional analysis interface\n- Comprehensive risk visualization\n- Export-ready recommendations\n- Mobile-responsive design\n\n## Usage\n\n1. Visit the application homepage\n2. Upload a contract file (PDF, DOC, or DOCX)\n3. Wait for AI analysis to complete (1-2 minutes)\n4. Review detailed risk analysis and recommendations\n5. Use the suggestions to negotiate better contract terms\n\n## Security\n\n- API keys are securely stored in environment variables\n- File uploads are processed server-side\n- No contract data is stored permanently\n- HTTPS encryption for all communications\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Support\n\nFor questions or support, please contact the development team or refer to the Upstage documentation at https://developers.upstage.ai/ ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunkim%2Fbefore-sign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhunkim%2Fbefore-sign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunkim%2Fbefore-sign/lists"}