100 Commits

Author SHA1 Message Date
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
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
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
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
barsa
9740814c10 Refactor integration services to utilize updated import paths from the domain package, enhancing type safety and maintainability. Replace direct imports with provider methods for Freebit and WHMCS services, streamlining data transformation processes. Update various service files to reflect new structure and improve organization across the application. 2025-10-03 15:05:46 +09:00
barsa
faea4a6f29 Refactor ESLint configuration to enforce layered type system architecture, preventing direct imports from domain and contracts package internals. Update TypeScript configurations in BFF and Portal applications to align with new import paths. Enhance integration services by dynamically importing and validating schemas, improving type safety and maintainability. Update documentation to reflect the new architecture and integration patterns. 2025-10-03 14:26:55 +09:00
barsa
cdec21e012 Refactor authentication module by removing the deprecated AuthAdminController and related token migration services. Update AuthModule to streamline dependencies and enhance structure. Adjust imports in various services and controllers for improved maintainability. Revise documentation to reflect the removal of admin endpoints and clarify the new authentication setup. 2025-10-02 18:35:26 +09:00
barsa
d04e343161 Remove OpenAPI generation and related scripts from the BFF. Transition to a Zod-based validation approach for API requests and responses, enhancing type safety and consistency. Update package.json to reflect the removal of OpenAPI dependencies and streamline type generation processes. Revise documentation to clarify the new structure and usage of shared Zod schemas from the domain package. Refactor various controllers and services to eliminate OpenAPI references and integrate Zod validation, improving overall code maintainability. 2025-10-02 17:19:39 +09:00
barsa
a4e6ba73de Refactor authentication module to improve structure and maintainability. Introduce AuthFacade for streamlined access to authentication services, and reorganize controllers, guards, and strategies into a clearer directory structure. Remove deprecated auth-zod.controller.ts and consolidate token management services. Update environment variables and documentation to reflect changes in the authentication setup. Enhance validation with Zod integration for improved data handling across endpoints. 2025-10-02 16:33:25 +09:00
barsa
14b0b75c9a Implement WhmcsCurrencyService for currency handling in WHMCS integration. Add currency retrieval methods in WhmcsApiMethodsService and WhmcsConnectionOrchestratorService. Update InvoiceTransformerService and SubscriptionTransformerService to utilize the new currency service for improved invoice and subscription data processing. Enhance WhmcsProduct type definitions to support optional currency fields. Refactor related components for better currency management and display. 2025-09-29 13:36:40 +09:00
barsa
e339f20ef5 Refactor project structure by removing deprecated .editorconfig and compose-plesk.yaml files, and updating paths in documentation. Introduce new .editorconfig and prettier.config.js files in the config directory for improved code style consistency. Update API paths in portal components for clarity and consistency, enhancing maintainability across services. Add tsx dependency in package.json and update pnpm-lock.yaml accordingly. 2025-09-27 16:59:25 +09:00
barsa
b6c77b5b75 Remove deprecated environment configuration files and clean up documentation related to Zod implementation. Update pnpm-lock.yaml for consistency in package versions. Refactor BFF and portal components to enhance type consistency, error handling, and maintainability across various services. Streamline import paths and remove unused code to improve overall project organization. 2025-09-26 18:28:47 +09:00
barsa
f4b8c0f324 Refactor ESLint configuration to enforce stricter TypeScript rules across all packages. Update design documentation to clarify component categorization and address legacy issues. Enhance task documentation for codebase refactoring, ensuring clear requirements and testing coverage. Improve Dockerfile for BFF and portal applications by optimizing package copying and build processes. Introduce new environment variables for authentication and queue configurations, enhancing service reliability and maintainability. 2025-09-26 17:02:36 +09:00
barsa
ac61dd1e17 Update pnpm-lock.yaml to add '@next/bundle-analyzer' and 'webpack-bundle-analyzer' dependencies. Modify nest-cli.json to prevent deletion of output directory during build. Enhance package.json scripts for development and clean commands. Refactor distributed-transaction.service.ts and transaction.service.ts for improved error handling and logging consistency. Update queue-health.controller.ts and csrf.controller.ts for better API documentation. Clean up whitespace and formatting across various files for improved readability. 2025-09-26 16:30:00 +09:00
barsa
4b877fb3e0 Update .gitignore to exclude package-lock.json and remove eslint-report.json. Refactor package.json scripts for build and dev processes, and update dependencies for uuid and @types/uuid. Enhance BFF module structure by adding SecurityModule and QueueModule, and improve error handling in GlobalExceptionFilter. Streamline Salesforce and WHMCS integrations with updated service methods and type definitions for better maintainability. Adjust API paths in portal components for consistency and clarity. 2025-09-26 15:51:07 +09:00
barsa
c5de063a3e Refactor portal components and services for improved structure and consistency. Replace DashboardLayout with AppShell in authenticated pages, streamline loading states by removing deprecated components, and enhance validation imports across various forms. Update type definitions and clean up unused code to ensure better maintainability and adherence to the new design system. 2025-09-25 15:11:28 +09:00
T. Narantuya
60f328269a Refactor authentication and billing components to streamline functionality and improve code organization. Remove deprecated files and consolidate loading states across the application. Update package configurations and enhance error handling in various services for better consistency and maintainability. 2025-09-20 11:35:40 +09:00
T. Narantuya
f662c3eb45 Refactor AuthZodController to AuthController, enhancing login and password set functionalities with throttling and improved response handling. Update AuthModule to reflect controller name change and add new services. Refine AuthService to return sanitized user data and improve error logging. Enhance AuthThrottleGuard to track login attempts by IP and User Agent for better security. Clean up unused JWT guard and streamline token management in AuthTokenService. 2025-09-19 17:37:46 +09:00
NTumurbars
e9acbd899c refactor: layer portal routes through feature modules 2025-09-18 16:39:57 +09:00
NTumurbars
d34e140193 chore: temporarily disable cases and jobs modules 2025-09-18 15:18:44 +09:00
T. Narantuya
a95ec60859 Refactor address management and update related services for improved clarity and functionality
- Updated address retrieval in user service to replace billing info with a dedicated address method.
- Adjusted API endpoints to use `PATCH /api/me/address` for address updates instead of billing updates.
- Enhanced documentation to reflect changes in address management processes and API usage.
- Removed deprecated types and services related to billing address handling, streamlining the codebase.
2025-09-17 18:43:43 +09:00
T. Narantuya
bef5abcbda Refactor Freebit service and update SIM management components for improved clarity and functionality
- Consolidated and cleaned up type definitions in Freebit service interfaces for better readability.
- Enhanced error handling and logging in Freebit service methods to provide clearer feedback.
- Updated SIM management pages to streamline user interactions and improve UI components.
- Removed deprecated subscription detail page and restructured routing for better navigation.
- Added new notice and info row components in SIM cancellation page for improved user experience.
2025-09-11 16:21:54 +09:00
T. Narantuya
db98311b8e Add .env backup file for development configuration and update .gitignore
- Created a new .env backup file for the development environment, providing essential configurations for database, Redis, and application settings.
- Updated .gitignore to exclude API documentation containing sensitive details.
- Refactored token-blacklist service error handling to simplify catch block.
- Adjusted Freebit API configuration validation to reflect updated base URL.
- Enhanced email service interfaces to allow optional 'from' field.
- Improved order orchestrator service to include additional fields in SOQL query.
- Added new SIM order activation service and controller for managing SIM activations.
- Updated subscriptions module to include new services and controllers for SIM management.
- Enhanced error handling in SIM management service for better user feedback.
- Refactored various components in the portal for improved user experience and consistency.
2025-09-11 15:03:08 +09:00
T. Narantuya
0bf872e249 Refactor code formatting and improve documentation clarity
- Adjusted YAML and JSON files for consistent formatting, including healthcheck commands and package exports.
- Enhanced readability in various TypeScript files by standardizing string quotes and improving line breaks.
- Updated documentation across multiple files to improve clarity and consistency, including address system and logging levels.
- Removed unnecessary package-lock.json from shared package directory to streamline dependencies.
2025-09-09 18:19:54 +09:00
tema
425ef83dba Update SIM management service and UI components for Freebit API compliance
- Adjusted quota validation in SimManagementService to enforce limits of 100MB to 51200MB for Freebit API compatibility.
- Updated cost calculation to round up GB usage for billing, ensuring accurate invoice generation.
- Modified top-up modal and related UI components to reflect new limits of 1-50 GB, aligning with Freebit API constraints.
- Enhanced documentation to clarify pricing structure and API data flow adjustments.
2025-09-09 15:40:13 +09:00
tema
5a0c5272e0 Update SIM management calculations and configurations
- Changed the base URL for Freebit API in environment validation to the new test URL.
- Updated data usage calculations in SimManagementService and related components to use 1000 instead of 1024 for MB to GB conversions.
- Adjusted the top-up modal and related components to reflect the new GB input method and validation rules.
- Enhanced documentation to align with the updated API and usage metrics.
2025-09-06 17:02:20 +09:00
T. Narantuya
7e053a666c Add sharp library for image processing and enhance provisioning logic
- Added sharp library to package.json for image manipulation capabilities.
- Updated pnpm-lock.yaml to include sharp dependency.
- Enhanced HealthController to include provisioning queue job counts in health checks.
- Improved error handling and logging in ProvisioningProcessor for better diagnostics.
- Refactored order fulfillment validation to utilize new WhmcsPaymentService for payment method checks.
- Updated documentation to reflect changes in the provisioning workflow and added new integration overview.
2025-09-06 13:58:54 +09:00
tema
ac259ce902 Enhance SIM management service with payment processing and API integration
- Implemented WHMCS invoice creation and payment capture in SimManagementService for top-ups.
- Updated top-up logic to calculate costs based on GB input, with pricing set at 500 JPY per GB.
- Simplified the Top Up Modal interface, removing unnecessary fields and improving user experience.
- Added new methods in WhmcsService for invoice and payment operations.
- Enhanced error handling for payment failures and added transaction logging for audit purposes.
- Updated documentation to reflect changes in the SIM management flow and API interactions.
2025-09-06 13:57:18 +09:00
NTumurbars
781e4c9b6a
Merge branch 'main' into Tema-v1 2025-09-06 10:05:23 +09:00
T. Narantuya
f305ee6e1a Implement Salesforce Platform Events for Order Provisioning
- Added support for Salesforce Platform Events, specifically subscribing to `OrderProvisionRequested__e` to trigger provisioning jobs.
- Introduced new environment variables for Salesforce event configuration, including SF_EVENTS_ENABLED, SF_PROVISION_EVENT_CHANNEL, and SF_PUBSUB_ENDPOINT.
- Refactored order fulfillment process to utilize event-driven architecture, enhancing reliability and scalability.
- Updated documentation to reflect changes in the provisioning workflow and environment variable requirements.
- Removed deprecated webhook handling code to streamline the integration.
2025-09-06 10:01:44 +09:00
tema
9d4505d6be Refactor SIM management components and enhance user experience
- Updated CatalogPage and SimPlansPage to improve descriptions and layout for better clarity.
- Removed unused SignalIcon from CatalogPage.
- Enhanced ChangePlanModal to allow selection of new plans with improved validation and user feedback.
- Updated SimActions to handle navigation and contextual information for actions.
- Improved SimDetailsCard to format current plan codes for better readability.
- Enhanced SimFeatureToggles to support embedded rendering and streamlined service options management.
- Refactored SimManagementSection layout for better organization of SIM details and actions.
2025-09-05 18:22:55 +09:00
tema
735828cf32 Implement SIM features update functionality and enhance UI components
- Added new SimFeaturesUpdateRequest interface to handle optional SIM feature updates.
- Implemented updateSimFeatures method in SimManagementService to process feature updates including voicemail, call waiting, international roaming, and network type.
- Expanded SubscriptionsController with a new endpoint for updating SIM features.
- Introduced SimFeatureToggles component for managing service options in the UI.
- Enhanced DataUsageChart and SimDetailsCard components to support embedded rendering and improved styling.
- Updated layout and design for better user experience in the SIM management section.
2025-09-05 15:39:43 +09:00
tema
d9f7c5c8b2 Enhance Freebit SIM management features and UI components
- Added optional service features to SimDetails interface: voiceMailEnabled, callWaitingEnabled, internationalRoamingEnabled, and networkType.
- Updated FreebitService to include new service feature flags based on SIM data.
- Enhanced SimDetailsCard component to display service features for eSIMs, including voice mail, call waiting, international roaming, and network type.
- Improved conditional rendering for optional fields in SimDetailsCard.
- Updated SimActions component with an ID for better accessibility.
2025-09-05 12:30:57 +09:00
tema
9e552d6a21 Enhance SIM management features and order details
- Added new environment variables for Freebit API configuration in env.validation.ts.
- Updated OrderOrchestrator to include unit price, total price, and billing cycle in order item details.
- Expanded SubscriptionsController with new SIM management endpoints for debugging, retrieving details, usage, top-ups, plan changes, cancellations, and eSIM reissues.
- Integrated SimManagementService into SubscriptionsModule and SubscriptionsController.
- Updated OrdersPage and SubscriptionDetailPage to display additional order item information and conditionally render SIM management sections.
2025-09-04 18:34:28 +09:00
T. Narantuya
ece6821766 Enhance Salesforce order fulfillment process and security measures
- Updated PLESK_DEPLOYMENT.md to include new Salesforce credentials and webhook security configurations.
- Refactored order fulfillment controller to streamline the process and improve readability.
- Introduced EnhancedWebhookSignatureGuard for improved HMAC signature validation and nonce management.
- Updated various documentation files to reflect changes in endpoint naming from `/provision` to `/fulfill` for clarity and consistency.
- Enhanced Redis integration for nonce storage to prevent replay attacks.
- Removed deprecated WebhookSignatureGuard in favor of the new enhanced guard.
2025-09-04 14:17:54 +09:00
T. Narantuya
98f998db51 Refactor code for improved readability and maintainability
- Simplified import statements in auth.controller.ts and consolidated DTO imports.
- Streamlined accountStatus method in AuthController for better clarity.
- Refactored error handling in AuthService for existing mapping checks and password validation.
- Cleaned up whitespace and formatting across various files for consistency.
- Enhanced logging configuration in logging.module.ts to reduce noise and improve clarity.
- Updated frontend components for better formatting and readability in ProfilePage and SignupPage.
2025-09-02 16:09:17 +09:00
T. Narantuya
0f7d680782 Update throttler configuration and enhance logging setup
- Adjusted authentication rate limit TTL from 15 minutes to 10 minutes for stricter control.
- Improved logging configuration to reduce noise by ignoring specific HTTP requests and customizing serializers.
- Refactored logging in checkout components to utilize useCallback for better performance and removed unnecessary console logs.
2025-09-01 18:47:30 +09:00
tema
cc3ace04e4 Enhance WHMCS payment methods testing and logging
- Improved `testPaymentMethods` endpoint in InvoicesController for better client ID testing.
- Enhanced `testWhmcsPaymentMethods` method in InvoicesService with improved logging and error handling.
- Updated `getPaymentMethods` in WhmcsPaymentService to bypass cache and improve debugging.
- Refined payment method transformation in WhmcsDataTransformer for better API response handling.
- Added detailed debug information in Checkout and AddressConfirmation components for troubleshooting.
2025-08-30 15:45:22 +09:00
tema
1640fae457 Add new payment methods and health check endpoints in Auth and Invoices services
- Introduced `validateSignup` endpoint in AuthController for customer number validation during signup.
- Added `healthCheck` method in AuthService to verify service integrations and database connectivity.
- Implemented `getPaymentMethods`, `getPaymentGateways`, and `refreshPaymentMethods` endpoints in InvoicesController for managing user payment options.
- Enhanced InvoicesService with methods to invalidate payment methods cache and improved error handling.
- Updated currency handling across various services and components to reflect JPY as the default currency.
- Added new dependencies in package.json for ESLint configuration.
2025-08-30 15:10:24 +09:00
T. Narantuya
4f087d5c4c Enhance order processing and address management across components
- Updated pnpm-lock.yaml to include new dependencies and ensure consistent package versions.
- Refactored order handling in OrderOrchestrator to utilize centralized field mapping for Salesforce queries.
- Modified SalesforceOrder interface to replace Order_Type__c with Type for clarity.
- Improved error handling in UsersService during WHMCS updates to provide user-friendly messages.
- Enhanced BillingPage and ProfilePage components to streamline address management and improve user experience.
- Updated documentation to reflect changes in address handling and system architecture.
2025-08-29 14:05:33 +09:00
T. Narantuya
2eb7cc6314 catalog page consistency fix 2025-08-28 16:57:57 +09:00
T. Narantuya
47d831796c catalog fixed 2025-08-27 20:01:46 +09:00
T. Narantuya
94e1625b78 order fix 2025-08-27 10:54:05 +09:00
T. Narantuya
111bbc8c91 Add email functionality and update environment configurations
- Introduced email configuration for both development and production environments in `.env.dev.example` and `.env.production.example`.
- Added SendGrid API key and email settings to support password reset and welcome emails.
- Implemented password reset and request password reset endpoints in the AuthController.
- Enhanced signup form to include additional fields such as Customer Number, address, nationality, date of birth, and gender.
- Updated various services and controllers to integrate email functionality and handle new user data.
- Refactored logging and error handling for improved clarity and maintainability.
- Adjusted Docker configuration for production deployment.
2025-08-23 17:24:37 +09:00
T. Narantuya
0c912fc04f clean up 2025-08-22 17:02:49 +09:00
T. Narantuya
43aabc7b61 structure changes 2025-08-21 15:24:40 +09:00
T. Narantuya
80580da46d Initial Customer Portal setup - production ready 2025-08-20 18:02:50 +09:00