Commit Graph

83 Commits

Author SHA1 Message Date
Mazyar dcf19b91cd Implement AI pipeline operations in the admin API
- Added new routes and handlers for AI pipeline operations, including scraping documents, batch summarization, translation, and syncing with the Opplens AI service.
- Introduced request forms for handling tender references and batch operations.
- Enhanced the AI service with methods for triggering batch operations and managing pipeline runs.
- Updated Swagger documentation to reflect the new AI pipeline endpoints and their functionalities.

This update integrates comprehensive AI pipeline capabilities into the tender management system, improving operational efficiency and user experience.
2026-06-14 12:54:13 +03:30
Mazyar 3b26c4f5e1 Implement AI onboarding and recommendation features in company service
- 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.
2026-06-11 01:08:59 +03:30
Mazyar 9cd22c24b6 Refactor queue management by removing deprecated components and updating configuration
- Removed the QueueConfig structure and related queue management files as they are no longer in use.
- Updated the worker initialization to reflect the removal of queue-related configurations.
- Cleaned up the bootstrap process by eliminating deprecated logging related to the queue system.

This update streamlines the worker's configuration and prepares the codebase for future enhancements without the legacy queue management components.
2026-06-08 23:49:51 +03:30
Mazyar 7d383c36c3 Implement AI analysis trigger endpoint and refactor related components
- Added a new endpoint to trigger on-demand agentic analysis for tenders via the AI service.
- Introduced `TriggerAIAnalyze` method in the `TenderHandler` to handle requests and responses for AI analysis.
- Updated the `tenderService` to include `TriggerAIAnalyze` method, which validates input and interacts with the AI summarizer client.
- Enhanced the `AIAnalyzeResponse` and `AIAnalyzeDocument` structures to support the new analysis feature.
- Refactored the `DocumentSummarizationWorker` and `TranslationWorker` to remove deprecated MinIO dependencies, streamlining the AI service interactions.

This update improves the functionality of the tender management system by allowing users to trigger AI analysis on-demand, enhancing the overall user experience and system capabilities.
2026-06-08 18:01:15 +03:30
Mazyar 3f0935ee3f Enhance duplicate key error handling in MongoDB operations
- Improved the `IsDuplicateKeyError` function to utilize structured error messages for better accuracy in identifying duplicate key errors.
- Introduced `duplicateKeyMessages` and `hasStructuredWriteException` functions to parse and extract relevant information from MongoDB error messages.
- Updated `DuplicateKeyMatchesField` to match duplicate key errors against specific fields by analyzing error messages rather than relying on substring matching.

