{"id":31965489,"url":"https://github.com/darkcode01/warehouse-api","last_synced_at":"2025-10-14T17:55:37.214Z","repository":{"id":315436625,"uuid":"1059228295","full_name":"DarkCode01/warehouse-api","owner":"DarkCode01","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-18T14:24:32.000Z","size":309,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-18T17:05:12.958Z","etag":null,"topics":[],"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/DarkCode01.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-09-18T07:03:03.000Z","updated_at":"2025-09-18T14:24:36.000Z","dependencies_parsed_at":"2025-09-18T17:19:00.059Z","dependency_job_id":null,"html_url":"https://github.com/DarkCode01/warehouse-api","commit_stats":null,"previous_names":["darkcode01/warehouse-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/DarkCode01/warehouse-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkCode01%2Fwarehouse-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkCode01%2Fwarehouse-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkCode01%2Fwarehouse-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkCode01%2Fwarehouse-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DarkCode01","download_url":"https://codeload.github.com/DarkCode01/warehouse-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkCode01%2Fwarehouse-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020030,"owners_count":26086807,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","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":[],"created_at":"2025-10-14T17:54:51.040Z","updated_at":"2025-10-14T17:55:37.209Z","avatar_url":"https://github.com/DarkCode01.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://cdn.prod.website-files.com/6854b7f27d4933db78c34f9c/68715df980a73ac9d30e9586_Rivero%20Logo-15%20(1).png\" width=\"120\" alt=\"Nest Logo\" /\u003e\n\u003c/p\u003e\n\n  \u003cp align=\"center\"\u003eApp that helps warehouse teams decide which locations (“bins”) to audit\nfirst when checking inventory.\u003c/p\u003e\n\n\n## Project setup\n\n```bash\n$ yarn install\n```\n\n## Database migrations and seeders\n\n```bash\n# add DATABASE_URL to .env \n\n# run migrations\n$ npx prisma migrate dev\n\n# run seeders\nyarn run db:seed\n```\n\n## Run Api\n\n```bash\n# watch mode\n$ yarn run start:dev\n\n# production mode\n$ yarn run start:prod\n```\n\n## [Api Documentation](http://localhost:3000/api#/)\n![Alt Text](/assets/doc.png \"Rivero 2.0 Database swagger\")\n\n\n## Database Schema\n![Alt Text](/assets/database.png \"Rivero 2.0 Database Schema\")\n\n### Core Structure Tables\n\n* `warehouses` - Main warehouse facilities that contain all other entities\n* `aisles` - Corridors within warehouses (like grocery store aisles)\n* `racks` - Shelving units within each aisle\n* `bins` - Individual storage locations on racks (the smallest storage unit)\n\n### Activity Tracking Tables\n\n* `bin_activities` - Logs all warehouse activities (putaway, pick, move, adjustment, audit) for each bin\n\n### Audit Management Tables\n\n* `audit_plans` - Collections of bins that need to be audited (like \"High Risk Bins Plan #001\")\n* `audit_tasks` - Individual bins assigned to be audited within a plan\n* `audit_results` - Records of completed audits showing expected vs actual counts and pass/fail status\n\n## Risk Score Calculation Table\n\n### **Scoring Formula**\n```\nRisk Score = MIN(100, Audit Factor (50%) + Activity Factor (30%) + Adjustment Factor (20%))\n```\n\n### **Unit Values**\n\n| Factor | Unit | Points per Unit | Max Points | Formula |\n|:------:|:----:|:---------------:|:----------:|:-------:|\n| **Audit** | Days without audit | **0.8** | 50 | `days × 0.8` |\n| **Activity** | Activities/month | **2.0** | 30 | `activities × 2` |\n| **Adjustment** | Adjustments/month | **8.0** | 20 | `adjustments × 8` |\n\n---\n\n### **Risk Classifications**\n\n| Score Range | Level | Color | Action |\n|:-----------:|:-----:|:-----:|:------:|\n| 0-30 | Low | 🟢 | Low |\n| 31-70 | Medium | 🟡 | Medium |\n| 71-100 | Critical | 🔴 | Hight |\n\n---\n\n###  **Quick Reference Examples**\n\n| Days | Activities | Adjustments | Score | Level |\n|:----:|:----------:|:-----------:|:-----:|:-----:|\n| 10 | 5 | 0 | **18** | 🟢 Low |\n| 25 | 8 | 1 | **44** | 🟡 Medium |\n| 45 | 12 | 2 | **76** | 🔴 Hight |\n\n---\n\n## **Key Thresholds**\n\n- **Audit Factor**: 63+ days = Max points (50)\n- **Activity Factor**: 15+ activities = Max points (30)  \n- **Adjustment Factor**: 3+ adjustments = Max points (20)\n- **Never audited**: Treated as 90 days\n\n## Stay in touch\n\n- Author - [Jose Segura](https://josesp.me)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkcode01%2Fwarehouse-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkcode01%2Fwarehouse-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkcode01%2Fwarehouse-api/lists"}