{"id":22282779,"url":"https://github.com/shlmt/webapi_shop","last_synced_at":"2026-05-14T12:35:30.212Z","repository":{"id":243047565,"uuid":"810873639","full_name":"shlmt/WebApi_Shop","owner":"shlmt","description":"🛒.NET Core REST API application.","archived":false,"fork":false,"pushed_at":"2025-01-06T18:11:09.000Z","size":4084,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T15:46:57.104Z","etag":null,"topics":["auto-mapper","entity-framework","html-css-javascript","integration-test","logging","net-core","rest-api","sql-server","swagger","unit-test","webapi"],"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/shlmt.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-05T14:07:14.000Z","updated_at":"2025-06-29T11:03:07.000Z","dependencies_parsed_at":"2024-12-03T16:36:11.529Z","dependency_job_id":"2b6e46ea-2bb5-4206-8ea5-33efd9c5435f","html_url":"https://github.com/shlmt/WebApi_Shop","commit_stats":null,"previous_names":["shlmt/webapi_shop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shlmt/WebApi_Shop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlmt%2FWebApi_Shop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlmt%2FWebApi_Shop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlmt%2FWebApi_Shop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlmt%2FWebApi_Shop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shlmt","download_url":"https://codeload.github.com/shlmt/WebApi_Shop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlmt%2FWebApi_Shop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33025260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["auto-mapper","entity-framework","html-css-javascript","integration-test","logging","net-core","rest-api","sql-server","swagger","unit-test","webapi"],"created_at":"2024-12-03T16:36:05.229Z","updated_at":"2026-05-14T12:35:30.145Z","avatar_url":"https://github.com/shlmt.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## .NET Core Project\n\nThis project is a .NET Core REST API application.\n\n### Description\n\nThis project is a REST API developed with .NET Core. The project was developed for an online shop that allows users to: Create an account, View inventory, Search and filter products, View the basket, Place an order.\n\n### Technologies\n\n* .NET Core\n* REST API\n* Entity Framework (Database First)\n* Swagger\n* AutoMapper\n* zxcvbn (password strength checker)\n* xUnit\n\n### Project Structure\n\nThe project consists of three layers, adhering to the principle of separation of concerns:\n\n1. **Presentation Layer (Controllers):** Handles incoming requests and maps them to business logic.\n2. **Business Logic Layer (Services):** Contains the core application logic.\n3. **Data Access Layer (Repositories):** Interacts with the database using Entity Framework.\n\nThese layers communicate with each other through Dependency Injection (DI).\n\n### Dependency Injection\n\nDI is used extensively throughout the project, providing several benefits:\n\n* Improved code maintainability\n* Enhanced testability\n* Better separation of concerns\n\n### Database\n\nThe project uses Entity Framework with the Database First approach. To run the project, you can use commands like `add-migration update database` and other EF Core CLI commands.\n\n### Scalability\n\nTo ensure scalability, all functions are implemented using asynchronous programming (`async` and `await`) for handling long-running operations efficiently.\n\n### Data Input\n\nData input is handled in a separate project. You can find more details and access it here: [[Link to ADO project on GitHub] ](https://github.com/shlmt/ADO.NET-manager-shop)\n\n### Documentation\n\nThe entire project is documented using Swagger, providing an easy-to-use interface for API exploration and testing.\n\n### DTO Layer\n\nA lot of attention has been given to the DTO (Data Transfer Object) layer to avoid circular dependencies and encapsulation issues. Conversions between entities and DTOs are handled using AutoMapper.\n\n### Configuration\n\n* Configuration files include settings like connection strings.\n* The connection string is temporarily stored in `appsettings.json` but should be moved to user secrets for better security.\n\n### Error Handling\n\nErrors are caught by the error handling middleware and handled properly. This includes:\n\n* Sending real-time email notifications to the administrator\n* Logging all errors in files for review and debugging\n\n### Monitoring\n\nTraffic is monitored and logged in a dedicated table for analytical purposes within the middleware.\n\n### Security\n\n* The project enforces HTTPS for secure communication.\n* Password strength is validated using zxcvbn to ensure strong passwords.\n* Product prices are always retrieved from the database to ensure accuracy and prevent inconsistencies.\n\n### Testing\n\n* We performed integration tests in the repository layer against a temporary database created specifically for testing and deleted at the end of the test.\n* We performed unit tests in the service layer using a mocking framework like Moq to isolate and test functions with complex logic.\n\n### Example Client\n\nWe developed a small client using HTML and JavaScript to demonstrate an online store that uses this API.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshlmt%2Fwebapi_shop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshlmt%2Fwebapi_shop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshlmt%2Fwebapi_shop/lists"}