{"id":20564603,"url":"https://github.com/hemmatiali/online-product-store","last_synced_at":"2025-09-25T23:30:25.074Z","repository":{"id":247389479,"uuid":"825706140","full_name":"Hemmatiali/Online-Product-Store","owner":"Hemmatiali","description":"A C# .NET 8 clean architecture, CQRS patterned online product store with REST APIs for product management and purchase, including unit tests. Built with C# and EF Core.","archived":false,"fork":false,"pushed_at":"2024-07-08T12:38:13.000Z","size":41,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-16T04:27:52.383Z","etag":null,"topics":["clean-architecture","clean-code","cqrs","csharp","unit-test"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hemmatiali.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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-07-08T10:49:39.000Z","updated_at":"2024-08-31T17:28:02.000Z","dependencies_parsed_at":"2024-07-08T14:05:44.811Z","dependency_job_id":"ed01317d-ed76-4a77-acfd-efaee705225b","html_url":"https://github.com/Hemmatiali/Online-Product-Store","commit_stats":null,"previous_names":["hemmatiali/online-product-store"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hemmatiali%2FOnline-Product-Store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hemmatiali%2FOnline-Product-Store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hemmatiali%2FOnline-Product-Store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hemmatiali%2FOnline-Product-Store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hemmatiali","download_url":"https://codeload.github.com/Hemmatiali/Online-Product-Store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234260989,"owners_count":18804470,"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":["clean-architecture","clean-code","cqrs","csharp","unit-test"],"created_at":"2024-11-16T04:28:03.475Z","updated_at":"2025-09-25T23:30:19.790Z","avatar_url":"https://github.com/Hemmatiali.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An OnlineProductStore, C#.NET 8 API with Clean architecture, CQRS pattern including unit tests.\n\n## Description\n\nA clean architecture, CQRS patterned online product store with REST APIs for product management and purchase, including unit tests. Built with C# and EF Core.\n\n## Table of Contents\n\n- [Project Structure](#project-structure)\n- [Technologies Used](#technologies-used)\n- [Code Challenge Requirements](#Code-Challenge-Requirements)\n- [Documentation and Comments](#documentation-and-comments)\n- [License](#license)\n\n## Project Structure\n```bash\nCodeChallengeProject/\n│\n├── CodeChallengeProject.src/\n    ├── CodeChallengeProject.core/\n        ├── CodeChallengeProject.Domain/\n        │ ├── Entities/\n        │ ├── Models/\n        │ └── Shared/\n        │ └── ValueObjects/\n        │\n        ├── CodeChallengeProject.Application/\n        │ ├── Features/\n        │ ├── Mapping/\n        │ └── ViewModels/\n        │\n    ├── CodeChallengeProject.infrastructure/\n        ├── CodeChallengeProject.Infrastructure/\n\n        ├── CodeChallengeProject.Persistence/\n        │ ├── Data/\n        │ ├── Repositories/\n          │ └── Contexts/\n          │ └── EntityConfigurations/\n          │ └── Repositories/\n        │\n    ├── CodeChallengeProject.presentation/\n        ├── CodeChallengeProject.WebApi/\n        │ ├── Controllers/\n        │ ├── Program.cs/\n        │\n    ├── CodeChallengeProject.tests/\n        ├── CodeChallenge.UnitTests/\n        │ ├── Features/\n        │\n└── OnlineProductStore.sln\n```\n\n## Technologies Used\n- C#\n- .NET 8\n- EF Core\n- CQRS\n- Clean Architecture\n- In-Memory Caching\n- Unit Testing (xUnit)\n\n## Code Challenge Requirements\nConsider a simple online store in which users can buy only one product in each order. This\nsystem has the following entities:\n### Entities:\n### Product\n- Id\n- Title\n- InventoryCount\n- Price\n- Discount (percentage)\n### User\n- Id\n- Name\n- Orders\n### Order\n- Id\n- Product\n- CreationDate\n- Buyer\n### Requirement\n### We need some \"Rest API\"s as follows:\n- Add a product with a predefined `InventoryCount`. `product`'s title must be validated to be less than\n40 characters. Also, `product`'s name must be unique.\n- Increase `InventoryCount` of a product and update the product.\n- Get a `product` by `id` with proper `price` considering current `discount` value.\n- \"Buy\" endpoint that changes the inventory count of a product and adds an order to user orders.\n- Write unit tests for two use cases of the application.\n### Sidenotes\n- You have to use `ef core` as your ORM (code first).\n- For the third API you have to apply a caching procedure (any simple caching solution like in memory, ...) to\nreduce database hits.\n- There is no need to use an auth system.\n- Both simplicity and cleanliness of your code matters.\n- Add some sample users without any orders\n\n## Documentation and Comments\nThe code is thoroughly documented with XML comments explaining the functionality of each component and method. Clear instructions are provided on how to build, run, and use the application.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](license.txt) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemmatiali%2Fonline-product-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhemmatiali%2Fonline-product-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemmatiali%2Fonline-product-store/lists"}