234 Commits

Author SHA1 Message Date
barsa
ff099525ca Update SHA256 checksums, enhance BFF development scripts, and improve Salesforce connection handling
- Updated SHA256 checksums for the latest portal backend and frontend tar.gz files to reflect new builds.
- Introduced a new development script (`dev-watch.sh`) for the BFF application to streamline TypeScript building and aliasing during development.
- Refactored the `package.json` scripts in the BFF application to improve development workflow and added new watch commands.
- Enhanced the Salesforce connection service to support private key handling via environment variables, improving security and flexibility in configuration.
2025-12-12 18:44:26 +09:00
barsa
a176f5d6ce Update SHA256 checksums and enhance Dockerfile configurations
- Updated SHA256 checksums for the latest portal backend and frontend tar.gz files to reflect new builds.
- Modified Dockerfile in both BFF and Portal applications to include additional TypeScript configuration files, improving build accuracy and consistency.
- Enhanced the docker-entrypoint.sh script to utilize the updated Prisma configuration for migrations, ensuring compatibility with the latest Prisma CLI changes.
- Improved error handling in Salesforce connection service to validate private key formats more robustly, enhancing security during JWT assertion creation.
2025-12-12 16:42:54 +09:00
barsa
2266167467 Enhance JWT handling and authentication flow
- Introduced support for previous JWT secrets in the environment configuration to facilitate key rotation.
- Refactored the JoseJwtService to manage multiple signing and verification keys, improving security during token validation.
- Updated the AuthTokenService to include family identifiers for refresh tokens, enhancing session management and security.
- Modified the PasswordWorkflowService and SignupWorkflowService to return session metadata instead of token strings, aligning with security best practices.
- Improved error handling and token revocation logic in the TokenBlacklistService and AuthTokenService to prevent replay attacks.
- Updated documentation to reflect changes in the authentication architecture and security model.
2025-12-12 15:29:58 +09:00
barsa
88b9ac0a19 Enhance authentication and CSRF protection mechanisms
- Introduced optional JWT issuer and audience configurations in the JoseJwtService for improved token validation.
- Updated CSRF middleware to streamline token validation and enhance security measures.
- Added new environment variables for JWT issuer and audience, allowing for more flexible authentication setups.
- Refactored CSRF controller and middleware to improve token handling and security checks.
- Cleaned up and standardized cookie paths for access and refresh tokens in the AuthController.
- Enhanced error handling in the TokenBlacklistService to manage Redis availability more effectively.
2025-12-12 15:00:11 +09:00
barsa
3f7fa02b83 Refactor ESLint configuration and update TypeScript dependencies for improved type safety
- Enhanced ESLint configuration to better support TypeScript file patterns and added centralized dependency versions using pnpm catalogs.
- Updated TypeScript configurations across applications to utilize new file structure and improved type inference with Zod.
- Refactored domain modules to replace deprecated type inference methods, ensuring better type safety and consistency.
- Cleaned up package.json files to standardize dependency versions and improve overall project maintainability.
2025-12-12 14:50:12 +09:00
barsa
ece89de49a Update TypeScript and ESLint configurations for improved type safety and compatibility
- Modified ESLint configuration to support file patterns for TypeScript files.
- Updated TypeScript configurations across multiple applications to use ES2024 and enable composite builds.
- Refactored type inference in domain modules to utilize Zod's infer type for better type safety.
- Enhanced utility functions to handle various data types more robustly, improving overall code quality.
2025-12-12 14:35:19 +09:00
barsa
776cf3eeeb Refactor authentication module and update package dependencies
- Removed Passport.js integration from the authentication module, replacing it with a custom implementation for local and JWT authentication.
- Introduced a new `JoseJwtService` for handling JWT operations, enhancing security and flexibility.
- Updated the Dockerfile and entrypoint scripts to streamline Prisma client generation and migration commands.
- Cleaned up package.json files by removing unused dependencies and ensuring consistency across applications.
- Enhanced SFTP configuration with optional host key fingerprint for improved security.
- Updated test files to reflect changes in the authentication logic and added necessary imports for Jest.
2025-12-12 13:10:29 +09:00
barsa
5981ed941e Update security hardening and prune test/auth tooling
- Remove Passport-based auth; use jose-only guards
- Remove Jest/Istanbul toolchain and switch to node --test
- Stop runtime prisma dlx downloads; run migrations via bundled prisma
- Remove glob override and tighten Next.js config
2025-12-12 11:47:17 +09:00
barsa
8b1b402814 Update ESLint configuration and package dependencies
- Added support for Next.js ESLint plugin and React Hooks in the ESLint configuration.
- Updated package.json to include the latest versions of Next.js and related dependencies.
- Removed outdated ESLint configuration files from the BFF and Portal applications.
- Enhanced .gitignore to exclude additional TypeScript build info files.
- Cleaned up pnpm workspace configuration for better package management.
2025-12-12 11:02:59 +09:00
barsa
6e3626eff0 Enhance environment configuration and update package scripts
- Added .env.development to .gitignore for better environment management.
- Introduced new dev script in package.json for streamlined application development.
- Updated Prisma migration commands in docker-entrypoint.sh for improved schema handling.
- Enhanced logging configuration in logging.module.ts to support pretty logs based on environment.
- Refactored app.config.ts to prioritize environment file loading for better configuration management.
- Removed outdated test files and configurations to clean up the project structure.
2025-12-11 18:47:24 +09:00
barsa
0e32d4004a Remove sharp dependency and related configurations from package.json and pnpm-lock.yaml; update Prisma configuration for database connection handling and streamline database commands in BFF application. Clean up unused migration files and adjust schema.prisma to reflect recent model changes. 2025-12-11 14:00:54 +09:00
barsa
424f257bd7 Update package dependencies and refactor authentication module
- Added sharp dependency for image processing in package.json.
- Updated argon2 dependency version to 0.44.0 for enhanced security.
- Removed unused @nestjs/jwt dependency and refactored authentication module to utilize JoseJwtService for JWT handling.
- Adjusted type definitions for @types/node and @types/pg to ensure compatibility across applications.
- Cleaned up package.json files in BFF and Portal applications for consistency and improved dependency management.
2025-12-11 12:03:31 +09:00
barsa
fee93cc02b Update package dependencies for improved compatibility and consistency
- Added TypeScript, @types/node, and zod dependencies with specific versions to ensure compatibility across applications.
- Standardized dependency versions in package.json files for BFF, Portal, and Domain applications to maintain consistency.
- Removed outdated dependency specifications to streamline package management.
2025-12-11 11:49:18 +09:00
barsa
eb31fae344 Refactor authentication to use argon2 and update package dependencies
- Replaced bcrypt with argon2 for password hashing and verification in the authentication workflow, enhancing security.
- Updated JWT signing implementation to use the jose library for improved token management.
- Removed outdated bcrypt dependencies from package.json and pnpm-lock.yaml, and added argon2 and jose.
- Adjusted pnpm-workspace.yaml to reflect changes in onlyBuiltDependencies, ensuring better package management.
2025-12-11 11:38:43 +09:00
barsa
1323600978 Refactor rate limiting implementation and update package dependencies
- Removed the @nestjs/throttler package and replaced it with a custom rate limiting solution using rate-limiter-flexible for enhanced control and flexibility.
- Updated relevant controllers and services to utilize the new rate limiting approach, ensuring consistent request handling across authentication and catalog endpoints.
- Cleaned up unused throttler configuration files and guards to streamline the codebase.
- Updated package.json and pnpm-lock.yaml to reflect the removal of outdated dependencies and improve overall package management.
2025-12-11 11:25:23 +09:00
barsa
7a5cc9f028 Update @types/node dependency to 24.10.3 and adjust Docker entrypoint scripts for Prisma commands
- Updated the @types/node dependency in package.json and pnpm-lock.yaml to version 24.10.3 for improved type definitions.
- Modified Docker entrypoint scripts to use `pnpm dlx` for Prisma commands, ensuring consistency in package management.
- Updated SHA256 checksums for the latest backend and frontend tarballs to reflect recent changes.
2025-12-11 10:58:00 +09:00
barsa
718dbfcf1b Update SHA256 checksums, enhance Dockerfile for Prisma client regeneration, and improve package scripts
- Updated SHA256 checksums for the latest backend and frontend tarballs.
- Modified the Dockerfile for the BFF application to regenerate the Prisma client in the production layout, ensuring the embedded schema path is correct.
- Adjusted package scripts to use `pnpm` consistently for build and analysis commands, improving clarity and consistency across the project.
2025-12-11 10:44:21 +09:00
barsa
ce7c7773cd Refactor Dockerfiles and enhance Next.js configuration for improved build and security
- Updated Dockerfiles for BFF and Portal to optimize dependency installation and build processes, focusing on specific package filters.
- Enhanced Next.js configuration to improve security headers and Content Security Policy for development environments.
- Adjusted Docker Compose files to support dynamic image tagging for better version control.
- Cleaned up deployment scripts to include environment variable management for image tagging.
2025-12-10 18:42:33 +09:00
barsa
bc5c7c9bd4 Update package dependencies, enhance Dockerfiles, and improve workspace configuration
- Added glob dependency to package.json and pnpm-lock.yaml for better file handling.
- Updated pnpm-workspace.yaml to include additional built dependencies for improved management.
- Refactored Dockerfiles for BFF and Portal to enhance security and optimize build processes.
- Improved entrypoint scripts to include better logging and readiness checks for services.
- Cleaned up TypeScript configuration files for consistency and alignment with project standards.
2025-12-10 16:31:18 +09:00
barsa
9e27380069 Update TypeScript configurations, improve module imports, and clean up Dockerfiles
- Adjusted TypeScript settings in tsconfig files for better alignment with ESNext standards.
- Updated pnpm-lock.yaml to reflect dependency changes and improve package management.
- Cleaned up Dockerfiles for both BFF and Portal applications to enhance build processes.
- Modified import statements across various modules to include file extensions for consistency.
- Removed outdated SHA256 files for backend and frontend tarballs to streamline project structure.
- Enhanced health check mechanisms in Dockerfiles for improved application startup reliability.
2025-12-10 16:08:34 +09:00
barsa
89b495db1a Update ESLint configuration, package dependencies, and improve Prisma integration
- Refactored ESLint configuration for better clarity and organization, including updates to TypeScript rules and Next.js app settings.
- Upgraded package dependencies, including Next.js to version 16.0.8 and Prisma to version 7.1.0, enhancing performance and compatibility.
- Modified Dockerfile for BFF to reflect updated Prisma version and optimize build settings.
- Improved Prisma service to utilize PostgreSQL connection pooling with the new PrismaPg adapter, ensuring better database management.
- Cleaned up TypeScript configuration files for consistency and updated module settings to align with ESNext standards.
- Adjusted pre-commit script to streamline security audits and removed unnecessary linting during development.
2025-12-10 13:59:41 +09:00
barsa
f30dcc0608 Refactor pre-commit script and enhance Freebit integration
- Disabled linting in the pre-commit hook during active development, with a reminder to re-enable it before production.
- Simplified the import of `tsconfig-paths` in `main.ts` for better readability.
- Updated exception filter to cast status to `HttpStatus` for TypeScript compatibility.
- Refactored Freebit module imports to streamline dependency management.
- Re-exported SIM management types in Freebit API type definitions for better integration.
- Improved type handling in Freebit operations service by specifying the type for `voiceOptionsService`.
- Cleaned up unused code in SIM management service and added optional fields in SIM schema for enhanced functionality.
2025-12-10 13:38:33 +09:00
barsa
92a7e852c0 Update package dependencies and enhance workspace configuration
- Upgraded various dependencies across the project, including NestJS packages, Prisma client, and TypeScript for improved performance and features.
- Added new script commands for security audits and checks in package.json.
- Enhanced pnpm workspace configuration to include only built dependencies for better management.
- Refactored test cases to improve type handling and ensure compatibility with updated dependencies.
- Cleaned up package.json files across applications to maintain consistency and clarity in dependency management.
2025-12-10 13:38:16 +09:00
barsa
29ad4236d6 Enhance development scripts and update package dependencies
- Added a new script command `dev:studio` to facilitate studio management in development.
- Updated the Prisma dependency in BFF package to version 6.16.0 for improved features and bug fixes.
- Refactored Dockerfiles for BFF and Portal to enhance health check mechanisms during startup.
- Removed deprecated WhmcsApiMethodsService to streamline the integration services.
- Cleaned up various components and services in the SIM management module for better maintainability and clarity.
2025-12-02 18:56:38 +09:00
barsa
dc9a5d1448 Remove validation package and update Dockerfiles for BFF and Portal
- Deleted the @customer-portal/validation package to streamline dependencies.
- Updated Dockerfiles for BFF and Portal to reflect changes in package structure and optimize build processes.
- Adjusted import statements in BFF controllers to use the new Zod validation approach.
- Enhanced entrypoint script in BFF to include database and cache readiness checks before application startup.
- Cleaned up .gitignore to ignore unnecessary files and maintain clarity in project structure.
2025-12-02 11:06:54 +09:00
barsa
68561fdf1d Update pnpm-lock.yaml, Dockerfile, and error handling in BFF
- Enabled workspace package injection in pnpm-lock.yaml for improved dependency management.
- Removed outdated SHA256 files for backend and frontend tarballs.
- Refactored Dockerfile for BFF to streamline the build process and optimize production image size.
- Updated Prisma client configuration to specify binary targets for Alpine compatibility.
- Enhanced error handling in WhmcsLinkWorkflowService to use BadRequestException for clearer client feedback.
- Adjusted entrypoint script to ensure proper database migration execution.
2025-12-02 10:05:11 +09:00
barsa
f4d4cb0ab0 Update pnpm-lock.yaml, Dockerfile, and environment configurations
- Added nestjs-pino dependency to pnpm-lock.yaml for improved logging capabilities.
- Updated Dockerfile to include a custom entrypoint script for better container management.
- Modified health controllers to include @Public() decorator for public access.
- Cleaned up environment variable samples for clarity and added new variables for Freebit integration.
- Adjusted Content Security Policy in next.config.mjs to allow inline scripts/styles for Next.js compatibility.
- Refactored ReissueSimModal to specify simType during eSIM reissue requests.
2025-12-01 15:30:04 +09:00
NTumurbars
1d4891ad85
Merge branch 'main' into SIM_Tema 2025-12-01 10:22:14 +09:00
barsa
c397eb51c7 Update Dockerfile and SimDetailsCard component for compatibility and enhancements
- Updated Prisma client generation command in Dockerfile to use version 6.14.0 for consistency.
- Refactored SimDetailsCard component to improve type handling and UI elements, including re-exporting SimDetails for backwards compatibility.
- Adjusted display logic for SIM details, including changes to how plan types and service dates are presented.
- Enhanced button states in SimManagementSection for better clarity on invoice payment status.
- Added reissueEsim method in sim-actions.service for handling eSIM reissue requests.
- Introduced CatalogPriceInfo type in domain catalog for improved type definitions.
2025-12-01 10:07:58 +09:00
tema
996e3c574e Refactor duration parsing in SimCallHistoryService for improved accuracy
- Updated duration parsing logic to handle MMSST format (minutes, seconds, tenths) more effectively.
- Ensured proper handling of duration strings by padding and extracting minutes and seconds accurately.
2025-11-29 18:27:58 +09:00
tema
e02ff17217 Implement call and SMS history features in SIM management
- Added endpoints for fetching domestic and international call history, as well as SMS history.
- Introduced methods to retrieve available months for call/SMS history.
- Updated the SubscriptionsController to include new routes for call history management.
- Enhanced the SimManagementSection UI to navigate to call history.
- Improved the sim-actions service to handle call/SMS history requests and responses.
2025-11-29 18:27:58 +09:00
tema
f49e5d7574 Enhance SIM management features and introduce new cancellation and plan change flows
- Added new models and request types for enhanced SIM cancellation and plan change functionalities.
- Implemented full cancellation flow with email notifications and confirmation handling.
- Introduced enhanced plan change request with Salesforce product mapping and scheduling.
- Updated UI components for better user experience during SIM management actions.
- Improved error handling and validation for cancellation and plan change requests.
2025-11-29 18:27:58 +09:00
NTumurbars
a98740104f
Merge pull request #19 from NTumurbars/SIM_Tema
Sim tema
2025-11-26 17:06:50 +09:00
barsa
f6659e363a Enhance FreebitOperationsService to improve entry cleanup and error handling
- Updated logic to prevent cleanup of entries with a cancellation, ensuring proper handling of account states.
- Enhanced error handling to fail fast on non-404 errors, optimizing resource usage during API requests.
- Improved comments for clarity on the cleanup process and error handling behavior.
2025-11-26 17:03:31 +09:00
barsa
e228f9342f Implement stale entry cleanup in FreebitOperationsService to prevent memory leaks
- Added a method to periodically clean up stale operation timestamps, ensuring efficient memory usage.
- Introduced rate limiting for cleanup operations to minimize performance overhead.
- Enhanced the getOperationWindow method to invoke cleanup, maintaining optimal state of operation timestamps.
- Included validation to ensure at least one feature is specified during updates, improving error handling.
2025-11-26 16:58:49 +09:00
barsa
b7f6c204e2 Refactor FreebitOperationsService to enforce API constraints on voice features and network type changes
- Updated logic to prevent simultaneous updates of voice features and network type, ensuring compliance with Freebit API requirements.
- Introduced error handling to guide users on proper sequencing of operations using SimManagementQueueService.
- Improved code clarity by removing outdated comments and consolidating operation handling.
2025-11-26 16:51:54 +09:00
barsa
c7230f391a Refactor global exception handling and support case management
- Replaced multiple global exception filters with a unified exception filter to streamline error handling across the application.
- Removed deprecated AuthErrorFilter and GlobalExceptionFilter to reduce redundancy.
- Enhanced SupportController to include new endpoints for listing, retrieving, and creating support cases, improving the support case management functionality.
- Integrated SalesforceCaseService for better interaction with Salesforce data in support case operations.
- Updated support case schemas to align with new requirements and ensure data consistency.
2025-11-26 16:36:06 +09:00
barsa
46c2896935 Add endpoint not found error mapping to SecureErrorMapperService
- Introduced a new error mapping for "ENDPOINT_NOT_FOUND" with a corresponding code and public message to enhance error handling.
- Added a routing pattern to map HTTP method errors to the same "ENDPOINT_NOT_FOUND" code and message for consistent user feedback.
2025-11-25 18:31:25 +09:00
tema
5ad4089d4e Enhance SIM management features and improve UI responsiveness
- Introduced SimVoiceOptions model to manage voice-related settings for accounts.
- Added debug methods in SimDetailsService and SimOrchestratorService to fetch SIM details directly from Freebit, bypassing subscription validation for troubleshooting.
- Updated SimManagementSection and SubscriptionDetail components for improved UI with backdrop blur effects and enhanced layout.
- Integrated AuroraBackground component for a visually appealing background in SubscriptionDetail, enhancing user experience.
2025-11-22 18:11:43 +09:00
tema
9c796f59da Enhance Freebit integration and improve error handling
- Added FreebitMapperService to facilitate account normalization and improve code organization.
- Updated FreebitAuthService to streamline error handling and response parsing, replacing custom exceptions with standard error messages.
- Enhanced FreebitClientService to ensure proper URL construction and improved logging for API errors.
- Refactored FreebitOperationsService to include new request types and validation, ensuring better handling of SIM operations.
- Updated FreebitOrchestratorService to utilize the new mapper for account normalization across various methods.
- Improved SIM management features in the portal, including better handling of SIM details and usage information.
- Refactored components to enhance user experience and maintainability, including updates to the ChangePlanModal and SimActions components.
2025-11-21 18:41:14 +09:00
tema
675f7d5cfd Remove cached profile fields migration and update CSRF middleware for new public auth endpoints
- Deleted migration file that removed cached profile fields from the users table, centralizing profile data retrieval from WHMCS.
- Updated CsrfMiddleware to include new public authentication endpoints for password reset, setting password, and WHMCS account linking.
- Enhanced error handling in password and WHMCS linking workflows to provide clearer feedback on missing mappings and improve user experience.
- Adjusted user creation and update methods in UsersFacade to handle cases where WHMCS mappings are not yet available, ensuring smoother account setup.
2025-11-21 17:12:34 +09:00
barsa
c497eae763 Enhance catalog caching and pricing utilities
- Introduced a new interface, LegacyCatalogCachePayload, to improve cache handling in CatalogCacheService, allowing for better normalization of cached values.
- Updated the getDisplayPrice function to utilize a centralized price formatting utility, getCatalogProductPriceDisplay, for consistent price rendering across the application.
- Refactored order preparation logic in useCheckout to leverage a new domain helper, prepareOrderFromCart, streamlining SKU extraction and payload formatting.
- Added CatalogPriceInfo interface to standardize pricing display information across the frontend and backend.
2025-11-21 15:59:14 +09:00
barsa
dfaa1c93a8 Update dependencies in pnpm-lock.yaml and package.json for validation and tsconfig-paths
- Added '@customer-portal/validation' and 'tsconfig-paths' to the dependencies in the BFF package.json.
- Updated pnpm-lock.yaml to include new dependencies for '@customer-portal/validation', 'tsconfig-paths', and 'nestjs-zod'.
- Removed 'tsconfig-paths' from the BFF package.json to avoid duplication, ensuring a cleaner dependency management.
2025-11-19 18:06:19 +09:00
barsa
c2e9c15dab Refactor project structure and enhance documentation
- Removed the logging package from pnpm-lock.yaml to streamline dependencies.
- Updated README.md to reflect changes in the backend architecture, including new integrations and improved service descriptions.
- Enhanced Dockerfile configurations for both backend and frontend applications to ensure proper TypeScript compilation.
- Introduced Suspense boundaries in LoginView and ServiceManagementSection components for better loading states.
- Updated documentation paths in README.md to point to the new architecture directory for improved navigation.
- Improved environment variable setup instructions for clarity and completeness.
2025-11-19 17:14:36 +09:00
barsa
cdfad9d036 Enhance caching infrastructure and improve SIM management features
- Updated CacheModule and CacheService with detailed documentation and new methods for better cache management, including pattern deletion and memory usage tracking.
- Refactored CatalogCacheService and OrdersCacheService to utilize CDC-driven cache invalidation, improving data freshness and reducing unnecessary API calls.
- Introduced SIM plan options and updated related components to leverage new domain utilities for better plan management and user experience.
- Enhanced error handling and validation in TopUpModal for improved user feedback during SIM top-up operations.
- Removed obsolete plan formatting utilities to streamline codebase and improve maintainability.
2025-11-18 18:18:25 +09:00
barsa
44fd16e89f Add Salesforce integration to SIM management module
- Included SalesforceModule in the imports of sim-management.module.ts to enhance integration capabilities with Salesforce services.
- This addition supports improved data handling and service interactions within the SIM management context.
2025-11-18 15:56:15 +09:00
barsa
4d45eca503 Fix memory usage command in CacheService and add support directory to package.json
- Updated the memory command in CacheService from "usage" to "USAGE" for consistency with Redis commands.
- Added support directory paths to package.json to enhance module resolution for the support features.
2025-11-18 15:20:52 +09:00
barsa
8c89109213 Update worktree setup and enhance BFF with SupportModule integration
- Changed worktree setup command from npm to pnpm for improved package management.
- Added SupportModule to app.module.ts and router.config.ts for better support case handling.
- Refactored OrderEventsService to utilize OrderUpdateEventPayload for improved type safety.
- Updated InvoicesList component to use INVOICE_STATUS for status filtering and improved type definitions.
- Enhanced SimActions and SimDetailsCard components to utilize SimStatus for better state management.
- Refactored Subscription components to leverage new utility functions for status handling and billing cycle labels.
- Improved SupportCasesView with better state management and error handling.
- Updated API query keys to include support cases for better data retrieval.
2025-11-18 14:06:27 +09:00
barsa
1220f219e4 Add SIM top-up pricing endpoints and integrate pricing service into subscriptions module
- Introduced new endpoints in SubscriptionsController for retrieving SIM top-up pricing and previewing pricing based on quota.
- Integrated SimTopUpPricingService into the subscriptions module to handle pricing logic.
- Updated TopUpModal component to utilize the new pricing service for dynamic cost calculations and validation.
- Enhanced error handling and user feedback in the TopUpModal for improved user experience during data top-up operations.
- Refactored order display utilities to support new pricing structures and ensure consistent presentation across the application.
2025-11-18 11:14:05 +09:00
barsa
6d327d3ede Refactor CacheService and MappingCacheService for improved performance and functionality
- Enhanced CacheService by implementing a more efficient pattern deletion method using a pipeline for batch processing.
- Added new methods in CacheService to count keys and calculate memory usage by pattern, improving cache management capabilities.
- Updated MappingCacheService to asynchronously retrieve cache statistics, ensuring accurate reporting of total keys and memory usage.
- Refactored existing methods for better readability and maintainability, including the introduction of a private scanPattern method for key scanning.
2025-11-18 11:03:25 +09:00