{"id":50976870,"url":"https://github.com/sandbox-as-a-service/fraud-detection","last_synced_at":"2026-06-19T09:02:38.002Z","repository":{"id":304357865,"uuid":"1018555062","full_name":"sandbox-as-a-service/fraud-detection","owner":"sandbox-as-a-service","description":"Fraud detection service.","archived":false,"fork":false,"pushed_at":"2025-09-09T10:49:47.000Z","size":237,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-09T13:45:27.239Z","etag":null,"topics":["vercel"],"latest_commit_sha":null,"homepage":"https://fraud-service.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/sandbox-as-a-service.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":"2025-07-12T14:10:32.000Z","updated_at":"2025-09-09T10:49:49.000Z","dependencies_parsed_at":"2025-08-27T10:23:36.737Z","dependency_job_id":"3ed4468f-22c6-4cf5-9126-38adbf7a4e50","html_url":"https://github.com/sandbox-as-a-service/fraud-detection","commit_stats":null,"previous_names":["sandbox-as-a-service/fraud-service"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sandbox-as-a-service/fraud-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandbox-as-a-service%2Ffraud-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandbox-as-a-service%2Ffraud-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandbox-as-a-service%2Ffraud-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandbox-as-a-service%2Ffraud-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandbox-as-a-service","download_url":"https://codeload.github.com/sandbox-as-a-service/fraud-detection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandbox-as-a-service%2Ffraud-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34523991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"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":["vercel"],"created_at":"2026-06-19T09:02:37.119Z","updated_at":"2026-06-19T09:02:37.993Z","avatar_url":"https://github.com/sandbox-as-a-service.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fraud Detection API\n\nA serverless fraud detection API built with TypeScript and deployed on Vercel. This service validates IP addresses and provides fraud detection capabilities.\n\n## Project Structure\n\n```\n├── api/\n│   └── index.ts          # Main Vercel serverless function\n├── col/                  # Bruno API test collection\n│   ├── bruno.json        # Bruno collection configuration\n│   ├── success.bru       # Test case for successful requests\n│   └── invalid-payload.bru # Test case for invalid payloads\n├── package.json          # Dependencies and package manager config\n├── tsconfig.json         # TypeScript configuration\n├── pnpm-lock.yaml        # pnpm lockfile\n└── README.md            # This file\n```\n\n## Setup\n\nThis project uses **pnpm** as the package manager. Use **corepack** to install it (do not use `npm install`).\n\n### Prerequisites\n\n- Node.js (configured for Node 22 via tsconfig)\n- Corepack (comes with Node.js 16+)\n\n### Installation\n\n1. Enable corepack to use pnpm:\n   ```bash\n   corepack enable\n   ```\n\n2. Install dependencies:\n   ```bash\n   pnpm install\n   ```\n\n   **Note:** This project depends on private packages from `@sandbox-as-a-service/types`. You'll need proper NPM_TOKEN access to install all dependencies.\n\n## API Usage\n\n### Endpoint\n\n- **URL:** `/api`\n- **Method:** `POST`\n- **Content-Type:** `application/json`\n\n### Request Format\n\n```json\n{\n  \"ip\": \"192.168.1.1\"\n}\n```\n\n### Response Examples\n\n**Success (200):**\n```json\n{\n  \"message\": \"Valid IP received\",\n  \"ip\": \"192.168.1.1\"\n}\n```\n\n**Validation Error (400):**\n```json\n{\n  \"error\": \"Invalid payload\",\n  \"details\": [/* Zod validation errors */]\n}\n```\n\n**Method Not Allowed (405):**\n```json\n{\n  \"error\": \"Method Not Allowed\"\n}\n```\n\n**Unsupported Media Type (415):**\n```json\n{\n  \"error\": \"Unsupported Media Type\"\n}\n```\n\n## Testing\n\nThis project includes a Bruno API test collection in the `col/` directory.\n\n### Test Cases\n\n- **success.bru**: Tests successful IP validation\n- **invalid-payload.bru**: Tests handling of invalid payloads\n\n### Running Tests\n\nUse Bruno CLI or Bruno GUI to execute the test collection:\n\n1. Install Bruno CLI:\n   ```bash\n   pnpm add -g @usebruno/cli\n   ```\n\n2. Run tests:\n   ```bash\n   bru run col/\n   ```\n\n## Development\n\n### Local Development\n\nFor local development with Vercel:\n\n```bash\n# Install Vercel CLI\npnpm add -g vercel\n\n# Run locally\nvercel dev\n```\n\n### TypeScript\n\nThe project uses TypeScript with strict configuration extending `@tsconfig/node22`. Type checking:\n\n```bash\npnpm tsc --noEmit\n```\n\n## Technologies Used\n\n- **TypeScript** - Type-safe JavaScript\n- **Zod** - Schema validation\n- **Vercel** - Serverless deployment platform\n- **Bruno** - API testing\n- **pnpm** - Fast, disk space efficient package manager\n\n## Deployment\n\nThis project is configured for deployment on Vercel. The `api/index.ts` file serves as the main serverless function endpoint.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandbox-as-a-service%2Ffraud-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandbox-as-a-service%2Ffraud-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandbox-as-a-service%2Ffraud-detection/lists"}