- Modified CompanyForm fields (RegistrationNumber, TaxID, Industry) to be optional, allowing for more flexible company creation.
- Updated the Create method in company service to check for existing companies by registration number and tax ID only if provided, improving error handling and user experience during company creation.
This update enhances the company creation process by allowing optional fields while ensuring that existing company checks are performed only when necessary.
- Introduced retry logic for fetching AI recommendations after onboarding, enhancing reliability in recommendation retrieval.
- Updated logging levels for better observability, changing cache miss logs to Info level.
- Renamed methods for clarity, replacing `refreshAIRecommendationsCacheAsync` with `scheduleRecommendationRefreshAfterOnboarding` and `fetchAndCacheAIRecommendations` with `fetchAIRecommendations`.
- Implemented a mechanism to clear the cache if no recommendations are returned, improving cache management.
This update optimizes the AI recommendation process, ensuring more robust handling of recommendation fetching and caching during onboarding.
- Updated `AISummarizerConfig` to allow for a default `RecommendationCacheTTL` of 0, enabling persistent caching until company updates.
- Refactored `StartAIOnboarding` to include cache invalidation and asynchronous recommendation refresh, improving responsiveness during onboarding.
- Introduced `triggerAIOnboardingAsync` method for background processing of AI onboarding and cache refresh, enhancing user experience.
- Improved logging for AI onboarding and recommendation fetching processes, providing better observability and error tracking.
This update optimizes the AI recommendation caching mechanism and onboarding workflow, ensuring a smoother and more efficient experience for users.
- Introduced `refreshAIRecommendationsCacheAsync` method to refresh AI recommendations in the background, improving responsiveness by serving the previous cache until the refresh completes.
- Updated `StartAIOnboarding` to call the new asynchronous cache refresh method instead of invalidating the cache directly.
- Added logging for cache refresh operations, including success and error handling, to enhance observability.
This update enhances the AI recommendation caching mechanism, providing a smoother onboarding experience and reducing latency in recommendation retrieval.
- Updated the `companyService` to include Redis caching for AI recommendations, improving performance and reducing redundant AI calls.
- Introduced asynchronous AI onboarding triggered after company profile updates, enhancing user experience by offloading processing.
- Added configuration for recommendation cache TTL in the `AISummarizerConfig`, allowing for flexible cache management.
- Implemented methods for caching, retrieving, and invalidating AI recommendations in the `companyService`, ensuring efficient data handling.
This update enhances the company's AI recommendation capabilities, providing faster responses and a more efficient onboarding process.
- Modified the `DocumentFileIDs` field in the `Company` struct to ensure it is always persisted in BSON format, enhancing data consistency.
- Implemented logic in the `Update` method of the `companyRepository` to clear document file IDs when the slice is empty, ensuring accurate database updates.
- Added logging for errors encountered while clearing document file IDs, improving error tracking and debugging capabilities.
This update enhances the management of document file IDs within the company domain, ensuring proper handling and persistence in the database.
- Modified the `EmployeeCount` field validation in `SearchForm` to use a range of 1 to 100000, ensuring more accurate input constraints.
- Updated `EmployeeCountMin` and `EmployeeCountMax` fields to reflect the same range validation, enhancing the robustness of search queries.
This update improves the validation logic for employee count fields in the company search functionality, providing better input handling and user experience.
- Updated the `UploadDocuments` method to sanitize document file IDs before saving, ensuring only valid references are stored.
- Introduced `DetachDocumentFileID` method in the `companyService` to remove file IDs from all companies referencing a deleted file, improving data integrity.
- Enhanced the `companyRepository` with a new method to handle the removal of document file IDs from the database.
- Updated the `filestore` handler to utilize the new detachment functionality when files are deleted, ensuring consistent state across domain entities.
This update improves the management of document file IDs within the company domain, enhancing data integrity and reference handling.
- Updated the `SearchForm` to include optional filters for `name`, `email`, `phone`, and `employee_count`, allowing for more granular search capabilities.
- Modified the `Search` method in the `companyRepository` to handle the new filters, improving the search logic with regex support for `name`, `email`, and `phone`.
- Updated API documentation in the `company` handler to reflect the new query parameters for enhanced clarity.
This update improves the search functionality within the company domain, providing users with more flexible and precise search options.
- Updated the `Search` method in the `companyRepository` to improve search capabilities by allowing regex-based filtering on `name`, `email`, and `phone` fields.
- Added logic to handle numeric search queries for `employee_count`, enhancing the search flexibility.
- Implemented input sanitization to trim whitespace from search queries, ensuring cleaner search inputs.
This update improves the search functionality within the company repository, providing more robust and flexible search options for users.
- Changed the `Rank` field type from `string` to `int` in the `RecommendedTenderResponse` struct within the `company` domain for better data representation.
- Updated the `Rank` field type from `string` to `int` in the `TenderResponse` struct within the `tender` domain to ensure consistency in ranking data.
- Modified the `Rank` field type from `string` to `int` in the `RecommendedTender` struct within the AI summarizer package to align with the updated data structure.
This update enhances the data integrity and consistency across the tender management system by standardizing the rank representation as an integer.
- Added new AI onboarding and recommendation endpoints in the company handler for starting onboarding and retrieving ranked tender recommendations.
- Introduced `StartAIOnboarding` and `GetAIRecommendations` methods in the company service to handle AI interactions.
- Updated the company service constructor to include the AI recommendation client.
- Enhanced the AI summarizer client with methods for onboarding and fetching recommendations.
- Added response structures for onboarding and recommended tenders in the company form.
This update enhances the tender management system by integrating AI capabilities for onboarding and tender recommendations, improving user experience and operational efficiency.
Frontend sends nested address field names for sorting; accept them alongside the existing country and state aliases.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Updated feedback repository and service methods to use a consistent naming convention, changing `NewTenderRepository` and similar methods to `NewRepository`.
- Refactored feedback handler methods to improve clarity by renaming methods such as `ListFeedback` to `Search` and `GetFeedback` to `Get`.
- Enhanced feedback response structures to include detailed company and tender information, improving the clarity of feedback data returned to API consumers.
- Updated Swagger documentation to reflect changes in feedback response structures and endpoint paths, ensuring accurate representation of the API for consumers.
- Enhanced the GetByIDs method to convert string IDs to BSON ObjectIDs before querying the database, ensuring proper data type handling.
- This change improves the robustness of the method by preventing potential errors related to ID format mismatches during database operations.
- Updated the MongoDB driver from v1.17.4 to v2.3.0, ensuring compatibility with the latest features and improvements.
- Refactored company-related entity and repository files to utilize the new driver, replacing `primitive.ObjectID` with `bson.ObjectID` for ID handling.
- Adjusted the configuration in `.drone.yml` to include the `main` branch in the trigger settings, enhancing CI/CD pipeline flexibility.
- Updated the Company service to include category validation during creation and updates, ensuring that only valid categories are associated with companies.
- Introduced a new CategoryResponse structure to encapsulate category details in API responses, improving the clarity of the data returned.
- Enhanced the CompanyResponse structure to include category details, providing more comprehensive information in API responses.
- Updated Swagger and YAML documentation to reflect the new category integration, including detailed descriptions and examples for the updated response structures.
- Improved error handling for invalid category data during company creation and updates, enhancing the robustness of the API.
- Refactored existing API handlers to accommodate the new category-related changes, ensuring a seamless user experience across the application.
- Updated the Swagger and YAML documentation to include example values for various fields in the CompanyForm and AddressForm, improving clarity for API consumers.
- Added example values for fields such as name, type, registration number, tax ID, industry, and more, ensuring comprehensive documentation.
- Enhanced the response structure in the Swagger documentation to provide better guidance on expected data formats and values.
- This update aligns with best practices for API documentation, facilitating easier integration and usage for developers.
- Introduced a new search functionality for companies, allowing advanced filtering capabilities including tags, business criteria, and location.
- Updated the API documentation to reflect changes in the search endpoint, enhancing clarity for API consumers.
- Refactored existing company-related API endpoints for consistency, including renaming and restructuring routes.
- Enhanced response structures to return company entities directly, simplifying the response handling in API endpoints.
- Removed unused query parameters and handlers, streamlining the company management functionality.
- Eliminated the 'country' field from the CompanyProfileResponse structure in the entity, Swagger JSON, YAML, and Go documentation.
- This change streamlines the response format for company profiles, ensuring clarity and consistency in the API documentation.
- Updated relevant documentation files to reflect the removal, enhancing the overall usability of the API.
- Introduced a new public API endpoint to retrieve the profile of the authenticated user's company, enhancing the functionality of the tender management system.
- Implemented the `MyCompany` method in the company handler to handle requests for the company profile, ensuring proper authentication and error handling.
- Updated Swagger and YAML documentation to accurately reflect the new endpoint, including detailed descriptions, parameters, and response formats for the `CompanyProfileResponse`.
- Modified the router to include the new company profile route, ensuring adherence to Clean Architecture principles and maintaining a clear separation of concerns in the handler layer.
- Enhanced the public routes registration to include the company handler, improving the overall API structure and usability.
- Introduced a new feedback management system, including the creation of feedback entities, services, and repositories.
- Implemented CRUD operations for feedback, allowing users to submit likes and dislikes on tenders.
- Developed administrative endpoints for listing and retrieving feedback with comprehensive filtering options.
- Enhanced public API to allow users to view feedback related to tenders.
- Updated Swagger documentation to reflect new feedback endpoints and their functionalities.
- Removed obsolete configuration file `config.yaml` as part of the transition to a modular configuration system.
- Ensured adherence to Clean Architecture principles throughout the implementation.
- Deleted the `/admin/v1/customers/{id}/with-companies` endpoint from the API documentation and Swagger files to streamline the API structure.
- Updated the router to remove the corresponding route registration for the deprecated endpoint.
- Enhanced the company repository and service to support batch retrieval of companies by IDs, improving efficiency in data handling.
- Adjusted customer service methods to utilize the new batch retrieval functionality for loading companies associated with customers.
- Improved logging practices to provide better traceability for company retrieval operations.
- Updated README.md to reflect changes in endpoint categories, renaming "Customers-Admin" to "Admin-Customers" and "Companies-Admin" to "Admin-Companies" for consistency.
- Modified health check endpoint tags from "Health" to "Admin-Health" to align with the new naming convention.
- Adjusted Swagger documentation to replace outdated tags and ensure accurate representation of the API structure.
- Enhanced user and customer handler documentation to reflect the new "Admin-Authorization" and "Admin-Users" tags, improving clarity in the API documentation.
- Removed OwnerCustomerID from Company entity and CompanyResponse to streamline ownership representation.
- Eliminated customer assignment fields from CreateCompanyForm and ListCompaniesForm for clarity.
- Updated repository and service methods to remove GetByCustomerID and CountWithCustomer, simplifying the codebase.
- Adjusted Search method parameters to exclude hasCustomer filter, enhancing search functionality.
- Improved API documentation by removing references to customer assignment in handler comments.
- Updated README.md to include comprehensive Swagger documentation details, highlighting new features and endpoint categories.
- Introduced a new router structure to streamline route registration for admin and public endpoints, enhancing maintainability.
- Updated health check endpoint documentation to reflect comprehensive server status information.
- Enhanced customer and company management routes with improved descriptions and examples in Swagger.
- Refactored customer and user handlers to remove obsolete route registrations, aligning with the new router structure.
- Improved response handling in customer and user services to utilize string IDs consistently.
- Updated validation rules and forms for customer management to support multiple company assignments.
- Enhanced logging practices across services to ensure better traceability and error handling.
- Changed tags from "Customers-Mobile" to "Customers-Authorization" in Swagger documentation for customer logout and profile retrieval endpoints.
- Updated the Company entity to replace CustomerID with OwnerCustomerID to better represent ownership.
- Removed obsolete customer assignment methods and related forms from the company domain, streamlining the codebase.
- Adjusted customer forms to include CompanyID instead of CompanyName for better consistency in customer management.
- Enhanced Swagger documentation to accurately reflect the new structure and authorization details for customer-related endpoints.
- Introduced a new company management domain, including entities, services, handlers, and forms for company operations.
- Implemented CRUD functionality for companies, allowing for creation, retrieval, updating, and deletion of company records.
- Enhanced API endpoints for company management, including search and filtering capabilities based on various criteria.
- Integrated JWT-based user authorization for company management operations.
- Updated Swagger documentation to include new company-related endpoints and detailed request/response structures.
- Established MongoDB ORM integration for efficient data handling and repository management.
- Added comprehensive validation rules for company forms to ensure data integrity and consistency.
- Implemented logging for key operations within the company service and repository for better traceability.