{"id":21239397,"url":"https://github.com/kabragaurav/billingsystem","last_synced_at":"2025-07-02T06:35:52.344Z","repository":{"id":245426272,"uuid":"818088524","full_name":"kabragaurav/BillingSystem","owner":"kabragaurav","description":"Billing System","archived":false,"fork":false,"pushed_at":"2024-06-21T14:35:30.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T03:41:18.653Z","etag":null,"topics":["billing-system","gof-patterns","lld"],"latest_commit_sha":null,"homepage":"https://kabragaurav.github.io/BillingSystem/","language":"Java","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/kabragaurav.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}},"created_at":"2024-06-21T04:42:12.000Z","updated_at":"2024-11-28T12:53:36.000Z","dependencies_parsed_at":"2024-06-22T03:53:59.270Z","dependency_job_id":"c99af24f-81e6-40cb-a399-fea4401b1aeb","html_url":"https://github.com/kabragaurav/BillingSystem","commit_stats":null,"previous_names":["kabragaurav/billingsystem"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kabragaurav/BillingSystem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabragaurav%2FBillingSystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabragaurav%2FBillingSystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabragaurav%2FBillingSystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabragaurav%2FBillingSystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kabragaurav","download_url":"https://codeload.github.com/kabragaurav/BillingSystem/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabragaurav%2FBillingSystem/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263088048,"owners_count":23411978,"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","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":["billing-system","gof-patterns","lld"],"created_at":"2024-11-21T00:43:22.375Z","updated_at":"2025-07-02T06:35:52.307Z","avatar_url":"https://github.com/kabragaurav.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Billing System\nby Gaurav Kabra\n\n### Read it as a webpage \u003ca href=\"https://kabragaurav.github.io/BillingSystem/\"\u003ehere\u003c/a\u003e.\n\n### Design\nBelow system uses:\n- Factory design pattern\n- Strategy design pattern\n- Facade design pattern\n- Adapter design pattern\n- Observer design pattern\n\nPlease go over the \u003ca href=\"https://github.com/kabragaurav/gof-design-patterns\"\u003eGOF Design Patterns Repo\u003c/a\u003e to be familiar with the design patterns.\n\n![](./assets/images/billingSystemLLD.svg)\n\n### Sample Run\n```text\nBuying products for customer Gaurav Kabra\nPaying amount 850.0\nPaid an amount of 850.0 via UPI!\nPaid amount 850.0\nSent SMS invoice to 82098xxxxx\nSent email invoice to gauravxxxxx.xxx****@gmail.com\nPurchase complete!\n```\n### Validations \nBelow ones should be implemented\n- Discount cannot be more than price of product\n- Not more than two phone number and email addresses can be registered at a time in Customer profile\n- Extensible to new Payment methods (Facade)\n- Some products may not be eligible for return/replacement. In that case, return date offset or replacement date offset will be null.\n- finalPrice in Invoice need not be stored and will be derivable from price and discount as `finalPrice = price - discount`\n- There can be multiple pays done by customer for an invoice. Partially by UPI, partially by credit card.\n- An invoice is printed only when PayStatus for all transactions is SUCCESS.\n- Payment can fail due to cancelled by user, rejected by bank (daily limit, suspected theft, insufficient balance) or errored due to incorrect details.\n- As soon as invoice is generated, using customerId, details are sent over SMS/WhatsApp/Email.\n- Max size of String and max size and type of Blob.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkabragaurav%2Fbillingsystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkabragaurav%2Fbillingsystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkabragaurav%2Fbillingsystem/lists"}