Commit Graph

453 Commits

Author SHA1 Message Date
n.nakhostin c701053609 Add Password Reset Functionality and Update API Documentation
- Implemented password reset functionality, including endpoints for requesting a reset code, verifying the OTP, and resetting the password.
- Introduced new request and response forms for password reset operations, ensuring proper validation and structured responses.
- Enhanced the customer service layer to handle password reset requests, OTP verification, and password updates, utilizing Redis for temporary token storage.
- Updated Swagger and YAML documentation to include new API endpoints and their specifications, improving clarity for API consumers.
- Refactored the customer handler to manage new password reset routes, ensuring adherence to clean architecture principles.
2025-09-14 13:25:36 +03:30
n.nakhostin 5d721705b7 Update MongoDB Driver and Configuration for Company Entities
- 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.
2025-09-09 18:53:39 +03:30
n.nakhostin 57c29dc58f Refactor Configuration System to Use Environment Variables
- Removed YAML configuration files for the scraper and web commands, transitioning to an environment-based configuration system.
- Updated configuration structs to utilize `env` tags for loading values from `.env` files, enhancing security and flexibility.
- Implemented reflection-based parsing for environment variables, ensuring type-safe configuration loading.
- Revised documentation to reflect the new configuration approach, including usage examples and best practices for environment variable naming conventions.
2025-09-09 18:19:42 +03:30
n.nakhostin 44d0f57082 Update Dockerfile to Correct Asset Copy Path
- Modified the Dockerfile to change the COPY command for web assets, ensuring the correct path is used to include assets from the cmd/web directory. This adjustment improves the organization and accessibility of web-related assets within the application.
2025-09-09 16:03:13 +03:30
n.nakhostin 6458211f12 Update Dockerfile to Copy Web Assets
- Modified the Dockerfile to change the COPY command for assets, now including the entire web assets directory instead of just the flags. This adjustment improves the organization and accessibility of web-related assets within the application.
2025-09-09 14:56:50 +03:30
n.nakhostin b445bb297f Remove Authentication Middleware from Admin Flags Routes
- Eliminated the authentication middleware from the admin flags routes, simplifying access to flag-related endpoints for administrative purposes. This change enhances the usability of the admin interface while maintaining the integrity of other secured routes.
2025-09-09 14:53:07 +03:30
n.nakhostin a8a08b33f6 Update Dockerfile to Include Flags Assets
- Added a new COPY command in the Dockerfile to include SVG flag assets from the go-builder stage, enhancing the application's asset management and visual representation of country flags.
2025-09-09 14:49:06 +03:30
n.nakhostin c873635f6f Add Flags Assets and Update Configuration
- Introduced multiple SVG flag assets to the project, enhancing the visual representation of country flags.
- Updated the configuration file to include a new path for the flags assets, ensuring proper access and organization.
- Modified the main application to accommodate the new flags path, improving the overall asset management in the application.
2025-09-09 14:48:02 +03:30
n.nakhostin c06ea278c0 Update CustomerResponse JSON Tags and Fix Comment in Tender Repository
- Changed BSON tags to JSON tags in the CustomerResponse struct to ensure proper serialization in API responses.
- Updated the comment in the buildSearchFilter method to correct a typo, enhancing clarity in the codebase.
2025-09-08 14:32:57 +03:30
n.nakhostin a76aa16cba Enhance Tender Search API with Advanced Filtering and Documentation Updates
- Updated the Tender Search API to include additional query parameters for enhanced filtering capabilities, such as currency, deadline ranges, publication dates, languages, and buyer organization ID.
- Changed existing query parameter types from integer to string for better flexibility in search queries.
- Improved Swagger and YAML documentation to reflect the new parameters and their descriptions, ensuring clarity for API consumers.
- Updated handler comments to align with the new query structure, providing comprehensive details for each parameter.
- Enhanced response structures to return a well-defined SearchResponse, improving the overall API usability and documentation consistency.
2025-09-08 14:25:02 +03:30
n.nakhostin 3911180486 Refactor Tender Management API Endpoints and Update Documentation
- Renamed and restructured tender-related API endpoints for improved clarity and consistency, including changing the route from `/admin/tenders` to `/admin/v1/companies` and updating the associated methods.
- Introduced a new SearchForm structure for listing tenders with advanced filtering capabilities, enhancing the API's search functionality.
- Updated the service and repository layers to align with the new endpoint structure, ensuring proper handling of tender data.
- Enhanced Swagger and YAML documentation to reflect the changes in endpoint structure, including detailed descriptions and examples for the new search functionality.
- Improved error handling and response structures to provide clearer feedback to API consumers, ensuring a more robust and user-friendly experience.
2025-09-08 14:20:50 +03:30
n.nakhostin 3b265e567d Refactor Customer Entity and Response Structures
- Moved CompanySummary and CustomerResponse structures from entity.go to form.go, improving organization and clarity of customer-related data representations.
- Updated the ToResponse method to maintain functionality while aligning with the new structure, ensuring consistent API responses for customer data.
- This refactor enhances the maintainability of the codebase by adhering to clean architecture principles and improving the separation of concerns.
2025-09-08 13:08:29 +03:30
n.nakhostin 8670b3272d Enhance Company Management with Category Integration and API Documentation Updates
- 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.
2025-09-08 13:01:45 +03:30
n.nakhostin 991771ee19 Add Company Category Management Functionality and Update API Documentation
- Introduced a new company category management feature, including CRUD operations for categories in both admin and public API endpoints.
- Implemented category entity, service, repository, and handler layers following clean architecture principles.
- Added new API routes for searching, retrieving, updating, deleting, and toggling publish status of categories, enhancing the overall functionality of the system.
- Updated Swagger and YAML documentation to include detailed descriptions and examples for the new category endpoints, ensuring clarity for API consumers.
- Enhanced error handling for duplicate categories and validation, improving the robustness of the category management process.
- Updated existing routes to integrate category handling, ensuring a seamless user experience across the application.
2025-09-08 12:31:49 +03:30
n.nakhostin 617547def8 Enhance API Documentation with Example Values for Company Forms
- 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.
2025-09-08 11:26:11 +03:30
n.nakhostin ee830f8c1b Implement Company Search and Update API Documentation
- 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.
2025-09-08 11:23:15 +03:30
n.nakhostin 777bbfd714 Refactor API Response Structure to Use Inline Data Field
- Updated the APIResponse struct to change the Data field to use inline JSON representation, enhancing the response format.
- Removed the Meta field from the SuccessWithMeta function, simplifying the success response handling.
- This change improves the clarity and consistency of API responses, aligning with best practices for response structures.
2025-09-08 10:24:51 +03:30
n.nakhostin 857e911d40 Add Inquiry Management Functionality and Update API Documentation
- Introduced a new inquiry management feature, including CRUD operations for inquiries in both admin and public API endpoints.
- Implemented inquiry entity, service, repository, and handler layers following the clean architecture principles.
- Added new API routes for searching, retrieving, updating, and deleting inquiries, enhancing the overall functionality of the system.
- Updated Swagger documentation to include detailed descriptions and examples for the new inquiry endpoints, ensuring clarity for API consumers.
- Enhanced error handling for duplicate inquiries and validation, improving the robustness of the inquiry management process.
- Updated existing routes to integrate inquiry handling, ensuring a seamless user experience across the application.
2025-09-07 14:36:16 +03:30
n.nakhostin 34064e8b36 Update Query Parameter Names in Customer and User Forms
- Changed the query parameter name from `search` to `q` in both SearchCustomersForm and ListUsersForm for consistency across API endpoints.
- This update enhances clarity in the API's query structure, aligning with common practices for search parameters.
2025-09-07 12:19:19 +03:30
n.nakhostin e848b625ce Refactor Customer API Endpoints and Update Documentation
- Changed customer-related API endpoints to improve clarity and consistency, including renaming and restructuring routes.
- Removed unused query parameters and handlers, streamlining the customer management functionality.
- Updated customer entity and forms to reflect new example values for enhanced API documentation clarity.
- Enhanced response structures to return customer entities directly, simplifying the response handling in API endpoints.
- Updated API documentation to reflect changes in endpoint structure and response formats, ensuring consistency for API consumers.
2025-09-06 16:08:53 +03:30
n.nakhostin 05e7b50ec4 Refactor User Response Handling in API Endpoints
- Updated user-related API handlers to return user entities directly instead of using the ToResponse method, simplifying response structures.
- Modified service methods to return UserResponse types instead of User, enhancing consistency in response formats.
- Improved pagination handling in the response package by setting default values for sorting parameters, ensuring more predictable behavior in API responses.
2025-09-06 15:59:34 +03:30
n.nakhostin 38844939b5 Refactor User Management API and Update Documentation
- Changed API tags from "Admin-Users" to "Admin-Authorization" for better clarity in user management endpoints.
- Removed unused endpoints for retrieving users by company ID and role, streamlining the user management functionality.
- Updated user entity and forms to reflect new example values for improved clarity in API documentation.
- Enhanced pagination handling in user listing responses, ensuring consistent metadata structure.
- Updated API documentation to reflect changes in endpoint structure and response formats, improving clarity for API consumers.
2025-09-06 14:00:22 +03:30
n.nakhostin eb69a842f0 Update Configuration and Enhance Tender Approval Pagination
- Changed the server port from 8081 to 8082 for the web application.
- Updated MongoDB URI to include authentication credentials for improved security.
- Added new query parameters `limit` and `offset` for pagination in tender approval retrieval, enhancing the API's flexibility.
- Modified the response structure to include metadata for pagination, improving the clarity of responses.
- Updated API documentation to reflect the new pagination parameters and response format, ensuring consistency for API consumers.
2025-09-06 12:07:32 +03:30
n.nakhostin 61a217cf09 Enhance Tender Approval Filtering with Created Date Parameters
- Added new query parameters `created_from` and `created_to` to the tender approval endpoints for filtering by creation date using Unix timestamps.
- Updated the `GetByCompanyID` method in the repository and service layers to support the new filtering options.
- Modified the handler methods to parse and pass the new parameters, improving the flexibility of tender approval retrieval.
- Updated API documentation to reflect the new query parameters, ensuring clarity for API consumers.
2025-09-03 10:23:47 +03:30
n.nakhostin 8d3a021fbf Refactor CORS Middleware Configuration in HTTP Server Initialization
- Removed the unused net/http import to clean up the code.
- Updated the CORS middleware configuration to use echo's constants for HTTP methods, enhancing clarity and consistency in the codebase.
- This change improves maintainability by aligning with the framework's conventions and reducing potential errors in method references.
2025-09-02 15:28:52 +03:30
n.nakhostin 9c13b3f27f Refactor ToggleTenderApproval Logic to Simplify Status Check
- Updated the ToggleTenderApproval method to remove the redundant check for SubmissionMode when determining if an existing tender approval should be deleted.
- This change enhances the clarity of the approval logic and improves maintainability by focusing solely on the Status comparison.
2025-09-02 11:56:07 +03:30
n.nakhostin fbf3165169 Refactor Tender Handler to Use ListTendersRequest Struct
- Updated the GetPublicTenders handler to utilize a new ListTendersRequest struct for improved clarity and organization of parameters.
- Changed the handling of `publication_from` and `publication_to` query parameters to use pointers for optional timestamp values.
- Enhanced the service call to ListTenders, aligning with the new request structure and improving the overall code maintainability.
2025-09-02 11:41:51 +03:30
n.nakhostin 8f909618d8 Refactor Feedback Service to Include Tender Information in Responses
- Updated the FeedbackService to include a new dependency on TenderService, allowing feedback responses to include associated tender details.
- Modified the ListFeedback method to return a new FeedbackListWithTenderResponse type, which includes feedback along with tender information.
- Enhanced the feedback entity and form structures to support the new response format, improving the API's capability to provide comprehensive feedback data.
- Adjusted the main application initialization to reflect the changes in the feedback service dependencies.
2025-09-02 11:31:59 +03:30
n.nakhostin c684a12155 Update API Documentation and Enhance Tender Query Parameters
- Changed references in API documentation from `main.HealthResponse` to `bootstrap.HealthResponse` for consistency.
- Added new query parameters `publication_from` and `publication_to` to the tender listing and recommendation endpoints to allow filtering by publication date.
- Updated the `ListTendersRequest` struct to include optional fields for `from` and `to` timestamps.
- Modified the `TenderRepository` and `TenderService` interfaces to support the new filtering parameters in the tender listing functionality.
- Enhanced the service and handler layers to process the new query parameters, improving the flexibility of tender retrieval.
2025-09-02 11:03:38 +03:30
n.nakhostin cbf45a812d Remove docker-compose.yml and update scraper Dockerfile entry point
- Deleted the docker-compose.yml file to streamline the project structure and reduce complexity in managing services.
- Updated the entry point in the scraper Dockerfile to use the correct path for the scraper binary, ensuring proper execution within the container.
2025-08-31 19:03:45 +03:30
n.nakhostin 06d0a9afb6 Update CI Configuration in .drone.yml to Reflect Build Process Changes
- Renamed the pipeline from 'web' to 'build' for clarity in the CI process.
- Updated the 'web tag' step to 'build tag' to better represent its purpose.
- Removed the 'scraper tag' step to streamline the configuration and focus on the build process.
- Ensured the CI configuration aligns with the current build requirements for the application.
2025-08-31 18:07:22 +03:30
n.nakhostin e6bf47a769 Refactor Dockerfile and Update CI Configuration
- Changed the working directory in the Dockerfile to /app for better organization.
- Removed the iat.yaml configuration file to simplify the container setup and reduce complexity.
- Adjusted the exposed port to 80, aligning with standard HTTP practices for the scraper application.
- Updated the CI configuration in .drone.yml to reflect these changes, ensuring a streamlined build process.
2025-08-31 17:13:57 +03:30
n.nakhostin 31cf9a4454 Refactor Dockerfile and Remove iat.yaml Configuration
- Updated the Dockerfile to change the working directory to /app and streamline the build process for the web application.
- Removed the iat.yaml configuration file, simplifying the configuration management and reducing complexity in the container setup.
- Adjusted the entry point and exposed port to align with standard practices, ensuring the application runs on port 80.
2025-08-31 16:48:08 +03:30
n.nakhostin e5e9ebee32 Update iat.yaml Configuration to Change Server Port
- Modified the server port in the iat.yaml configuration file from 8081 to 80, aligning with standard HTTP port usage.
- This change simplifies deployment and access to the web application, ensuring it listens on the default HTTP port.
2025-08-31 16:32:33 +03:30
n.nakhostin b1438870f0 Add Configuration Files for Scraper and Web Applications
- Introduced iat.yaml configuration files for both the scraper and web applications, defining essential settings such as database connections, logging configurations, and scraping parameters.
- Updated the Dockerfiles for both applications to include the new iat.yaml files, ensuring they are available in the container environment for runtime configuration.
- This enhancement improves the maintainability and configurability of both applications, allowing for easier adjustments to settings without code changes.
2025-08-31 16:30:58 +03:30
n.nakhostin ff44ded5f9 Update CI Configuration in .drone.yml to Enhance Build Process
- Renamed the existing 'tag' step to 'web tag' for clarity in the CI pipeline.
- Added a new 'scraper tag' step to generate application version tags based on the current git commit count and branch, improving versioning for the scraper application.
- This update streamlines the CI process and enhances the tagging mechanism for better tracking of application versions.
2025-08-31 14:25:43 +03:30
n.nakhostin 45d2e84fd7 Implement Scraper Dockerfile and Refactor CI Configuration
- Added a new Dockerfile for the scraper application located at cmd/scraper/Dockerfile to streamline the build process.
- Updated the CI configuration in .drone.yml to correctly build the scraper application with the new Dockerfile.
- Refactored the main application entry point to utilize a new bootstrap package for configuration, logging, and MongoDB initialization.
- Enhanced the scraper's configuration management by defining a dedicated Config struct for better organization and maintainability.
2025-08-31 14:23:01 +03:30
n.nakhostin 511155e0a7 Refactor Dockerfile and CI Configuration
- Updated the CI configuration in .drone.yml to use the new Dockerfile located at ./cmd/web/Dockerfile.
- Removed the old Dockerfile and Dockerfile-drone as they are no longer needed.
- Refactored the cmd/web/Dockerfile to streamline the build process and improve organization.
- Introduced a new bootstrap package to handle application initialization, including configuration, logging, MongoDB, Redis, and authorization service setup.
- Added a health check endpoint for monitoring the server status, enhancing the API's operational capabilities.
2025-08-31 14:16:37 +03:30
k.pirzargar 4b3172d058 rupdate 2025-08-30 23:47:36 +03:30
k.pirzargar ea52e87443 add cache 2025-08-30 23:34:15 +03:30
k.pirzargar 3034018ebd Update .drone.yml 2025-08-30 23:21:14 +03:30
k.pirzargar e835a6ac4e add build tow project 2025-08-30 23:18:19 +03:30
k.pirzargar 397121cec3 Add .drone.yml 2025-08-30 23:12:55 +03:30
k.pirzargar 8c7f5b13f8 Add Dockerfile-drone 2025-08-30 23:10:18 +03:30
k.pirzargar b9a54fd4f0 Add cmd/web/Dockerfile 2025-08-30 16:13:31 +03:30
n.nakhostin 3024998e7e Update Tender Approval Status to Include Submitted State and Revise API Documentation
- Changed the approval status from "approved" to "submitted" in various locations, including entity definitions, forms, and service methods, to accurately reflect the tender approval process.
- Updated API documentation in Swagger JSON, YAML, and Go files to describe the new status options ("submitted" and "rejected") and their corresponding descriptions.
- Enhanced the tender approval statistics structures to include a count for submitted tenders, improving the overall data model for tender management.
- These changes ensure clarity in the tender approval workflow and enhance the usability of the API for clients interacting with tender approvals.
2025-08-25 13:51:14 +03:30
n.nakhostin 0e14a11daf Add Company Feedback Statistics Endpoint and Update API Documentation
- Introduced a new endpoint to retrieve comprehensive feedback statistics for the authenticated user's company, including total likes, dislikes, and percentage calculations.
- Implemented the GetCompanyFeedbackStats method in the feedback handler to handle requests, ensuring proper authentication and error handling.
- Updated Swagger JSON, YAML, and Go documentation to accurately reflect the new endpoint, including detailed descriptions, parameters, and response formats for the CompanyFeedbackStatsResponse.
- Enhanced the feedback repository and service layers to support the new statistics functionality, improving the overall data handling capabilities of the tender management system.
- These changes enhance the usability and functionality of the API, providing valuable insights into company feedback statistics.
2025-08-25 13:39:35 +03:30
n.nakhostin 488d43380b Refactor Tender Approval Logic and Update Statistics Structure
- Modified the Reject method in the TenderApproval entity to reset the SubmissionMode field upon rejection, ensuring proper state management.
- Simplified the TenderApprovalStatsResponse and CompanyTenderApprovalStatsResponse structures by removing unnecessary fields related to submission modes, streamlining the data model for tender approval statistics.
- Updated the GetTenderApprovalStats and GetCompanyTenderApprovalStats methods in the repository to reflect the changes in the statistics structure, enhancing clarity and maintainability.
- These adjustments improve the overall functionality and data handling of the tender management system.
2025-08-25 13:39:28 +03:30
n.nakhostin 531f8e2baf Enhance TenderResponse Structure with TenderID Field
- Added a new field 'TenderID' to the TenderResponse structure, improving the data model for tender management.
- Updated the ToTenderResponse method to include the TenderID in the response, ensuring consistency in API outputs.
- This enhancement aligns with the ongoing improvements to the tender management system's data handling capabilities.
2025-08-25 13:23:47 +03:30
n.nakhostin f67e179ffc Update .gitignore, adjust TED scraper configuration, and enhance Tender entity structure
- Added 'ted_samples/' to .gitignore to exclude TED sample files from version control.
- Updated the TED scraper configuration to extend the cleanup duration from 24 hours to 72 hours, allowing for better resource management.
- Enhanced the Tender entity by adding new fields: TenderDeadline, SubmissionDeadline, ApplicationDeadline, and SubmissionURL, improving the data model for tender management.
- Updated the TenderResponse structure to include the new fields, ensuring consistency in API responses.
- Implemented logic in the TED scraper to calculate submission and application deadlines based on tender deadlines, enhancing the scraping functionality.
2025-08-25 13:13:40 +03:30