{"id":24106072,"url":"https://github.com/ahmaddanyal/catalogservice","last_synced_at":"2026-04-12T13:02:35.811Z","repository":{"id":268835322,"uuid":"905584931","full_name":"AhmadDanyal/CatalogService","owner":"AhmadDanyal","description":"A .NET REST API which allows users to perform basic CRUD operations on a MongoDB repository using a MongoDB docker container. Also features unit tests for the API controller.","archived":false,"fork":false,"pushed_at":"2025-01-07T16:33:09.000Z","size":20096,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T17:48:48.205Z","etag":null,"topics":["docker","dotnet","mongodb","moq","postman-api","rest-api","xunit-tests"],"latest_commit_sha":null,"homepage":"https://github.com/AhmadDanyal/CatalogService","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/AhmadDanyal.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-12-19T06:03:15.000Z","updated_at":"2025-01-07T16:51:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"70ae9763-a0cd-4e64-a04e-538c88a5d511","html_url":"https://github.com/AhmadDanyal/CatalogService","commit_stats":null,"previous_names":["ahmaddanyal/catalog","ahmaddanyal/catalogservice"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmadDanyal%2FCatalogService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmadDanyal%2FCatalogService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmadDanyal%2FCatalogService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmadDanyal%2FCatalogService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AhmadDanyal","download_url":"https://codeload.github.com/AhmadDanyal/CatalogService/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241078859,"owners_count":19905944,"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":["docker","dotnet","mongodb","moq","postman-api","rest-api","xunit-tests"],"created_at":"2025-01-10T21:17:48.304Z","updated_at":"2025-12-31T01:09:35.722Z","avatar_url":"https://github.com/AhmadDanyal.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Catalog Service\n\n### Setting Up The Project:\nThis project uses a MongoDB docker image for its database and persistent storage. The use of Docker Desktop for this project is completely optional. The preferred GUI for interacting with the database is MongoDB Compass (optional).\nIt also uses Postman API Platform for sending requests, as Swagger has been disabled in app settings. The links for downloading these resources are listed below:\n- [Download Postman API](https://www.postman.com/downloads/)\n- [Download Docker Desktop](https://www.docker.com/products/docker-desktop/) (optional)\n- [Download MongoDB Compass](https://www.mongodb.com/try/download/compass) (optional)\n\nOnce the downloads are complete, go ahead and pull the project to local system. As this is a .NET project, any IDE with .NET SDK installed will work. \n(Visual Studio and Visual Studio Code are preferred).\n\n### Launching MongoDB:\nThe next step is to launch an instance of a MongoDB Docker container. Using terminal of choice, enter the following code:\n```\ndocker run -d --name \u003cnameofproject\u003e -p 27017:27017 -v \u003cnameofdatabase\u003e:/data/db mongo\n```\n\n### Interacting with the API:\nThe last step is to interact with your REST API. To do this, run the project from local repository.\nOnce the project is running, open Postman API. In the address bar, type the following:\n```\nhttps://localhost:5001/items\n```\nNow you're ready to interact with the API!\n\n### Request Types:\nAt first, your database will be empty because you haven't added any items. Test out the API in the following request sequence for the best experience.\n#### POST\nStart with a POST request to add some items to the Catalog. Make sure to send a raw JSON object in the body using the following format:\n```\n{\n  \"name\" : \"\u003cName of Object\u003e\" (string)\n  \"price\" : (decimal or int)\n}\n```\nThis will generate your item with a Guid as ID, the name and price you specified, and the date of creation.\n#### GET\nA GET request will return all the items you added to your database using the POST method.\n#### GET {with id}\nIf you paste the id of item at the end of a GET request, you can retrieve that specific item.\n#### PUT {with id}\nA PUT request with the id of the item, and a raw JSON like the one shown in the POST method will allow you to modify that existing item to change its name or price.\n#### DELETE {with id}\nA DELETE request with the id of the item will allow you to delete that particular item.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmaddanyal%2Fcatalogservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmaddanyal%2Fcatalogservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmaddanyal%2Fcatalogservice/lists"}