{"id":50721551,"url":"https://github.com/givemethatsewon/as-is","last_synced_at":"2026-06-10T00:30:20.680Z","repository":{"id":355270174,"uuid":"1226579630","full_name":"givemethatsewon/as-is","owner":"givemethatsewon","description":"Local-first customs refund inventory matching tool for customs brokers","archived":false,"fork":false,"pushed_at":"2026-06-05T15:00:41.000Z","size":198,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-05T18:04:39.117Z","etag":null,"topics":["customs","customs-broker","docker","fastapi","inventory-management","report-generation","sqlite"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/givemethatsewon.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-05-01T15:24:31.000Z","updated_at":"2026-06-05T15:00:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/givemethatsewon/as-is","commit_stats":null,"previous_names":["givemethatsewon/as-is"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/givemethatsewon/as-is","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givemethatsewon%2Fas-is","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givemethatsewon%2Fas-is/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givemethatsewon%2Fas-is/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givemethatsewon%2Fas-is/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/givemethatsewon","download_url":"https://codeload.github.com/givemethatsewon/as-is/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givemethatsewon%2Fas-is/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34132030,"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-09T02:00:06.510Z","response_time":63,"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":["customs","customs-broker","docker","fastapi","inventory-management","report-generation","sqlite"],"created_at":"2026-06-10T00:30:16.232Z","updated_at":"2026-06-10T00:30:20.676Z","avatar_url":"https://github.com/givemethatsewon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# As-Is\n\n관세사를 위한 원상태수출 재고 매칭 데모입니다. 수입 신고 자료와 수출 예정 자료를 업로드하면 품번, 원산지, 수입 수리일 기준으로 사용 가능한 수입 재고를 찾고 FIFO 방식으로 수출 건에 배정합니다.\n\nThis is a local-first FastAPI application for customs refund workflow prototyping. It helps customs brokers and trade operations teams review import inventory, export requirements, matching evidence, and report downloads before preparing an actual refund claim.\n\n## What It Does\n\n- Imports CSV/XLSX import-lot data into a local SQLite database.\n- Imports CSV/XLSX export requirement data.\n- Shows a preview before confirmed rows are saved.\n- Matches exports to import lots by same part number, same origin, import date within 360 days, remaining quantity, and FIFO order.\n- Keeps HS-code mismatch as a warning instead of blocking the match.\n- Excludes invalidated upload batches from dashboard, inventory, matching, and report totals.\n- Downloads allocation evidence and inventory summaries as CSV/XLSX reports.\n\n## Who It Is For\n\nAs-Is is designed for:\n\n- customs brokers reviewing 원상태수출 refund evidence,\n- trade operations teams managing part-number based import/export inventory,\n- developers exploring compliance-oriented inventory matching workflows.\n\nIt is not a customs filing system and does not submit data to UNI-PASS or any government service.\n\n## Current Workflow\n\n```text\nUpload import lots\n  -\u003e Preview and confirm rows\n  -\u003e Upload export requirements\n  -\u003e Preview and confirm rows\n  -\u003e Run FIFO matching\n  -\u003e Review inventory and allocation evidence\n  -\u003e Download CSV/XLSX reports\n```\n\n## Matching Rules\n\nThe current matcher uses:\n\n- same part number,\n- same origin,\n- import accepted date before or on the export date,\n- import accepted date within 360 days of the export date,\n- remaining quantity greater than zero,\n- FIFO order by import accepted date, declaration number, line number, and row number.\n\nIf an export HS code differs from the matched import HS code, the allocation is still created with a warning. The warning is evidence for human review; it is not a final legal determination.\n\n## Data And Security Boundary\n\nBy default, data stays on the machine running the app:\n\n- The default database is `sqlite:///./as_is.db`.\n- The local demo binds to `127.0.0.1:8000`.\n- Docker Compose stores SQLite data in the `as_is_data` volume.\n\nDo not upload real customer data to a public demo instance. If you adapt this project for production use, add authentication, authorization, backup policy, audit logging, encryption-at-rest decisions, and a legal review of the matching policy.\n\n## Quick Start\n\n### macOS/Linux\n\n```bash\n./start.sh\n```\n\nOpen [http://127.0.0.1:8000](http://127.0.0.1:8000).\n\n### Windows\n\nDouble-click `start.bat`, then open [http://127.0.0.1:8000](http://127.0.0.1:8000).\n\nThe start scripts prefer `uv`. If `uv` is unavailable, they create a Python virtual environment and install the project with `pip`. Python 3.12 or newer is required.\n\n## Demo Data\n\nUse these files for a practical end-to-end demo:\n\n- `samples/practical_imports.csv`\n- `samples/practical_exports.csv`\n- `samples/practical_import_review_cases.csv`\n\nSuggested flow:\n\n1. Open `/upload`.\n2. Upload `samples/practical_imports.csv` as import data and confirm the preview.\n3. Upload `samples/practical_exports.csv` as export requirements and confirm the preview.\n4. Open `/exports` and run matching. Leave the date empty to process all pending export requirements.\n5. Open `/inventory` to review remaining import quantity.\n6. Open `/reports` to download allocation and inventory reports.\n\nTo reset local demo data, stop the server and delete `as_is.db`.\n\n## Development\n\n```bash\nuv venv --python 3.12\nuv sync --extra test\nuv run uvicorn app.main:app --reload\n```\n\nWithout `uv`:\n\n```bash\npython3.12 -m venv .venv\n. .venv/bin/activate\npython -m pip install --upgrade pip\npython -m pip install -e \".[test]\"\nuvicorn app.main:app --reload\n```\n\n## Tests\n\n```bash\nuv run pytest\n```\n\nor, inside an activated virtual environment:\n\n```bash\npytest\n```\n\n## Docker\n\n```bash\ndocker compose up -d --build\n```\n\nThe provided compose file expects an external Docker network named `proxy-net`, because it is intended for a reverse-proxy runtime host. For a standalone local Docker demo, either create that network first or adapt the compose file for your environment.\n\n## Reports\n\nThe app can download:\n\n- export allocation evidence as CSV,\n- a contest-style workbook with inventory and allocation sheets,\n- a full workbook with inventory, matching, summary, and part-number inventory views.\n\n## CI/CD\n\nGitHub Actions runs tests on pull requests. On `main` pushes or manual runs, the workflow builds and publishes a Docker image to GitHub Container Registry. SSH deployment requires the repository deployment secrets documented in `.github/workflows/ci-cd.yml`.\n\n## Roadmap\n\n- clearer import/export template documentation,\n- reviewer-focused audit trail for matching decisions,\n- packaged local desktop shell,\n- optional encrypted local database storage,\n- production-grade authentication and authorization for hosted use.\n\n## Contributing\n\nContributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) for local setup, tests, and pull request expectations.\n\n## Security\n\nPlease do not open public issues for sensitive reports. See [SECURITY.md](SECURITY.md) for the current reporting policy and project security boundary.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgivemethatsewon%2Fas-is","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgivemethatsewon%2Fas-is","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgivemethatsewon%2Fas-is/lists"}