209 Commits

Author SHA1 Message Date
barsa
67691a50b5 Refactor WHMCS service and improve address handling
- Updated WHMCS service to utilize addressSchema for client address retrieval, enhancing data validation.
- Cleaned up imports in WHMCS client service for better organization.
- Improved logging format in WHMCS subscription service for clearer output.
- Streamlined address handling in order builder service for consistency.
- Enhanced code readability by formatting JSX elements in ProfileContainer and other components.
- Removed deprecated billing cycle normalization logic and centralized it in the domain helpers for better maintainability.
2025-11-04 11:14:26 +09:00
barsa
0a3d5b1e3c Refactor WHMCS service methods and improve type handling
- Updated WHMCS service methods to return normalized product types, enhancing type consistency across services.
- Refactored product retrieval logic in WhmcsPaymentService and WhmcsService to streamline data handling.
- Removed deprecated utility functions and optimized custom field handling in WHMCS-related services.
- Enhanced error handling in subscription processing to improve reliability and clarity.
- Cleaned up imports and improved overall code organization for better maintainability.
2025-10-29 18:59:17 +09:00
barsa
26b2112fbb Refactor WHMCS client handling and improve type consistency across services
- Updated WHMCS service methods to return WhmcsClient type instead of NormalizedWhmcsClient for better alignment with domain types.
- Refactored caching logic in WhmcsCacheService to utilize WhmcsClient, enhancing type safety and consistency.
- Simplified client detail retrieval in WhmcsClientService by directly using the transformed WhmcsClient response.
- Removed deprecated utility functions and streamlined custom field normalization logic in whmcs-client.utils.ts.
- Enhanced user profile mapping in UsersService to utilize combineToUser for improved clarity and maintainability.
- Cleaned up unused imports and optimized address handling in various components for better performance.
2025-10-29 18:36:25 +09:00
barsa
05765d3513 Enhance session management and error handling in authentication components
- Added a new error mapping for "SESSION_EXPIRED" in SecureErrorMapperService to provide user-friendly messages and appropriate logging levels.
- Updated SessionTimeoutWarning component to include a reason for logout when the session expires, improving user feedback.
- Refactored useAuth hook to support enhanced logout functionality with reason options, ensuring better session management.
- Improved auth.store to handle logout reasons and integrate with error handling for session refresh failures.
- Streamlined LoginView to display logout messages based on session expiration, enhancing user experience.
2025-10-29 18:19:50 +09:00
barsa
749f89a83d Refactor rate limiting configuration and enhance UI components for improved performance
- Updated rate limiting TTL values in env.validation.ts and throttler.config.ts to reduce response times and improve request handling.
- Adjusted throttle settings in AuthController, CatalogController, and OrdersController to align with new rate limits, enhancing overall API responsiveness.
- Refactored OrderCard and OrderCardSkeleton components for better loading states and visual consistency.
- Improved AddressForm and ServiceConfigurationStep components for better state management and user experience.
- Streamlined CSS styles in globals.css and responsive.css for better maintainability and clarity.
2025-10-29 15:54:45 +09:00
barsa
2611e63cfd Enhance caching and response handling in catalog and subscriptions controllers
- Added Cache-Control headers to various endpoints in CatalogController and SubscriptionsController to improve caching behavior and reduce server load.
- Updated response structures to ensure consistent caching strategies across different API endpoints.
- Improved overall performance by implementing throttling and caching mechanisms for better request management.
2025-10-29 13:29:28 +09:00
barsa
0c904f7944 Refactor CardBadge and InternetPlanCard components for improved styling and functionality
- Updated CardBadge to support additional size options and enhanced styling for better visual consistency.
- Refactored InternetPlanCard to utilize the new CardBadge size options and improved layout for badge display.
- Enhanced state management in InternetPlanCard to utilize Zustand for better performance and maintainability.
- Streamlined rendering logic in InternetConfigureContainer for improved step transitions and user experience.
- Updated catalog utility functions to remove deprecated filtering and sorting methods, focusing on server-side handling.
2025-10-28 15:55:46 +09:00
barsa
9f8d5fe4f1 Enhance error handling and response structure across filters and services
- Updated error response structures in AuthErrorFilter, HttpExceptionFilter, and ZodValidationExceptionFilter to include detailed information such as timestamp and request path.
- Replaced generic error messages with domain-specific exceptions in Freebit and WHMCS services to improve clarity and maintainability.
- Improved logging and error handling in various services to provide better context for failures and enhance debugging capabilities.
- Refactored JWT strategy to include explicit expiration checks for improved security and user feedback.
2025-10-28 13:43:45 +09:00
barsa
5dedc5d055 Update implementation progress and enhance error handling across services
- Revised implementation progress to reflect 75% completion of Phase 1 (Critical Security) and 25% of Phase 2 (Performance).
- Added new performance fix for catalog response caching using Redis.
- Enhanced error handling by replacing generic errors with domain-specific exceptions in Salesforce and WHMCS services.
- Implemented throttling in catalog and orders controllers to manage request rates effectively.
- Updated various services to utilize caching for improved performance and reduced load times.
- Improved logging for better error tracking and debugging across the application.
2025-10-27 17:24:53 +09:00
barsa
7500b5fce0 Enhance security and refactor order processing for improved reliability
- Implemented Redis-backed idempotency keys in SIM activation to prevent race conditions and double-charging.
- Increased bcrypt hashing rounds from 12 to 14 for stronger password security.
- Introduced a structured exception hierarchy to replace generic errors with domain-specific exceptions.
- Centralized Internet Access Mode constants and improved schema organization by extracting duplicated enum values.
- Updated various components to utilize new domain types for better consistency and maintainability.
- Enhanced error handling in SIM fulfillment and order activation processes to provide clearer feedback and prevent duplicate processing.
2025-10-27 16:53:19 +09:00
barsa
d04b256885 Update documentation and remove unused files for codebase clarity
- Refreshed CODEBASE_ANALYSIS.md to reflect the new ownership model and improve onboarding documentation.
- Deleted obsolete VALIDATION_DUPLICATION_REPORT.md to streamline the codebase.
- Made minor adjustments to various components and services for better organization and clarity.
2025-10-27 15:47:50 +09:00
barsa
31bd4ba8c6 Refactor InternetPlanCard and InternetConfigureContainer for improved UI and feature display
- Enhanced InternetPlanCard to better format plan names and display features dynamically.
- Updated InternetConfigureContainer to include a back button and improved plan header presentation.
- Refactored ServiceConfigurationStep to enhance the display of important information for Platinum subscribers and improve access mode selection.
- Streamlined styling and layout across components for better visual consistency and user experience.
2025-10-22 18:00:54 +09:00
barsa
aaabb795c1 Integrate authentication checks in billing hooks and enhance UI components
- Added authentication checks in useInvoices, useInvoice, and usePaymentMethods hooks to ensure data fetching only occurs for authenticated users.
- Updated usePaymentRefresh to prevent refresh actions when the user is not authenticated.
- Refactored AddressConfirmation component to improve button layout and accessibility.
- Enhanced InternetPlanCard to format plan names for clearer presentation.
- Streamlined InternetConfigureContainer and related components to utilize Zustand for state management, improving code clarity and maintainability.
- Updated SimConfigureView to simplify step transitions and improve user experience.
2025-10-22 16:52:07 +09:00
barsa
b3086a5593 Enhance UI components and improve accessibility across catalog features
- Updated AddonGroup to include transition effects for better user experience.
- Refactored AddressConfirmation to streamline button layout and improve accessibility.
- Enhanced FeatureCard and ServiceHeroCard with updated styling and layout for consistency.
- Improved InstallationOptions to support better pricing display and accessibility features.
- Refactored InternetConfigureView to utilize props for cleaner state management.
- Updated various components to improve responsiveness and visual clarity.
- Enhanced error handling and logging in checkout processes for better user feedback.
2025-10-22 16:10:42 +09:00
barsa
67bad7819a Refactor InstallationOptions component to simplify logic and improve accessibility
- Removed unused functions for cleaning up the codebase.
- Updated installation description handling for better clarity and user experience.
- Enhanced button accessibility with aria-pressed attribute and improved styling.
- Streamlined price display logic for clearer presentation of payment options.
2025-10-22 14:58:54 +09:00
barsa
da91a51323 Refactor internet and SIM plan components for improved UI and functionality
- Removed unused imports and components for cleaner code.
- Updated styling and layout in InternetPlanCard for better visual consistency.
- Introduced CatalogBackLink for navigation in InternetConfigureContainer and SimConfigureView.
- Enhanced loading states and error handling in InternetPlans and SimPlans views.
- Improved button interactions and accessibility in ActivationForm and SimConfigureView.
- Streamlined plan display logic and added dynamic features in various components.
2025-10-22 14:36:51 +09:00
barsa
3d17f36c2f Refactor audit and signup workflows to streamline user data handling
- Removed unnecessary fields (firstName, lastName, company, phone) from user creation in AuditService and SignupWorkflowService for cleaner data management.
- Enhanced error logging in GlobalAuthGuard to differentiate between unauthorized access attempts and other authentication errors.
- Updated CurrencyController to mark endpoints as public for improved access control.
- Improved button components across various steps in the internet and SIM configuration processes for better user experience and consistency.
- Added active internet subscription warning in checkout process to prevent duplicate subscriptions.
2025-10-22 14:19:31 +09:00
barsa
e56d6f5e20 Refactor user creation and improve type safety in services
- Removed unnecessary fields from user creation in WhmcsLinkWorkflowService for cleaner data handling.
- Updated logout method in AuthController to ensure proper request type casting.
- Enhanced type safety in MappingsService by refining type filters for existing mappings.
- Improved currency resolution logic in UsersService for better handling of client currency codes.
- Streamlined product filtering and sorting logic in catalog utilities for improved readability and performance.
- Refactored InternetPlans component to simplify memoization of plans.
- Cleaned up state management in useCheckout hook by removing unused state variables.
- Enhanced checkout service to improve API request structure and error handling.
- Updated response helpers to streamline success response construction.
2025-10-22 11:55:47 +09:00
barsa
fcd324df09 Refactor Salesforce utility and improve order handling in checkout process
- Imported salesforceIdSchema and nonEmptyStringSchema from the common domain for better consistency.
- Simplified the creation of SOQL field name validation schema.
- Refactored the InvoiceTable component to utilize useCallback for improved performance.
- Streamlined payment method handling in the PaymentMethodCard component by removing unused props.
- Enhanced the checkout process by integrating new validation schemas and improving cart handling logic.
- Updated various components to ensure better type safety and clarity in data handling.
2025-10-22 11:33:23 +09:00
barsa
e5ce4e166c Refactor mappers and services for improved type safety and code clarity
- Updated export statements in user and mapping mappers for consistency.
- Enhanced FreebitAuthService to explicitly define response types for better type inference.
- Refactored various services to improve error handling and response structure.
- Cleaned up unused code and comments across multiple files to enhance readability.
- Improved type annotations in invoice and subscription services for better validation and consistency.
2025-10-22 10:58:16 +09:00
barsa
6567bc5907 Enhance TypeScript configurations and improve error handling in services
- Updated tsconfig.json to include test files for better type checking.
- Refined type annotations in FreebitAuthService for improved clarity and type safety.
- Enhanced currency index extraction logic in WhmcsCurrencyService for better type inference.
- Improved utility functions in whmcs-client.utils.ts to handle various value types more robustly.
- Simplified user creation logic in WhmcsLinkWorkflowService by removing unnecessary type conversions.
- Updated RequestWithCookies type in auth.controller.ts and global-auth.guard.ts to allow optional cookies.
- Refactored OrderFulfillmentOrchestrator to utilize a more specific mapping result type for better type safety.
- Added error logging enhancements in UsersService for improved traceability.
- Updated catalog contract tests to ensure response validation aligns with new schemas.
- Improved InvoiceTable component to handle payment and download actions more cleanly.
2025-10-22 10:23:56 +09:00
barsa
e42d474048 Enhance Salesforce query builders and validation for SOQL field names
- Updated the product query builder to accept a dynamic category field, improving flexibility in SOQL queries.
- Introduced a new utility function to validate SOQL field names, ensuring safe inclusion in queries.
- Refactored catalog service queries to utilize the new category field validation.
- Enhanced the SIM catalog controller to return structured data, improving response consistency.
- Updated various components to reflect changes in pricing display logic, ensuring accurate representation of plan costs.
2025-10-21 18:24:47 +09:00
barsa
82bb590023 Refactor subscriptions controller and service to enhance validation and error handling
- Introduced a new pagination schema for subscription invoices to improve query validation.
- Updated the subscriptions controller to utilize the new schema for invoice queries, ensuring better data integrity.
- Enhanced error handling in the subscriptions service by replacing generic error messages with specific BadRequestException for invalid subscription IDs.
- Refactored WHMCS raw types to implement normalization functions for better data validation and consistency.
2025-10-21 17:52:23 +09:00
barsa
7cefee4c75 Update .gitignore and enhance CSRF controller and WHMCS services
- Added exceptions to .gitignore for the portal public directory to ensure proper asset management.
- Marked CSRF token retrieval and refresh endpoints as public for improved access control.
- Refactored WHMCS invoice service to enhance error logging and processing of invoice records.
- Updated WHMCS raw types to introduce a common schema for invoices, improving data consistency and validation.
- Enhanced Salesforce order item transformation to streamline billing cycle handling.
2025-10-21 16:30:52 +09:00
barsa
cff6c21bae Add CurrencyModule to router configuration and enhance WHMCS subscription service response handling
- Integrated CurrencyModule into the API routes for improved currency management.
- Updated WHMCS subscription service to utilize a new response schema for better error handling and data normalization.
- Refactored address and profile API endpoints in account service to use consistent API paths.
- Introduced normalization functions for WHMCS product response types to enhance data integrity.
2025-10-21 14:41:22 +09:00
barsa
afa0c5306b Enhance user and address handling by normalizing country data and improving address form functionality. Updated country selection in forms to utilize a dynamic list of countries, ensuring consistency and accuracy. Refactored address processing logic to normalize country codes and names, enhancing user experience and data integrity across the application. 2025-10-21 13:44:14 +09:00
barsa
2de2e8ec8a Refactor SIM management services to unify SIM info retrieval and enhance type safety. Updated getSimInfo methods across services and controllers to return a structured SimInfo type, improving data consistency. Integrated validation schemas for better error handling and streamlined response parsing in API calls. 2025-10-21 13:21:03 +09:00
barsa
939922a40e Refactor order and subscription services to enhance validation and type safety. Updated order validation to use new SKU validation schema, improved SIM reissue profile handling by integrating a structured request object, and refined subscription fetching logic to utilize updated schemas. Additionally, enhanced error handling and logging for better traceability in service operations. 2025-10-21 11:44:06 +09:00
barsa
7ffd2d562f Remove Activation_Last_Attempt_At__c field from Salesforce order schema and related utility functions to streamline order data structure. Update buildInClause function to format output with parentheses for improved query syntax. 2025-10-21 10:19:30 +09:00
barsa
8a90003075 Refactor WHMCS client handling to improve type safety and address management. Updated methods in WhmcsService and WhmcsClientService to return NormalizedWhmcsClient type, enhancing consistency. Simplified address retrieval logic and improved caching mechanisms in WhmcsCacheService. Additionally, introduced utility functions for custom field handling in WHMCS integration workflows, ensuring better data management and clarity. 2025-10-20 16:26:47 +09:00
barsa
d041831434 Add @customer-portal/domain dependency to portal and configure transpilation 2025-10-20 14:56:28 +09:00
barsa
7420b77202 Enhance WHMCS currency handling by adding fallback logic and improving response parsing. Updated WhmcsCurrencyService to check WHMCS availability before loading currencies, and refactored currency response handling to support both nested and flat formats. Additionally, added address management endpoints in UsersController and UsersService for better customer address handling. Updated TypeScript and package dependencies for improved compatibility. 2025-10-20 14:54:04 +09:00
barsa
0a2cafed76 Refactor currency formatting across multiple components to utilize the new useFormatCurrency hook. This change enhances consistency in currency display and improves maintainability by centralizing currency formatting logic. Updated relevant components to ensure they correctly format amounts with the appropriate currency symbol. 2025-10-20 14:01:29 +09:00
barsa
0233ff2dce Enhance catalog and order handling by integrating new currency formatting and validation utilities. Updated various components to utilize the centralized currency formatting function, ensuring consistent display across the application. Refactored order creation and validation processes to improve clarity and maintainability, aligning with the updated domain structure. 2025-10-20 13:53:35 +09:00
barsa
75d199cb7f Refactor pricing calculations across catalog components to directly utilize monthly and one-time price properties, enhancing clarity and maintainability. Removed deprecated pricing utility functions and streamlined price handling in various components, ensuring consistent pricing logic throughout the application. 2025-10-09 12:03:58 +09:00
barsa
e6548e61f7 Refactor user profile handling to standardize field names across the application. Updated currency and name fields to use consistent camelCase naming conventions, enhancing clarity and maintainability. Adjusted import paths for address and profile types to align with the new domain structure, ensuring improved organization and type safety throughout the codebase. 2025-10-09 10:49:03 +09:00
barsa
57985d95a6 Update TypeScript configuration across multiple files to enhance compatibility and maintainability. Changed target to ES2023, adjusted module settings, and refined path mappings. Removed unnecessary options and streamlined build configurations, ensuring a cleaner and more efficient setup for the application. 2025-10-08 18:48:14 +09:00
barsa
7b7d736aaf Refactor module type settings and import paths across the application to enhance consistency and maintainability. Changed package types from 'module' to 'commonjs' in package.json files, updated TypeScript configuration for module resolution, and streamlined import paths by removing file extensions. This improves clarity and aligns with the updated module structure throughout the codebase. 2025-10-08 18:35:05 +09:00
barsa
5eebd11668 Update import paths across various modules to include the '.js' extension for consistency and improved clarity. This change enhances maintainability and aligns with the updated module structure throughout the application. 2025-10-08 18:24:21 +09:00
barsa
12299b5b44 Remove deprecated documentation files related to architecture, validation, and integration processes. This cleanup enhances maintainability and reduces clutter in the repository, ensuring a more streamlined development environment. 2025-10-08 18:14:12 +09:00
barsa
2e6a1c7ca2 Refactor validation architecture to eliminate redundant wrapper functions and enhance clarity. Directly utilize Zod schemas for validation in the domain and BFF layers, improving maintainability and type safety. Removed deprecated validator services and streamlined service methods to align with the new structure, ensuring a clear separation of concerns in data handling. Updated various services to reflect these changes, resulting in a more concise and efficient validation process. 2025-10-08 16:50:51 +09:00
barsa
55489cad20 Refactor WHMCS integration and user management to align with updated domain structure. Removed deprecated validation utilities and types, enhancing type safety and maintainability. Streamlined import paths and module exports for consistency, ensuring clear separation of concerns in data handling. Updated user and address management to reflect new schemas, improving validation and organization across the application. 2025-10-08 16:31:42 +09:00
barsa
b19da24edd Refactor Salesforce and WHMCS integrations to enhance type safety and maintainability by utilizing updated domain response types. Removed deprecated types and streamlined service methods to align with the new architecture. Updated import paths and module exports for consistency across the application, ensuring clear separation of concerns and improved organization in data handling. 2025-10-08 13:46:23 +09:00
barsa
cd0f5cb723 Refactor architecture to achieve 100% clean architecture by centralizing DB mappers and removing redundant transformer services. Streamlined Freebit and WHMCS integrations to utilize domain mappers directly, enhancing maintainability and consistency across all integrations. Updated documentation and module exports to reflect the new structure, ensuring clear separation of concerns and comprehensive guidance for future developers. 2025-10-08 13:03:31 +09:00
barsa
ceca1ec4af Update success criteria and to-dos in project plan, marking tasks as complete. Implement createOrder method in SalesforceOrderService for order creation. Refactor BaseCatalogService and InternetCatalogService to utilize new query builder functions for improved query management. Streamline OrderOrchestrator to leverage SalesforceOrderService for order creation, enhancing code clarity and maintainability. 2025-10-08 11:59:55 +09:00
barsa
1960cc891d Refactor Salesforce integration to implement clean architecture principles by encapsulating order operations within the new SalesforceOrderService. Removed redundant OrderWhmcsMapper and streamlined order fulfillment processes to utilize domain mappers directly, enhancing maintainability and clarity. Updated module exports and import paths to reflect the new structure, ensuring a clear separation of concerns between business logic and infrastructure. 2025-10-08 11:45:47 +09:00
barsa
e5c5f352f2 Refactor Salesforce integration by removing the SalesforceFieldMapService from various modules and updating import paths to utilize direct field references. This change enhances type safety and maintainability while streamlining data handling in order-related services and catalog modules. 2025-10-08 11:22:01 +09:00
barsa
88d58f9ac5 Refactor Salesforce integration by removing the SalesforceFieldMapService from the CoreConfigModule and updating import paths across various services to utilize the new Salesforce field configuration. This enhances type safety and maintainability while streamlining data handling in order-related services. 2025-10-08 11:11:05 +09:00
barsa
0740846560 Refactor integration services and update import paths to align with the new domain structure, enhancing type safety and maintainability. Streamline Freebit and Salesforce integration by utilizing updated provider methods and removing deprecated types. Improve organization and consistency in data handling across various modules, including catalog and billing services, by adopting new schemas and types from the updated domain package. 2025-10-08 10:33:33 +09:00
barsa
6e49b7f372 Refactor user and address handling across the application to align with the new domain structure. Update User model in Prisma schema to remove unnecessary fields and clarify authentication state. Streamline user mapping utilities to focus on authentication data only, deprecating old methods. Enhance WHMCS integration services by updating client detail retrieval methods to return Customer types, improving consistency in data handling. Update address management in various modules to reflect new address structure, ensuring better validation and organization. 2025-10-07 17:38:39 +09:00