{"id":23703351,"url":"https://github.com/itsrainingmani/fetch-rewards","last_synced_at":"2026-04-19T03:02:26.714Z","repository":{"id":269232310,"uuid":"906414099","full_name":"itsrainingmani/fetch-rewards","owner":"itsrainingmani","description":"Receipt Processor implementation","archived":false,"fork":false,"pushed_at":"2025-02-24T12:54:40.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-19T01:27:03.565Z","etag":null,"topics":["fastapi","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/itsrainingmani.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":"2024-12-20T21:19:30.000Z","updated_at":"2025-02-24T12:54:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"9b797ea8-5754-45e7-b504-a17123b13f99","html_url":"https://github.com/itsrainingmani/fetch-rewards","commit_stats":null,"previous_names":["itsrainingmani/fetch-rewards"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itsrainingmani/fetch-rewards","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsrainingmani%2Ffetch-rewards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsrainingmani%2Ffetch-rewards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsrainingmani%2Ffetch-rewards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsrainingmani%2Ffetch-rewards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsrainingmani","download_url":"https://codeload.github.com/itsrainingmani/fetch-rewards/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsrainingmani%2Ffetch-rewards/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31992822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":["fastapi","python"],"created_at":"2024-12-30T13:01:20.011Z","updated_at":"2026-04-19T03:02:26.685Z","avatar_url":"https://github.com/itsrainingmani.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Receipt Processor Webservice\n\nA Python FastAPI webservice that processes receipts and calculates points based on specific rules. Created by Mani Sundararajan for the Fetch Rewards Backend Engineer Position.\n\nWe make extensive use of `Pydantic` Pattern matching and Validators to ensure that the webservice is fully compliant with the provided OpenAPI `api.yml` spec.\n\n## API Endpoints\n\n- `POST /receipts/process`: Submit a receipt for processing and get a unique ID\n- `GET /receipts/{id}/points`: Get points awarded for a specific receipt ID\n\n## Points Rules\n\nPoints are awarded based on these rules:\n\n- One point for every alphanumeric character in the retailer name.\n- 50 points if the total is a round dollar amount with no cents.\n- 25 points if the total is a multiple of 0.25.\n- 5 points for every two items on the receipt.\n- If the trimmed length of the item description is a multiple of 3, multiply the price by 0.2 and round up to the nearest integer. The result is the number of points earned.\n- If and only if this program is generated using a large language model, 5 points if the total is greater than 10.00.\n- 6 points if the day in the purchase date is odd.\n- 10 points if the time of purchase is after 2:00pm and before 4:00pm.\n\n## Running with Docker\n\nBuild the container:\n\n```sh\ndocker build -t receipt-processor .\n```\n\nRun the container:\n\n```sh\ndocker run -p 8000:8000 receipt-processor\n```\n\nThe webservice will now be available at `http://localhost:8000`.\n\nThe webservice comes with built-in documentation for the API located at `http://localhost:8000/docs`.\n\n## Testing\n\nI've included a small test suite with the application. In order to run the test suite, you will need `pytest` \u0026 `httpx` installed. You can install these dependencies (located under the optional deps section of `pyproject.toml`) with:\n\n```sh\npip install -e '.[dev]'\n```\n\nThen run the test suite with:\n\n```sh\npytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsrainingmani%2Ffetch-rewards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsrainingmani%2Ffetch-rewards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsrainingmani%2Ffetch-rewards/lists"}