{"id":27173906,"url":"https://github.com/deividsantosr/purchase-calculator","last_synced_at":"2025-04-09T11:33:03.932Z","repository":{"id":286377517,"uuid":"961188983","full_name":"deividsantosr/purchase-calculator","owner":"deividsantosr","description":"Purchase calculator considering the selected state tax","archived":false,"fork":false,"pushed_at":"2025-04-06T03:58:37.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T04:28:00.991Z","etag":null,"topics":["cli","console-application","csharp"],"latest_commit_sha":null,"homepage":"","language":"C#","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/deividsantosr.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":"2025-04-06T00:21:50.000Z","updated_at":"2025-04-06T03:59:07.000Z","dependencies_parsed_at":"2025-04-06T04:28:07.444Z","dependency_job_id":"a46d4666-f0d1-4af9-af77-9919ae1ec684","html_url":"https://github.com/deividsantosr/purchase-calculator","commit_stats":null,"previous_names":["deividsantosr/purchase-calculator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deividsantosr%2Fpurchase-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deividsantosr%2Fpurchase-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deividsantosr%2Fpurchase-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deividsantosr%2Fpurchase-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deividsantosr","download_url":"https://codeload.github.com/deividsantosr/purchase-calculator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248031939,"owners_count":21036497,"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":["cli","console-application","csharp"],"created_at":"2025-04-09T11:33:03.376Z","updated_at":"2025-04-09T11:33:03.924Z","avatar_url":"https://github.com/deividsantosr.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Purchase Calculator\n\nA simple C# console application that calculates the total cost of a product based on the selected U.S. state and product type, applying tax rules according to the challenge specifications.\n\n## 🛠 Features\n\n- List of predefined U.S. states with individual tax rates\n- Product selection with predefined prices\n- Automatic calculation of total cost including tax\n- Clean and structured code using models, services, and interfaces\n\n## 🧪 How to Run\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/deividsantosr/purchase-calculator.git\n   cd purchase-calculator\n   ```\n\n2. Open the project with **Visual Studio** or run with .NET CLI:\n   ```bash\n   dotnet run\n   ```\n\n## 📁 Project Structure\n\n```\nPurchaseCalculator/\n├── Models/               # Domain models (Product, State)\n├── Services/             # Business logic\n│   └── Interfaces/       # Interfaces for service abstraction\n├── Program.cs            # Entry point of the application\n├── PurchaseCalculator.csproj\n└── .gitignore\n```\n\n## 💡 Example\n\nInput:\n\n```bash\n=== PURCHASE CALCULATOR ===\n\nSelect your state (type the number):\n1 - California (0.08)\n2 - Texas (0.08)\n3 - New York (0.08)\n4 - Florida (0.08)\n5 - Washington (0.05)\n6 - Oregon (0.05)\n7 - Idaho (0.05)\n8 - Utah (0.05)\n9 - Montana (0.05)\n10 - New Mexico (0.05)\n11 - Arizona (0.05)\n12 - Wyoming (0.05)\n13 - Kansas (0.05)\n14 - Arkansas (0.05)\n15 - Georgia (0.05)\n16 - Alabama (0.05)\n17 - Lousiana (0.05)\n18 - Alaska (0.00)\n19 - Colorado (0.00)\n20 - Delaware (0.00)\n21 - Nevada (0.00)\n22 - New Jersey (0.00)\n23 - North Carolina (0.00)\n24 - Ohio (0.00)\n25 - Washington D.C (0.00)\n\nState number: 3\n\nYou selected: New York (0.08)\n\nEnter product details (or press ENTER to finish):\nEnter product name: Computer\nEnter product price: $200\nEnter product name: Smartphone\nEnter product price: $50\nEnter product name: Keyboard\nEnter product price: $15\nEnter product name:\n```\n\nOutput:\n\n```bash\n=== PURCHASE SUMMARY ===\nComputer: $200.00\nSmartphone: $50.00\nKeyboard: $15.00\n\nSUBTOTAL: $265.00\nTAX: $21.20\nTOTAL: $286.20\n```\n\n\n## 📌 Requirements\n\n- [.NET 8 SDK](https://dotnet.microsoft.com/en-us/download)\n- Visual Studio 2022+ or any C#-compatible IDE","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeividsantosr%2Fpurchase-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeividsantosr%2Fpurchase-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeividsantosr%2Fpurchase-calculator/lists"}