This refactor enhances the clarity and reliability of duplicate key error handling, ensuring more precise identification of conflicts in MongoDB operations.
2026-06-07 14:40:42 +03:30
m.nazemi 550fd36db1 Merge branch 'develop' into Phone-Uniqueness 2026-06-07 14:33:48 +03:30
m.nazemi a75e4743f0 Merge pull request 'Refactor AI summarizer client initialization to include MongoDB manager and add statistics endpoint' (#36) from TM-602 into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/36
2026-06-07 14:32:37 +03:30
Mazyar c91b525e7e Refactor MongoDB index creation to use NonEmptyStringPartialFilter for improved clarity and consistency. Update GetOJS function to utilize context and user agent for HTTP requests, enhancing error handling and response management. 2026-06-06 21:36:43 +03:30
Mazyar 68b170126d Refactor AI summarizer client initialization to include MongoDB manager and add statistics endpoint
- Updated `InitAISummarizerClient` to accept `mongoManager` for tracking translation success.
- Introduced new `Statistics` endpoint in the dashboard to fetch scraping and translation statistics.
- Enhanced `TranslationWorker` to utilize the new success counter for tracking successful translations.
- Added necessary data structures and query forms for statistics reporting.

This refactor improves the tracking of AI translation success and provides new insights through the dashboard statistics.
2026-06-06 21:20:53 +03:30
Mazyar 22487eaef5 fix(user,customer): return 409 on phone duplicate-key races
Map E11000 from the per-collection phone index to friendly conflict
errors and skip redundant GetByPhone when the phone is unchanged.

Not blocking: IAT test DB may need a one-off dedupe for index build;
phone uniqueness is per collection (users vs customers), not global.
2026-06-06 20:34:45 +03:30
Mazyar 5af3bfaa1a Allow address.country and address.state as company sort fields.
Frontend sends nested address field names for sorting; accept them alongside the existing country and state aliases.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 09:41:12 +03:30
Mazyar a9f1611c48 Added curso test 2026-06-03 12:43:12 +03:30
m.nazemi cf77e90f84 Merge branch 'develop' into sort 2026-06-03 12:38:12 +03:30
Mazyar 2090cc05ba Enhance company and company category search forms by adding new sortable fields (email, phone, country, state, language, currency) and updating related API documentation. 2026-06-02 22:07:49 +03:30
Mazyar a4c04912c8 Implement multi-file upload functionality for companies and enhance file upload routes 2026-06-02 21:24:39 +03:30
Mazyar bca94cd69a go-rules temporarily disabled 2026-05-30 16:19:21 +03:30
m.nazemi e869e149c5 Merge pull request 'kanban dashboard refactor' (#21) from kanban into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/21
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2026-05-30 14:19:24 +03:30
Mazyar ad702f24bf fixed blocking important issues 2026-05-30 12:29:45 +03:30
Mazyar bb221f3cda Add admin password reset functionality for users and customers 2026-05-29 20:15:09 +03:30
Mazyar ce2dc7a61b kanban dashboard refactor 2026-05-27 22:06:23 +03:30
Mazyar da2d50bd70 fixed critical security issues 2026-05-25 13:23:49 +03:30
Mazyar f7763cf997 get all tenders with documeents scraped API 2026-05-19 19:23:18 +03:30
Mazyar fcf2cae6bc tender summary refactor 2026-05-19 19:03:50 +03:30
Mazyar 6dac5b482a hybrid pagination 2026-05-17 17:21:36 +03:30
Mazyar 42d0a47226 tender summary response fix 2026-05-17 17:02:12 +03:30
Mazyar 70f581da09 cursor pagination 2026-05-16 15:51:18 +03:30
Mazyar bcb345103f minio connection log 2026-05-16 14:08:58 +03:30
Mazyar 6701428b09 AI translate refactor 2026-05-16 12:56:10 +03:30
Mazyar ca490f3acf get aiSummary and documents refactor 2026-05-16 11:01:13 +03:30
Mazyar f08982afb5 pagination optimization 2026-05-14 14:18:34 +03:30
Mazyar eaa681814d Minio document json 2026-05-13 18:24:45 +03:30
Mazyar 5ab6b2714e AI scraper prefix 2026-05-13 17:32:37 +03:30
Mazyar 584992f0b6 translation body update 2026-05-13 14:50:37 +03:30
Mazyar c518cd3afb pagination offset bug fix 2026-05-13 00:07:31 +03:30
Mazyar 7c42b343ce document scraper logic and API refactor 2026-05-11 15:52:32 +03:30
Mazyar b4efb97f47 merge tenders which have the same procedure id - worker performance fix 2026-05-11 15:10:01 +03:30
Mazyar e136f0eaa7 List and download tender documents - worker auto translation to english job 2026-05-10 02:14:53 +03:30
Mazyar b480ed2371 Integrated AI translation 2026-05-08 16:17:33 +03:30
Mazyar 65a19d1514 Integrated AI summary 2026-05-05 17:47:31 +03:30
m.nazemi 446c11dfbf Removed old document scraper service 2026-05-03 13:46:38 +03:30
m.nazemi 3aabd95b1c implemented mongo gridFS for file upload 2026-04-21 19:07:51 +03:30
m.nazemi bf3f21fb51 agent SDK fix 2026-04-12 12:29:35 +03:30
Mazyar e0e8b9cf04 ted one-time api 2026-02-23 15:40:20 +03:30
Mazyar f6bdcc6d7c Implemented the integration with scraper python server, tenders summarise, and some fixes. 2025-12-27 12:47:08 +03:30
Mazyar ec3737e341 Merge branch 'develop' into TM-309 2025-12-08 12:08:44 +03:30
Mazyar 7fb182f180 xss validation 2025-12-07 23:52:17 +03:30
Mazyar b01c0f9368 added hcaptcha 2025-12-05 18:10:05 +03:30
Mazyar 5e777ceec8 scraper sdk 2025-12-01 11:06:09 +03:30
Mazyar b6546eb2bb tendsign scraper 2025-11-30 02:58:08 +03:30
Nima Nakhostin 1a56070556 Add MinIO Package for Object Storage Management
- Introduced a comprehensive MinIO package for managing object storage, including support for hierarchical document storage and general file management.
- Implemented core components such as Config, ConnectionManager, and Service, following Clean Architecture principles.
- Added functionality for file uploads, downloads, bucket management, and structured logging, enhancing usability and maintainability.
- Included detailed error handling and validation for configuration and operations, ensuring robustness.
- Updated documentation with usage examples and configuration guidelines to facilitate integration and understanding of the package's functionality.
2025-11-09 09:52:09 +03:30