{"id":15129871,"url":"https://github.com/dianper/vat-calculator-api","last_synced_at":"2026-01-18T17:33:21.650Z","repository":{"id":256053433,"uuid":"854048393","full_name":"dianper/vat-calculator-api","owner":"dianper","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-17T20:35:44.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T19:20:37.418Z","etag":null,"topics":["csharp","docker-compose","pipeline","vat-calculator"],"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/dianper.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-09-08T09:11:26.000Z","updated_at":"2025-02-17T20:35:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"f09736d6-b342-408c-935c-a8da1c7a9677","html_url":"https://github.com/dianper/vat-calculator-api","commit_stats":null,"previous_names":["dianper/vat-calculator-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dianper/vat-calculator-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dianper%2Fvat-calculator-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dianper%2Fvat-calculator-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dianper%2Fvat-calculator-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dianper%2Fvat-calculator-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dianper","download_url":"https://codeload.github.com/dianper/vat-calculator-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dianper%2Fvat-calculator-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28544883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T14:59:57.589Z","status":"ssl_error","status_checked_at":"2026-01-18T14:59:46.540Z","response_time":98,"last_error":"SSL_read: 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":["csharp","docker-compose","pipeline","vat-calculator"],"created_at":"2024-09-26T02:22:03.553Z","updated_at":"2026-01-18T17:33:21.635Z","avatar_url":"https://github.com/dianper.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build Status](https://github.com/dianper/vat-calculator-api/actions/workflows/pipeline.yml/badge.svg)\n\n# Austrian VAT Calculator API\n\nThe Austrian VAT Calculator API is a RESTful service designed to calculate VAT (Value Added Tax) for Austrian purchases based on net, gross, or VAT amounts. The API supports multiple VAT rates commonly used in Austria (10%, 13%, and 20%) and follows best practices such as API versioning, testing, and dependency injection.\n\n## Summary of Austrian VAT Rates\n\n| **VAT Rate** | **Goods/Services**      | **Examples**                                                |\n|--------------|-------------------------|-------------------------------------------------------------|\n| **20%**      | Standard rate            | Most goods and services (consumer products, cars, legal services) |\n| **13%**      | Reduced rate             | Tourism-related services, cultural activities, agricultural goods |\n| **10%**      | Reduced rate             | Essential goods (food, medicine, public transport, books, rent)  |\n\n## Key Features\n- **.NET 8**: Built with the latest .NET 8 framework.\n- **API Versioning**: Future-proof API structure with URL-based or header-based versioning to support multiple versions.\n- **Swagger Documentation**: Integrated Swagger UI for API exploration and testing directly in your browser.\n- **Docker Support**: Dockerfile included for containerization and deployment in any environment.\n- **Unit and Integration Tests**: Comprehensive test coverage to ensure the reliability of the application.\n- **FluentValidator**: Used for validating input requests, ensuring data integrity and preventing invalid operations.\n- **Central Package Manager**: Leverages .NET’s Central Package Management to streamline NuGet dependency management.\n- **GitHub Actions**: Automated CI pipeline for building and testing the application.\n\n## Installation\n\n### Prerequisites\n- .NET 8 SDK\n- Docker (optional)\n\n### Setup\n1. Clone the repository.\n```bash\ngit clone https://github.com/dianper/vat-calculator-api.git\ncd vat-calculator-api\n```\n2. Restore NuGet packages.\n```bash\ndotnet restore\n```\n3. Build the project.\n```bash\ndotnet build\n```\n\n### How to Run\nTo run the application locally, follow these steps:\n\n1. Run the API.\n```bash\ndotnet run --project src/Presentation.API/Presentation.API.csproj\n```\n2. Access Swagger UI: Open your browser and go to http://localhost:5000/swagger/index.html. This page provides a UI to interact with the API and view its documentation.\n3. API Versioning: The API supports versioning in the URL. Example: http://localhost:5000/api/v1/vat/calculate\n\nTo run the application in a Docker container, follow these steps:\n```bash\ndocker-compose up --build\n```\n1. Access Swagger UI: Open your browser and go to http://localhost:5000/swagger/index.html.\n\n## API Endpoints\n\n### VAT Calculation\nThe API provides endpoints to calculate VAT based on either the net amount, gross amount, or VAT amount.\n\n- **POST** /api/v1/vat\n- **Request Body**: `VATRequest`\n```json\n{\n  \"net\": 100.0,\n  \"vatRate\": 0.20\n}\n```\n- **Response**: `VATResponse`\n```json\n{\n  \"net\": 100.0,\n  \"gross\": 120.0,\n  \"vat\": 20.0,\n  \"isValid\": true,\n  \"message\": \"VAT calculation successful.\"\n}\n```\n\n### Error Handling\nThe API returns detailed error messages in case of:\n\n- Missing or invalid input (non-numeric values, zero amounts)\n- Invalid VAT rate (other than 10%, 13%, or 20%)\n- More than one input type provided (e.g., net and gross)\n\n### Testing\nThis project includes both unit and integration tests.\n\n#### Running Unit Tests\n```bash\ndotnet test --filter UnitTests\n```\n\n#### Running Integration Tests\n```bash\ndotnet test --filter IntegrationTests\n```\n\nThese tests ensure that the VAT calculations and API behavior function as expected.\n\n## References\nThis API is inspired by the VAT calculations available on [Calkoo VAT Calculator](https://www.calkoo.com/en/vat-calculator). It has been adapted to meet Austrian VAT requirements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdianper%2Fvat-calculator-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdianper%2Fvat-calculator-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdianper%2Fvat-calculator-api/lists"}