Commit Graph

464 Commits

Author SHA1 Message Date
nima 9f28ac278f Initial commit 2026-06-13 16:27:22 +03:30
m.nazemi 96ec0f8a8f Merge branch 'develop' into TM-310 2026-06-13 14:50:00 +03:30
m.nazemi a825c4a271 Merge pull request 'Enhance notification search functionality and update API documentation' (#40) from TM-616 into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/40
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2026-06-13 14:49:25 +03:30
m.nazemi 416b040c2b Merge branch 'develop' into TM-616 2026-06-13 14:49:01 +03:30
m.nazemi 24c57a3ec5 Merge pull request 'Implement AI onboarding and recommendation features in company service' (#39) from TM-599 into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/39
2026-06-13 14:48:44 +03:30
Mazyar 06e663b691 Add security and compliance documentation for ISO/IEC 27001
- Introduced a comprehensive suite of security documents to support ISO/IEC 27001 certification, including the ISMS Foundation, Risk Assessment Matrix, Gap Analysis Report, Statement of Applicability, and ISO27001 Roadmap.
- Updated the README to include links to the new security documentation, enhancing the project's compliance framework and providing clear guidance on security policies and procedures.

This addition strengthens the overall security posture of the Tender Management System and aligns with industry standards for information security management.
2026-06-11 01:53:24 +03:30
Mazyar f16f9fb5a9 Enhance notification search functionality and update API documentation
- Added `search` and `q` query parameters to the `SearchForm` for improved notification searching capabilities.
- Implemented `ResolvedSearch` method to prioritize search term resolution from the new parameters.
- Updated `GetByUserID` repository method to support searching notifications by title and message using regex.
- Enhanced logging in the `GetNotifications` service method to include search parameters.
- Updated Swagger documentation to reflect the new search parameters for the notification API.

This update improves the user experience by allowing more flexible and efficient searching of notifications.
2026-06-11 01:33:47 +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 4f05516fc2 Update Drone CI configuration and Makefile to remove legacy worker sources and add build target for worker
- Updated `.drone.yml` to remove lingering legacy worker source files after git deletion, ensuring a clean build environment.
- Modified `Makefile` to include a new `build-worker` target that removes deprecated scraper and queue source files, streamlining the worker build process.

This change enhances the build process by eliminating outdated components and ensuring that the worker is built without legacy dependencies.
2026-06-09 11:29:29 +03:30
m.nazemi 35892d5bc0 Merge pull request 'Implement AI analysis trigger endpoint and refactor related components' (#38) from AI-Refactor into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/38
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2026-06-08 23:50:36 +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 d07e1c9cf0 Fix summarizer worker infinite loop and map AI trigger errors to safe HTTP responses.
Paginate un-summarized tenders and mark rows missing notice/folder IDs as handled so the worker cannot spin forever. Return 400/404 for validation and not-found cases on AI summarize/analyze triggers instead of leaking internal errors as 500.
2026-06-08 20:24:02 +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
m.nazemi de8de9b5c5 Merge pull request 'Implement phone number validation for customer and user registration and updates' (#35) from Phone-Uniqueness into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/35
2026-06-07 14:41:21 +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
m.nazemi b7e813e972 Merge pull request '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.' (#37) from OJS-Date into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/37
2026-06-07 14:31:15 +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 0da0c8b8c9 Implement phone number validation for customer and user registration and updates
Added functionality to check for existing customers and users by phone number during registration and updates. Updated the handler, service, and repository layers to include phone number checks, ensuring unique phone numbers across customers and users.
2026-06-06 12:03:04 +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
m.nazemi 97f761adbe Merge pull request 'Enhance company and company category search forms by adding new sortable fields (email, phone, country, state, language, currency) and updating related API documentation.' (#34) from sort into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/34
2026-06-03 12:44:19 +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
m.nazemi b332841e0d Merge pull request 'Improve error handling for tender retrieval by adding specific checks for "tender not found" in handler and service layers.' (#33) from TM-588 into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/33
2026-06-03 12:37:26 +03:30
m.nazemi 286642ea15 Merge branch 'develop' into TM-588 2026-06-03 12:37:14 +03:30
m.nazemi 98dce9dcf3 Merge pull request 'Improve error handling in feedback retrieval by returning a specific error when feedback is not found for a given tender ID and customer ID.' (#32) from TM-571 into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/32
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2026-06-03 12:36:18 +03:30
m.nazemi 5b76cf8f89 Merge branch 'develop' into TM-571 2026-06-03 12:36:04 +03:30
m.nazemi 7082f2ba65 Merge pull request 'Implement multi-file upload functionality for companies and enhance file upload routes' (#31) from TM-604 into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/31
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2026-06-03 12:35:46 +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 ea792f54cd Improve error handling in feedback retrieval by returning a specific error when feedback is not found for a given tender ID and customer ID. 2026-06-02 21:43:23 +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 48340d961d Improve error handling for tender retrieval by adding specific checks for "tender not found" in handler and service layers. 2026-06-02 12:24:48 +03:30
m.nazemi 2457b76df9 Merge pull request 'Enhance customer search functionality by adding filters for full name, email, and role.' (#29) from TM-487 into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/29
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2026-06-01 16:58:16 +03:30
m.nazemi 75b1d64730 Merge branch 'develop' into TM-487 2026-06-01 16:58:00 +03:30
m.nazemi 2a4d647d5c Merge pull request 'Refactor customer form and service for company ID validation.' (#28) from TM-559 into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/28
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2026-06-01 16:57:48 +03:30
m.nazemi 7da9a4af81 Merge branch 'develop' into TM-559 2026-06-01 16:57:27 +03:30
m.nazemi 2acd9c32d3 Merge pull request 'Refactor document scraper service to support multiple country codes for pending tenders retrieval.' (#30) from scraper-country into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/30
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2026-06-01 16:57:13 +03:30
Mazyar 4beb57f42e Refactor document scraper service to support multiple country codes for pending tenders retrieval. 2026-06-01 11:14:18 +03:30
Mazyar 64be9f4ef7 Refactor customer form and service for company ID validation. 2026-06-01 10:56:50 +03:30
Mazyar 1be07bcb71 Enhance customer search functionality by adding filters for full name, email, and role. 2026-06-01 10:40:37 +03:30
m.nazemi cc6c0e1660 Merge pull request 'feedback error handling' (#26) from TM-571 into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/26
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2026-05-31 18:37:43 +03:30
Mazyar 7dd2e415f4 Merge branch 'develop' into TM-571 2026-05-31 18:36:59 +03:30
m.nazemi 423b0d0ebb Merge pull request 'in-app notification bug fix' (#24) from TM-563 into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/24
2026-05-31 18:30:56 +03:30
m.nazemi 95d2ce201f Merge branch 'develop' into TM-563 2026-05-31 18:29:15 +03:30
m.nazemi 4589cbfe6c Merge pull request 'create CMS error handling' (#25) from TM-578 into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/25
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2026-05-31 18:27:23 +03:30
m.nazemi 1a138d1485 Merge pull request 'Add customer feedback statistics endpoint and refactor feedback handling' (#27) from TM-560 into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/27
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2026-05-31 18:26:13 +03:30
m.nazemi 09fcd1a359 Merge pull request 'Add username existence check in customer registration and update handlers' (#23) from customer-username into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/23
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2026-05-31 18:25:40 +03:30