Commit Graph

296 Commits

Author SHA1 Message Date
n.nakhostin f4152ec8a0 Refactor MongoDB Repository Interface by Removing Bulk Operations
- Removed the BulkCreate, BulkUpdate, and BulkDelete methods from the Repository interface to streamline the data access layer.
- Updated the FindMany method to maintain functionality while adhering to Clean Architecture principles.
- This change simplifies the repository interface, focusing on essential operations and improving maintainability.
2025-08-19 11:40:02 +03:30
n.nakhostin 81914e2eeb Add Company Tender Approval Statistics Endpoint and Update API Documentation
- Introduced a new API endpoint to retrieve company-specific tender approval statistics, enhancing the analytics capabilities of the tender management system.
- Implemented the `GetCompanyTenderApprovalStats` method in the service layer to fetch detailed statistics, including total approvals, approved and rejected tenders, and submission counts.
- Updated Swagger documentation to accurately reflect the new endpoint, including detailed descriptions, parameters, and response formats for the `CompanyTenderApprovalStatsResponse`.
- Enhanced the router to include the new statistics route, ensuring adherence to Clean Architecture principles and maintaining a clear separation of concerns in the handler layer.
- Added necessary request and response forms to support the new functionality, improving the overall API structure and usability.
2025-08-19 11:27:40 +03:30
n.nakhostin 392b31626d Refactor Tender Approval Management and Update API Documentation
- Replaced the existing tender approval update and delete endpoints with a new toggle functionality, allowing for more streamlined management of tender approvals.
- Introduced the `ToggleTenderApproval` method in the service layer to handle both approval and rejection actions based on the current state of the tender approval.
- Updated the API documentation to reflect the new endpoint structure and response formats, including the `TenderApprovalWithTenderResponse`.
- Enhanced Swagger documentation to ensure accurate representation of the updated tender approval operations.
- Removed obsolete methods and routes to maintain a clean and efficient codebase, adhering to Clean Architecture principles.
2025-08-19 11:01:49 +03:30
n.nakhostin dd2573a308 Enhance Tender Approval Service with Tender Details Integration
- Updated the tender approval service to include methods for retrieving tender approvals with associated tender details, improving the response structure for API consumers.
- Modified the tender approval handler to utilize the new service methods, ensuring that tender details are included in the responses for created, updated, and retrieved tender approvals.
- Enhanced the API documentation to reflect the changes in response formats, including the new `TenderApprovalWithTenderResponse` structure.
- Ensured adherence to Clean Architecture principles by maintaining a clear separation of concerns in the service and handler layers.
2025-08-18 19:23:34 +03:30
n.nakhostin 94d0fbef38 Add Tender Approval Management Functionality and API Enhancements
- Introduced a new tender approval management system, including the creation of tender approval entities, services, and repositories.
- Implemented CRUD operations for tender approvals, allowing companies to approve or reject tenders.
- Developed administrative and public API endpoints for listing, retrieving, and updating tender approvals with comprehensive filtering options.
- Enhanced Swagger documentation to accurately reflect the new endpoints, including detailed descriptions, parameters, and response formats.
- Updated existing routes to include tender approval management, ensuring adherence to Clean Architecture principles and maintaining a clear separation of concerns in the handler layer.
2025-08-18 19:00:41 +03:30
n.nakhostin a8ef631e43 Add Feedback Retrieval Endpoint for Tender ID
- Introduced a new API endpoint to retrieve feedback details by tender ID, enhancing the feedback management system for public users.
- Updated Swagger documentation to accurately reflect the new endpoint, including detailed descriptions, parameters, and response formats.
- Implemented necessary service and repository methods to support the new functionality, ensuring adherence to Clean Architecture principles.
- Modified existing routes to include the new feedback retrieval functionality, maintaining a clear separation of concerns in the handler layer.
- Enhanced feedback types to include 'unlike' and 'undislike' options for better user interaction.
2025-08-17 13:29:44 +03:30
n.nakhostin 4663a9781e Enhance Tender API with New Recommendation Endpoint and Route Updates
- Updated the tender API to include a new endpoint for recommending public tenders based on company profiles, enhancing user experience for mobile application users.
- Modified existing routes to reflect the new structure, changing the tender details route and adding a dedicated recommendation route.
- Improved Swagger documentation to accurately represent the new endpoint, including detailed descriptions, parameters, and response formats.
- Ensured adherence to Clean Architecture principles by maintaining clear separation of concerns in the service and handler layers.
2025-08-17 08:40:28 +03:30
n.nakhostin e986ee4135 Refactor Tender Management System by Removing Scraping Functionality and Enhancing Tender API
- Removed all scraping-related functionality, including routes, handlers, services, and repository methods, to streamline the tender management system.
- Updated the tender API to focus solely on tender management, enhancing endpoints for listing, retrieving, and updating tenders.
- Improved Swagger documentation to reflect the removal of scraping endpoints and the addition of new tender-related features.
- Ensured adherence to Clean Architecture principles throughout the refactoring process, maintaining a clear separation of concerns.
2025-08-16 16:52:17 +03:30
n.nakhostin 21b736b55b Implement Feedback Management System with CRUD Operations and API Enhancements
- 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.
2025-08-16 16:00:03 +03:30
n.nakhostin 126913365f Update README with Phase 1 Implementation Status and TODO List
- Added detailed status of Phase 1 implementation, indicating current completion at 70-75%.
- Documented completed features, partially implemented features, and missing features to provide clarity on project progress.
- Included a comprehensive TODO list categorized by priority, outlining critical, medium, and low priority tasks for upcoming development phases.
- Enhanced project visibility and planning for future enhancements, particularly focusing on the feedback system and advanced mobile features.
2025-08-16 10:54:07 +03:30
n.nakhostin 05165c6587 Remove company_id field from user-related forms and documentation
- Deleted the company_id field from CreateUserForm, User entity, and related API documentation in Swagger and YAML files to streamline user creation process.
- Updated the CreateUser service method to reflect the removal of company_id, ensuring consistency across the user management functionality.
2025-08-16 10:52:45 +03:30
n.nakhostin 0a23ff985a Enhance Tender Management with Company-Based Matching and API Updates
- Updated the tender service to include company-based matching for tenders, allowing for more relevant results based on company CPV codes.
- Modified the ListTenders endpoint to accept a company ID parameter for calculating match percentages and sorting tenders accordingly.
- Refactored the tender response structure to include match percentage and days until deadline for better client-side handling.
- Updated API documentation to reflect changes in the tender listing functionality and added new endpoints for public tender access.
- Removed deprecated customer-related methods and streamlined customer listing functionality for improved clarity and performance.
2025-08-13 19:47:58 +03:30
n.nakhostin 96c21b8b78 Implement TED Scraper and Configuration Management
- Introduced a new TED scraper in `cmd/scraper` to handle downloading and parsing TED XML files.
- Added configuration management for the scraper, including a new `Config` struct and YAML configuration file.
- Created necessary handler, service, and repository layers for tender management, adhering to Clean Architecture principles.
- Implemented comprehensive logging and error handling throughout the scraper functionality.
- Updated API routes to include tender management operations, enhancing the overall system capabilities.
2025-08-13 16:52:24 +03:30
n.nakhostin b7fa012d13 Refactor configuration management by migrating to a modular config system
- Removed the old `infra.Config` structure and replaced it with a new modular configuration system in `pkg/config`.
- Introduced a `Config` struct in `cmd/web/config.go` to hold command-specific configurations.
- Updated configuration loading functions to utilize the new `LoadConfig` method with generics for type safety.
- Adjusted various initialization functions in `cmd/web/bootstrap.go` and `cmd/web/main.go` to reflect the new configuration structure.
- Cleaned up the `config.yaml` by removing obsolete fields and ensuring it aligns with the new configuration schema.
2025-08-13 12:51:36 +03:30
Hadi Barzegar e3a32e151f Merge pull request 'XML Parser' (#4) from feature/xml-parser into develop
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/4
2025-08-12 13:06:22 +03:30
n.nakhostin 5322d3cd8e Add comprehensive tests for XML parser functionality
- Introduced benchmark tests for various XML parsing methods, including parsing from strings, bytes, and readers, to evaluate performance.
- Added unit tests for the parser interface and validation mechanisms, ensuring robust error handling and validation logic.
- Implemented tests for utility functions related to XML processing, enhancing overall test coverage and reliability.
- Created a test suite for the TED domain, validating the structure and functionality of contract notices and related entities.
- Developed a comprehensive test runner script to facilitate automated testing, coverage analysis, and performance benchmarking for the XML parser package.
2025-08-12 12:51:24 +03:30
n.nakhostin 7dc695752b Remove github.com/google/uuid dependency and update module files
- Deleted the `github.com/google/uuid` dependency from `go.mod` to streamline the project and reduce unnecessary dependencies.
- Updated `go.sum` to reflect the removal of the UUID package.
- Enhanced the overall module management by ensuring only necessary dependencies are included.
2025-08-12 12:15:14 +03:30
Hadi Barzegar cbedff3f36 Merge pull request 'Implement user/customer/company service' (#3) from develop into main
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/3
2025-08-12 12:09:58 +03:30
n.nakhostin 2d32ae0b2b Merge branch 'feature/company' into develop 2025-08-12 10:03:29 +03:30
n.nakhostin 047850cca3 Remove deprecated /api/v1/profile/with-companies endpoint and update related documentation
- Deleted the `/api/v1/profile/with-companies` endpoint from the API documentation, Swagger files, and router to streamline the API structure.
- Updated the `GetProfile` handler to utilize the `GetProfileWithCompanies` service method for improved data retrieval.
- Enhanced overall API documentation consistency by removing obsolete references and ensuring accurate representation of the current API structure.
2025-08-12 10:02:47 +03:30
n.nakhostin e3ee3d64ce Remove obsolete customer endpoint and update related documentation
- 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.
2025-08-11 19:12:31 +03:30
n.nakhostin a1db2a9790 Refactor API documentation and update endpoint tags for clarity
- 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.
2025-08-11 18:59:31 +03:30
n.nakhostin 318f3b7878 Update API documentation by removing obsolete customer-related fields and updating example values
- Removed references to customer assignment fields such as has_customer, owner_customer_id, and customer_id from Swagger documentation to streamline API clarity.
- Updated example values for password and username in the documentation to reflect current standards.
- Enhanced overall documentation consistency by eliminating outdated parameters and ensuring accurate representation of the API structure.
2025-08-11 18:31:50 +03:30
n.nakhostin f5407abbf0 Refactor company domain by removing customer-related fields and methods
- 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.
2025-08-11 18:31:15 +03:30
n.nakhostin 3e4831c2e7 Enhance API documentation and restructure routes for improved clarity
- 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.
2025-08-11 18:24:34 +03:30
n.nakhostin 566fa07574 Update API documentation to reflect customer authorization changes
- 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.
2025-08-11 16:24:28 +03:30
n.nakhostin 1e998b365e Add company management domain with CRUD operations and API enhancements
- 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.
2025-08-11 16:09:40 +03:30
n.nakhostin ce4f7e83d3 Refactor customer domain to use string IDs and integrate MongoDB ORM
- Updated Customer entity to embed MongoDB model and replace uuid.UUID with string for ID fields.
- Modified repository methods to accept string IDs instead of uuid.UUID, enhancing compatibility with MongoDB.
- Refactored service and handler methods to align with the new ID type, ensuring consistent usage across customer management functionality.
- Improved response handling in CustomerResponse to directly use string IDs.
- Streamlined index creation in the customer repository using the MongoDB ORM for better maintainability.
- Added new forms for customer suspension and updated validation rules.
- Enhanced Swagger documentation for customer-related endpoints to reflect changes in ID handling and request structures.
2025-08-11 14:01:36 +03:30
n.nakhostin 08cf927294 Refactor user domain to utilize string IDs and integrate MongoDB ORM
- Updated User entity to embed MongoDB model and replace uuid.UUID with string for ID fields.
- Modified repository methods to accept string IDs instead of uuid.UUID, enhancing compatibility with MongoDB.
- Refactored service and handler methods to align with the new ID type, ensuring consistent usage across the user management functionality.
- Improved response handling in UserListResponse to directly use string IDs.
- Streamlined index creation in the user repository using the MongoDB ORM for better maintainability.
2025-08-11 13:45:46 +03:30
n.nakhostin 8c1e593686 Implement customer management domain with authorization and API enhancements
- Introduced a new customer management domain, including entities, services, handlers, and forms for customer operations.
- Added JWT-based user authorization settings in the configuration file for both user and customer management.
- Updated API endpoints to reflect the new structure, including changes to health check and user management routes.
- Enhanced Swagger documentation to include new customer-related endpoints and authorization details.
- Refactored the Makefile to include a target for generating API documentation.
- Removed obsolete documentation files to streamline the project structure.
2025-08-11 12:55:08 +03:30
n.nakhostin 29d859de37 Merge branch 'hotfix/improvment-struct' 2025-08-10 19:09:24 +03:30
n.nakhostin 2119f49b9b Refactor health check and user management endpoints for improved structure and clarity
- Replaced the existing health check endpoint with a new handler at `/admin/v1/health` to align with the updated API structure.
- Introduced a dedicated `health.go` file to encapsulate health check logic and response formatting.
- Updated Swagger documentation to reflect the new health check endpoint and its response structure.
- Refined user management routes to enhance clarity and maintainability, including changes to login, logout, and profile management endpoints.
- Ensured all user-related endpoints are now prefixed appropriately and documented in Swagger for better API usability.
2025-08-10 19:06:20 +03:30
n.nakhostin dbcc2d1d4a Refactor customer domain by removing obsolete files and updating main application structure
- Deleted customer domain files including entities, services, handlers, and forms to streamline the codebase.
- Removed customer-related routes and service initializations from the main application.
- Updated Swagger documentation to reflect the removal of customer endpoints and definitions.
- Cleaned up the project structure to enhance maintainability and focus on user management functionality.
2025-08-10 19:05:46 +03:30
Nima Nakhsotin 3c817e2cd3 Merge pull request 'develop' (#2) from develop into main
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/2
2025-08-10 18:19:21 +03:30
Nima Nakhsotin a4ae156616 Merge branch 'main' into develop 2025-08-10 18:19:09 +03:30
n.nakhostin c89041812a Merge branch 'develop' into hotfix/improvment-struct 2025-08-10 17:11:53 +03:30
n.nakhostin fcec7c3ac2 Merge branch 'feature/user' into develop 2025-08-10 17:04:28 +03:30
n.nakhostin 5f38c8e787 Update Makefile for multi-platform builds and remove obsolete test scripts
- Added new build targets in the Makefile for macOS (Intel and Apple Silicon) and a target to build for all platforms.
- Removed outdated test scripts for server and Swagger documentation testing that are no longer needed.
- Cleaned up the project structure by deleting unnecessary files to streamline the build process.
2025-08-10 17:02:10 +03:30
n.nakhostin 98f581ec97 Enhance cursor rules and add user management functionality
- Updated cursor rules to emphasize the importance of dependency injection and logging practices.
- Introduced a new user management domain, including entities, services, handlers, and validation.
- Implemented user authentication features such as login, registration, and role-based access control.
- Added Redis integration for token management and caching.
- Enhanced API documentation with Swagger for user-related endpoints.
- Updated configuration to support new JWT settings and Redis connection parameters.
2025-08-10 14:09:17 +03:30
n.nakhostin 9119e2383e Add configuration file and update server settings
- Introduced a new `config.yaml` file for managing server, database, cache, queue, AI, scraping, logging, and rate limiting configurations.
- Updated `docker-compose.yml` to reflect the new server port (8081) and adjusted health check endpoints accordingly.
- Modified `Dockerfile` to expose the new server port.
- Updated `README.md` to reflect changes in server configuration and added documentation for the new configuration structure.
- Added test scripts for server and Swagger documentation testing.
- Refactored customer domain structure to align with new configuration settings and improve maintainability.
2025-08-02 12:37:04 +03:30
n.nakhostin 06dc1d5b7a Fix customer domain structure and update cursor rules 2025-08-02 11:30:52 +03:30
n.nakhostin 6d316c627f Merge branch 'hotfix/structure' 2025-08-02 11:27:07 +03:30
n.nakhostin 3e9877574c Refactor customer domain structure and implement core entities, services, and handlers
- Introduced a flat structure for the customer domain, consolidating entities, aggregates, repositories, services, forms, and handlers into a single package.
- Added core entities: Customer and CustomerAggregate.
- Implemented request/response forms for customer authentication (Register, Login, Refresh Token, Change Password).
- Created CustomerService to handle business logic and data access through the Repository interface.
- Established CustomerHandler for HTTP request handling related to customer authentication.
- Removed previous domain structure artifacts to streamline the codebase.
2025-08-02 11:26:35 +03:30
Hadi Barzegar ddf29efb4a Merge pull request 'Add cursor rules and initial configuration for Tender Management Go Backend' (#1) from develop into main
Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/1
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
2025-08-02 10:52:51 +03:30
n.nakhostin 5a1ceb0bd6 Add cursor rules and initial configuration for Tender Management Go Backend 2025-08-02 10:43:47 +03:30
hdbar ad9db7bcce Initialize base 2025-07-27 16:20:21 +03:30