{"id":38765751,"url":"https://github.com/wahlly/card-tracker","last_synced_at":"2026-01-17T12:00:56.348Z","repository":{"id":212263232,"uuid":"731007688","full_name":"wahlly/card-tracker","owner":"wahlly","description":"Card logistics solution","archived":false,"fork":false,"pushed_at":"2025-08-20T00:42:17.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-20T02:38:47.598Z","etag":null,"topics":["logistics","tracking-algorithm"],"latest_commit_sha":null,"homepage":"","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/wahlly.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":"2023-12-13T06:43:27.000Z","updated_at":"2025-08-20T00:42:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"ad398eae-7ec6-4833-8bea-94fa9d035260","html_url":"https://github.com/wahlly/card-tracker","commit_stats":null,"previous_names":["wahlly/card-tracker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wahlly/card-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wahlly%2Fcard-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wahlly%2Fcard-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wahlly%2Fcard-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wahlly%2Fcard-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wahlly","download_url":"https://codeload.github.com/wahlly/card-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wahlly%2Fcard-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["logistics","tracking-algorithm"],"created_at":"2026-01-17T12:00:30.306Z","updated_at":"2026-01-17T12:00:56.238Z","avatar_url":"https://github.com/wahlly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# card-tracker\n\n## Description\nAn internal service that combines data collected from partner companies in csv format and return the current status of the card when queried by a team mate\n\n## Requirements\n- docker\n- docker-compose\n\n## Running the app\n```bash\n      sudo docker-compose build \n```\n```bash\n      sudo docker-compose up\n```\n\nserver should be live on port 3000\n\n* Generating a new card\n```curl -X POST http://localhost:3000/generate_new_card -d '{\"userContact\": \"534534534\"}'```\n```json\n      {\n      \"success\": true,\n      \"message\": \"Card generated successfully\",\n      \"statusCode\": 200,\n      \"data\":{\n      \"_id\": \"657a64d028c43024d53a05e7\",\n      \"cardId\": \"ZYW0030\",\n      \"userContact\": \"534534654\"\n            }\n      }\n```\n\n* Get card status\n```curl -X GET http://localhost:3000/get_card_status?cardId=ZYW8890```\n```json\n      {\n      \"success\": true,\n      \"message\": \"Card status returned successfully\",\n      \"statusCode\": 200,\n      \"data\": {\n      \"status\": \"returned\",\n      \"cardId\": \"ZYW8890\"\n            }\n      }\n```\n```curl -X GET http://localhost:3000/get_card_status?userContact=0585949014```\n```json\n      {\n      \"success\": true,\n      \"message\": \"Card status returned successfully\",\n      \"statusCode\": 200,\n      \"data\": {\n      \"status\": \"awaiting-pickup\",\n      \"userContact\": \"0585949014\"\n            }\n      }\n```\n\n## Approach\nConsidering the top level flow of the card operations given;\n- card is generated\n- card is picked up by courier partner\n- card is delivered\n- if card could not be delivered, re-delivery is attempted maximum of two times, after which it is returned.\n\nThe sample datasets folder in csv format, used to communicate with the courier partner is stored under the `data` folder. iterated through the csv datasets and rearranged them in another list according to the top-level flow. iterated through the files, starting from `pickup` csv file, if it has been picked up, move on to check if it has been delivered, after which the status can be returned as delivered, else if it has not been delivered, then check if it has failed twice so the `returned` file can be checked for if the card has been returned. If at the end of the iteration, the card has no logs in any of the files, the initial status `awaiting_pickup` will be sent, which tells that, the card has been created but yet to be picked up by the courier partner. Below are the status definitions used and their meaning;\n- `awaiting_pickup` -\u003e  a newly created card yet to be picked up\n- `on_delivery` -\u003e card has been picked by the courier\n- `delivered` -\u003e card has been delivered\n- `failed_delivery` -\u003e card delivery failed, and is to be re-delivered\n- `returned` -\u003e card has been returned after 2 failed deliveries\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwahlly%2Fcard-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwahlly%2Fcard-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwahlly%2Fcard-tracker/lists"}