{"id":19135988,"url":"https://github.com/shchoholiev/shopping-assistant-api","last_synced_at":"2026-04-14T00:05:04.701Z","repository":{"id":199071628,"uuid":"693874383","full_name":"Shchoholiev/shopping-assistant-api","owner":"Shchoholiev","description":".NET Back-end API with OpenAI integration for a Shopping Assistant that utilizes Natural Language Processing (NLP) technology to interpret user queries for products and gifts. Users interact through a chat-style interface to communicate their shopping requirements.","archived":false,"fork":false,"pushed_at":"2023-12-20T02:08:27.000Z","size":226,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-03T12:43:37.173Z","etag":null,"topics":["backend","dotnet","generative-ai","openai","prompt-engineering","server-sent-events"],"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/Shchoholiev.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":"2023-09-19T22:18:58.000Z","updated_at":"2024-05-15T04:04:28.000Z","dependencies_parsed_at":"2023-11-10T23:28:12.747Z","dependency_job_id":"14606190-5328-4dba-9ea9-82bc4cca9082","html_url":"https://github.com/Shchoholiev/shopping-assistant-api","commit_stats":null,"previous_names":["shchoholiev/shopping-assistant-api"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shchoholiev%2Fshopping-assistant-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shchoholiev%2Fshopping-assistant-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shchoholiev%2Fshopping-assistant-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shchoholiev%2Fshopping-assistant-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shchoholiev","download_url":"https://codeload.github.com/Shchoholiev/shopping-assistant-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240214752,"owners_count":19766301,"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":["backend","dotnet","generative-ai","openai","prompt-engineering","server-sent-events"],"created_at":"2024-11-09T06:32:51.403Z","updated_at":"2026-04-14T00:05:04.696Z","avatar_url":"https://github.com/Shchoholiev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shopping-assistant-api\n.NET Back-end API with OpenAI integration for a Shopping Assistant that utilizes Natural Language Processing (NLP) technology to interpret user queries for products and gifts. Users interact through a chat-style interface to communicate their shopping requirements.\n\n## Table of Contents\n- [Features](#features)\n- [Stack](#stack)\n- [Installation](#installation)\n  - [Prerequisites](#prerequisites)\n  - [Setup Instructions](#setup-instructions)\n- [Configuration](#configuration)\n\n## Features\n- Chat-style interface that processes natural language queries for product and gift recommendations.\n- Integration with OpenAI API to generate intelligent product search responses.\n- Server-Sent Events (SSE) streaming product search results to clients in real-time.\n- Personal wishlist management with CRUD operations.\n- Role and user management with authorization and JWT-based authentication.\n- GraphQL API implemented with HotChocolate for flexible queries and mutations.\n- Pagination support for roles, users, wishlists, messages, and products.\n\n## Stack\n- Language: C# (.NET 7)\n- Frameworks \u0026 Libraries:\n  - ASP.NET Core Web API\n  - HotChocolate GraphQL\n  - MongoDB with official C# driver\n- Authentication \u0026 Security:\n  - JWT Bearer Authentication\n  - Password hashing with PBKDF2 (Rfc2898DeriveBytes)\n- Cloud \u0026 DevOps:\n  - Azure App Configuration\n  - GitHub Actions for CI/CD workflows\n- External APIs:\n  - OpenAI API for natural language processing and chat completions\n- Tools \u0026 Extensions:\n  - Swagger / OpenAPI for API documentation\n  - Server-Sent Events for realtime streaming responses\n  - Visual Studio Code DevContainer for development environment\n\n## Installation\n\n### Prerequisites\n- [.NET 7 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)\n- [MongoDB](https://www.mongodb.com/try/download/community) instance (local or hosted)\n- An OpenAI API key to access the OpenAI services\n\n### Setup Instructions\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/Shchoholiev/shopping-assistant-api.git\n   cd shopping-assistant-api\n   ```\n\n2. Navigate to the API project and restore dependencies:\n   ```bash\n   dotnet restore ShoppingAssistantApi.Api/ShoppingAssistantApi.Api.csproj\n   ```\n\n3. Build the solution:\n   ```bash\n   dotnet build ShoppingAssistantApi.sln\n   ```\n\n4. Configure the environment variables (see Configuration section).\n\n5. Run the API locally:\n   ```bash\n   cd ShoppingAssistantApi.Api\n   dotnet run\n   ```\n\n6. The API will start and Swagger UI will be available (usually at `https://localhost:7268/swagger`).\n\n7. Use GraphQL Playground or REST clients to interact with the API.\n\n## Configuration\n\nThe application uses configuration files and environment variables to configure key settings. Important configuration values are:\n\n- **MongoDB connection:**\n  - Set your MongoDB connection string (default database name is `ShoppingAssistant`) in `appsettings.json` or environment variable:\n    ```json\n    \"ConnectionStrings\": {\n      \"MongoDatabaseName\": \"ShoppingAssistant\"\n    }\n    ```\n  - The connection string URL is typically configured externally.\n\n- **JWT Authentication:**\n  Configure JWT validation parameters in your configuration with keys like:\n  ```json\n  \"JsonWebTokenKeys\": {\n    \"ValidateIssuer\": true,\n    \"ValidateAudience\": true,\n    \"ValidateLifetime\": true,\n    \"ValidateIssuerSigningKey\": true,\n    \"ValidIssuer\": \"\u003cyour-issuer\u003e\",\n    \"ValidAudience\": \"\u003cyour-audience\u003e\",\n    \"IssuerSigningKey\": \"\u003cyour-secret-key\u003e\"\n  }\n  ```\n\n- **OpenAI API:**\n  API endpoint and API key settings:\n  ```json\n  \"OpenAi\": {\n    \"ApiUrl\": \"https://api.openai.com/v1/chat/completions\",\n    \"ApiKey\": \"\u003cyour_openai_api_key\u003e\"\n  }\n  ```\n  Set the API key securely via environment variables or Azure App Configuration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshchoholiev%2Fshopping-assistant-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshchoholiev%2Fshopping-assistant-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshchoholiev%2Fshopping-assistant-api/lists"}