573 Commits

Author SHA1 Message Date
barsa
cde418b81e refactor: enhance infinite carousel functionality and styling
- Improved the useResponsiveCardWidth hook to prevent unnecessary state updates by tracking previous width.
- Introduced a new useCarouselInput hook to handle touch and keyboard navigation, streamlining event management.
- Updated the useInfiniteCarousel hook to utilize a ref for total items, enhancing performance and reliability.
- Enhanced styling for the SimPlansContent component, including improved layout and hover effects for better user experience.
- Added slide transition animations for tab changes in the PublicInternetPlans view, improving visual feedback during interactions.
- Updated internet tier descriptions and features for clarity and consistency across the application.
2026-03-05 11:18:34 +09:00
barsa
7125f79baa refactor: update layout and components for improved consistency and accessibility
- Replaced the "About us.png" image with a new "about-us.png" for better naming consistency.
- Updated various sections across the landing page to use a full-bleed layout for a more modern design.
- Refactored ServiceCard component to conditionally render as a link or div based on the presence of an href prop, enhancing flexibility.
- Introduced a new CollapsibleSection component for better organization of content in service-related sections.
- Enhanced styling and structure in multiple components, including ContactSection, CTABanner, and TrustStrip, to improve visual hierarchy and user experience.
2026-03-05 10:05:30 +09:00
barsa
48eb8c8725 style: enhance layout and design of service components
- Updated ServicesPage layout by removing unnecessary padding for a cleaner appearance.
- Added a "Contact" link to the PublicShell navigation for improved accessibility.
- Refined AboutUsView by restructuring service and value data for better clarity and organization.
- Improved styling consistency across various service components, including ServiceCTA, ServiceFAQ, and ServiceHighlights, by adjusting spacing and typography.
- Enhanced InternetOfferingCard and PublicOfferingCard with updated tier styles and visual hierarchy for better user experience.
2026-03-04 18:57:30 +09:00
barsa
d5294dc580 fix: improve infinite carousel navigation and transition handling
- Updated the track index logic to prevent navigation while at clone positions, ensuring smoother transitions.
- Enhanced the handleTransitionEnd function to only respond to the track's own transform transitions, improving event handling accuracy.
- Adjusted dependencies in useCallback hooks for better performance and reliability.
2026-03-04 18:39:15 +09:00
barsa
a0f97cdec4 style: update background gradients and refactor component references
- Replaced oklch color definitions with color-mix for improved gradient consistency across OnsiteSupportContent, HeroSection, and ServicesOverviewContent components.
- Refactored ref attributes in multiple sections to remove unnecessary type assertions for better type safety.
- Enhanced ServicesCarousel component by introducing a new accent color system for better visual clarity and consistency.
2026-03-04 17:13:07 +09:00
barsa
a1431cec09 refactor: update support service and contact form components
- Changed the subject line in the SupportService to include the contact name for better context.
- Removed the subject field from the ContactForm state and schema, streamlining the form.
- Updated the HeroSection text to better reflect the services offered, enhancing clarity and appeal.
2026-03-04 16:16:14 +09:00
barsa
408f99ae3c fix: make phone numbers clickable tel: links in contact section 2026-03-04 15:21:48 +09:00
barsa
c07915f3b4 style: tighten support page contact section spacing 2026-03-04 15:12:36 +09:00
barsa
6bbdbbc540 style: tighten contact us page layout and sidebar spacing 2026-03-04 15:08:54 +09:00
barsa
cdaac57c26 style: improve landing page contact section hierarchy and compactness 2026-03-04 15:03:52 +09:00
barsa
6de5e1a735 style: tighten contact form spacing and polish styling 2026-03-04 15:00:58 +09:00
barsa
6d3655ac5c fix: move carousel badge inline with icon, remove prices 2026-03-04 14:58:45 +09:00
barsa
ee85426743 refactor: update landing page and support components
- Removed the PublicHelpPage component and streamlined navigation by adding a direct link to the Support page in the SiteFooter.
- Updated the PublicShell component to redirect to the Support page instead of the Contact page.
- Enhanced the CTABanner and HeroSection components with new text and improved call-to-action buttons.
- Replaced the ServicesGrid component with ServicesCarousel for better service presentation.
- Introduced new conversion service cards in the services data structure for improved service offerings.
- Updated the PublicContactView and PublicSupportView components for better styling and accessibility.
2026-03-04 14:50:45 +09:00
barsa
5a66adb7e6 refactor: update landing page components and styles
- Removed obsolete components such as AnimatedBackground, FloatingGlassCard, TrustBadge, TrustIndicators, and ValuePropCard to streamline the landing page.
- Enhanced existing components like CTABanner and HeroSection with improved accessibility and styling.
- Updated global CSS to introduce new line-height tokens and improved typography.
- Refactored the PublicContactView to focus on a streamlined contact form and sidebar information.
- Improved the ServicesGrid component to utilize a new data structure for landing services.
- Enhanced button components with new variants for better UI consistency.
2026-03-04 13:42:03 +09:00
barsa
0523bf80a8 refactor: update landing page components and styles
- Removed obsolete components including ContactSection, PopularServicesSection, RemoteSupportSection, SolutionsCarousel, and TrustSection to streamline the landing page.
- Introduced new components such as TrustStrip and ServicesGrid for improved layout and functionality.
- Enhanced global CSS with new line-height tokens and updated styles for better typography.
- Updated PublicLandingLoadingView for consistent loading states across the landing page.
- Added new landing services data structure to support the ServicesGrid component.
2026-03-04 13:11:20 +09:00
barsa
6b13d74d06 refactor: update styles and improve loading states across portal components
- Modified global CSS to enhance typography and introduce new surface styles.
- Updated layout component to utilize the new Jakarta font variable.
- Improved loading states in account and public services views for better user experience.
- Refactored loading components to use consistent styling and structure.
- Enhanced the SiteFooter and AuthLayout components with updated font styles.
- Streamlined the PublicLandingLoadingView for better visual consistency.
- Added new BackLink component for improved navigation in order detail loading state.
2026-03-04 11:59:22 +09:00
barsa
26776373f7 refactor: fix all lint errors and reduce warnings across BFF and domain
Eliminate all 12 ESLint errors (nested ternaries, any types) and reduce
warnings by 13 (duplicate strings, complexity). Key changes:

- Domain: extract helpers for nested ternaries in opportunity/contract and whmcs/mapper
- BFF core: fix any type in safe-operation.util, refactor exception filter to use
  options objects, create shared CACHE_CONTROL and normalizeToArray utilities
- Freebit: replace nested ternaries with if/else in client and mapper services
- Sim fulfillment: extract helper methods to reduce complexity (fulfillEsim,
  fulfillPhysicalSim, buildMnpPayload, registerVoiceOptionsIfAvailable, MNP_FIELD_MAPPINGS)
- Modules: fix 8 nested ternary violations across validators, services, controllers
- Constants: extract duplicate strings (CSRF, email, orchestrator, cache control)
2026-03-04 10:52:26 +09:00
barsa
953878e6c6 refactor: enhance WHMCS HTTP client and authentication error handling
- Improved error logging in WhmcsHttpClientService by simplifying log messages.
- Introduced RequestWithCookies type for better type safety in auth controllers.
- Refactored ValidatedUser interface for internal consistency.
- Streamlined error handling by removing deprecated constants and consolidating token logic.
- Enhanced maintainability by removing unused methods in token services.
2026-03-04 10:17:32 +09:00
barsa
239de6f20a refactor: enhance WHMCS HTTP client error logging and streamline auth module
- Simplified error logging in WhmcsHttpClientService by removing action parameters from log messages for clarity.
- Introduced RequestWithCookies type to improve type safety in auth controllers and utilities.
- Refactored ValidatedUser interface to remove export, aligning with internal usage.
- Removed deprecated auth error constants and streamlined error handling in various auth services.
- Consolidated token handling logic by utilizing a shared hashToken utility across token services.
- Removed unused and redundant methods in token services, improving code maintainability.
2026-03-04 10:17:04 +09:00
barsa
f6c0812061 refactor: streamline authentication workflows and remove deprecated services
- Removed WhmcsLinkWorkflowService and integrated its functionality into new AccountCreationWorkflowService and AccountMigrationWorkflowService.
- Introduced OtpEmailService for sending OTP emails, enhancing email handling in LoginOtpWorkflowService and VerificationWorkflowService.
- Replaced NewCustomerSignupWorkflowService and SfCompletionWorkflowService with AccountCreationWorkflowService, consolidating account creation logic.
- Updated GetStartedCoordinator to utilize new workflow services, improving clarity and maintainability of the authentication process.
- Enhanced error handling and logging across workflows to provide better feedback during account creation and migration.
2026-03-03 18:34:04 +09:00
barsa
451d58d436 refactor: simplify auth signup flow by merging duplicate workflows
Merge SfCompletionWorkflow and NewCustomerSignupWorkflow into a single
AccountCreationWorkflowService, remove legacy /auth/migrate endpoint
and WhmcsLinkWorkflow, extract shared OTP email pattern into
OtpEmailService, and improve PORTAL_EXISTS redirect UX with email
pre-fill.

- Consolidate signup/ directory services into steps/ (PortalUserCreationService,
  WhmcsCleanupService) and new AccountCreationWorkflowService
- Rename WhmcsMigrationWorkflowService to AccountMigrationWorkflowService
- Remove dead code: WhmcsLinkWorkflowService, auth.controller /migrate endpoint
- Extract OtpEmailService from duplicated login/verification OTP email logic
- Pass email query param on PORTAL_EXISTS redirect for login pre-fill
- Delete 1977 lines of legacy code, add ~350 lines of consolidated logic
2026-03-03 17:58:06 +09:00
barsa
9b7cbcf78f refactor: improve error handling and caching in BFF services
- Enhanced UnifiedExceptionFilter to handle ZodValidationException, extracting field errors for better user feedback.
- Updated WhmcsRequestQueueService and WhmcsHttpClientService to use logger.warn for non-critical errors, improving log clarity.
- Introduced Redis-backed caching in JapanPostFacade for postal code lookups, reducing redundant API calls.
- Refactored address handling in AddressWriterService to deduplicate concurrent Japan Post lookups, optimizing API usage.
- Improved error parsing in various forms and hooks to provide clearer error messages and field-specific feedback.
2026-03-03 17:27:50 +09:00
barsa
6299fbabdc refactor: enhance address handling in BFF workflows
- Integrated AddressWriterService into GuestEligibilityWorkflowService and NewCustomerSignupWorkflowService for improved address writing to Salesforce.
- Updated AddressModule to include SalesforceModule and export AddressWriterService.
- Refactored address handling in various workflows to utilize the new address structure, ensuring consistency and reliability in address processing.
- Removed deprecated address building logic from eligibility check store, streamlining address management across components.
2026-03-03 16:33:40 +09:00
barsa
26a1419189 refactor: integrate PasswordInput component across forms
- Replaced standard input fields with the new PasswordInput component in various forms including PasswordChangeCard, LoginForm, PasswordResetForm, SetPasswordForm, and MigrateAccountStep.
- Updated imports to include PasswordInput in relevant components for consistent password handling and improved user experience.
2026-03-03 15:37:51 +09:00
barsa
73ef1d9825 refactor: enhance phone number validation in account forms
- Updated phone number validation logic in useCompleteAccountForm and CompleteAccountStep components to include schema validation using phoneSchema.
- Improved error messaging for invalid phone numbers and ensured required field checks are clearly defined.
2026-03-03 14:50:58 +09:00
58ed32c431 fix: correct company name typo in PublicShell header
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:38:29 +09:00
barsa
0ac4e80ba7 refactor: update Content Security Policy in proxy configuration
- Adjusted CSP to allow same-origin scripts and inline scripts generated by Next.js.
- Removed 'strict-dynamic' to prevent blocking of parser-inserted script tags, ensuring proper loading of Next.js chunks.
2026-03-03 14:30:39 +09:00
barsa
0bf367ffec refactor: update rate limiting configuration and enhance account event handling
- Increased default login rate limit from 5 to 20 and adjusted TTL from 15 to 5 minutes for improved security.
- Updated login captcha threshold from 3 to 5 attempts to enhance user experience.
- Modified AccountEventsListener to invalidate additional queries for account updates and support case changes, improving responsiveness to real-time events.
2026-03-03 14:13:24 +09:00
barsa
790e3e65e3 fix: update Salesforce event configuration to enable Order CDC by default
- Changed the default value of SF_EVENTS_ENABLED from "false" to "true" in the OrderCdcSubscriber class to ensure that Order CDC events are enabled by default upon initialization.
2026-03-03 13:10:38 +09:00
barsa
99761b21dd refactor: enhance password reset form validation and auth store integration
- Introduced a new reset form schema that extends the domain passwordResetSchema to include a confirmPassword field with matching logic.
- Updated the PasswordResetForm component to utilize the new schema for improved validation.
- Added applyAuthResponse method to the auth store for syncing authentication responses.
- Refactored GetStartedForm to redirect users to the dashboard upon successful account setup, integrating with the auth store for session management.
- Removed unnecessary redirection logic from CompleteAccountStep and MigrateAccountStep components to streamline the flow.
2026-03-02 19:02:48 +09:00
barsa
49e9dba3a3 refactor: enhance error handling in WHMCS and signup workflows
- Introduced structured error codes in BadRequestException for better clarity in WHMCS and signup workflows.
- Updated error messages to include specific context, improving user feedback during account verification and migration processes.
- Refined validation logic to ensure consistent error handling across services.
2026-03-02 18:15:13 +09:00
barsa
230a61c520 refactor: enhance account status handling and error messaging in auth guards
- Introduced a new `AccountStatusResult` interface to standardize account status detection across systems.
- Updated the `VerificationWorkflowService` to merge handoff data with discovered account status.
- Enhanced error handling in `GlobalAuthGuard` and `LocalAuthGuard` to include structured error codes for better clarity in unauthorized responses.
- Refined WHMCS and Salesforce integration schemas to ensure consistent data validation and coercion.
2026-03-02 18:00:41 +09:00
barsa
29b511e44c refactor: update password validation requirements and messaging
- Removed special character requirement from password validation across various components and schemas.
- Updated user-facing messages to reflect the new password criteria.
- Adjusted related validation logic in the domain and portal to ensure consistency.
2026-03-02 17:40:47 +09:00
barsa
c96270c223 docs: add get-started login handoff implementation plan
7-task plan covering domain schemas, BFF workflow service,
controller endpoints, portal API client, AccountStatusStep
redirect, and LoginForm handoff mode adaptation.
2026-03-02 16:12:42 +09:00
barsa
65bdadc5c8 docs: add get-started login handoff design
Cookie-based handoff pattern for existing users in the get-started
flow. After OTP verification detects portal_exists, BFF sets a
short-lived HttpOnly cookie and redirects to the login page, which
shows a password-only form (no second OTP).
2026-03-02 16:06:45 +09:00
barsa
cc8aa917c2 fix: update Salesforce connection login URL to use test environment
- Change default login URL from production to test Salesforce environment for safer development and testing.
2026-03-02 15:23:33 +09:00
barsa
49d6d21974 fix: restore lost error classifications and address code review findings
- Salesforce: add validation/duplicate/access/storage error classes and
  restore classification in error handler (400/409/403/503 vs generic 502)
- Freebit: add auth/rate-limit/validation/network error classes and
  restore result-code-based classification (215, 381, 382)
- Portal: replace unsafe string→enum casts with typed state variables
- BaseRepository: narrow orderBy from unknown to Record<string, "asc"|"desc">
- WHMCS: narrow WhmcsNotFoundError.providerCode from string to union type
- Remove unused UnitOfWork service from PrismaModule
2026-03-02 13:11:11 +09:00
barsa
98beed85c7 refactor: decompose auth module into feature-based sub-modules
Split the monolithic AuthModule (48 providers) into 7 focused
feature modules: Tokens, OTP, Sessions, Login, GetStarted,
PasswordReset, and SharedAuth (guards + rate limiting).
2026-03-02 13:11:11 +09:00
barsa
e5fe68b25e refactor: add repository + unit of work layer for database access
Add BaseRepository generic class with typed CRUD operations. Create
UnitOfWork service wrapping TransactionService for atomic multi-entity
operations. Add concrete repositories for SimVoiceOptions, IdMapping,
and AuditLog. Migrate VoiceOptionsService, MappingsService, and
AuditLogService from direct PrismaService usage to repositories.
2026-03-02 13:11:11 +09:00
barsa
2d076cf6d4 refactor: add typed provider error classes replacing string matching
Add structured error code enums to domain package for WHMCS, Salesforce,
and Freebit providers. Create BaseProviderError and typed error classes
for each provider. Update UnifiedExceptionFilter to handle provider errors.
Migrate all three error handler services from DomainHttpException with
brittle string matching to typed error classes with instanceof checks.
2026-03-02 13:11:11 +09:00
barsa
7da032fd95 refactor: tighten support schema to use defined enum validators
Replace loose z.string() fields in supportCaseSchema and supportCaseFilterSchema
with the already-defined enum schemas (status, priority, category). Add JSDoc
to intentional escape hatches in customer contract interfaces. Fix portal
type assertions for the stricter filter types.
2026-03-02 13:11:10 +09:00
ed7c167f15 feat: integrate OpenBao vault for secret management in BFF
Replace fragile .env backup/restore with Vault-based secret injection.
Secrets are preloaded via --import hook before NestJS modules evaluate,
with a 30s refresh loop and event-driven cache invalidation for services
that read secrets at init (JWT, CSRF, WHMCS).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:27:37 +09:00
barsa
b206de8dba refactor: enterprise-grade cleanup of BFF and domain packages
Comprehensive refactoring across 70 files (net -298 lines) improving
type safety, error handling, and code organization:

- Replace .passthrough()/.catchall(z.unknown()) with .strip() in all Zod schemas
- Tighten Record<string, unknown> to bounded union types where possible
- Replace throw new Error with domain-specific exceptions (OrderException,
  FulfillmentException, WhmcsOperationException, SalesforceOperationException, etc.)
- Split AuthTokenService (625 lines) into TokenGeneratorService and
  TokenRefreshService with thin orchestrator
- Deduplicate FreebitClientService with shared makeRequest() method
- Add typed interfaces to WHMCS facade, order service, and fulfillment mapper
- Externalize hardcoded config values to ConfigService with env fallbacks
- Consolidate duplicate billing cycle enums into shared billingCycleSchema
- Standardize logger usage (nestjs-pino @Inject(Logger) everywhere)
- Move shared WHMCS number coercion helpers to whmcs-utils/schema.ts
2026-02-24 19:05:30 +09:00
barsa
f4918b8a79 refactor: update WHMCS phone country code handling and schema validation
- Modify the phoneCountryCode assignment in the WHMCS mapper to ensure it is always a string when present.
- Change the phonecc type in the WHMCS raw types schema to use numberLike for improved type safety and validation consistency.
2026-02-24 14:54:38 +09:00
barsa
1156398caa refactor: improve WHMCS account discovery error handling
- Simplify error handling in WhmcsAccountDiscoveryService by logging warnings for user sub-account lookup failures instead of throwing errors.
- Ensure that the primary client lookup remains the authoritative source while allowing supplementary checks for user accounts.
- Enhance code clarity and maintainability by removing unnecessary error checks.
2026-02-24 14:48:03 +09:00
barsa
9941250cb5 refactor: streamline authentication workflows and remove legacy services
- Replace SignupWorkflowService and GetStartedWorkflowService with new coordinator services for improved modularity and clarity.
- Update auth controller to utilize the new GetStartedCoordinator.
- Refactor account status handling in the GetStartedForm component to leverage XState for state management.
- Introduce new hooks for managing the get-started flow, enhancing the overall user experience.
- Remove deprecated services and clean up related imports to maintain code hygiene.
2026-02-24 14:37:23 +09:00
barsa
912582caf7 docs: add get-started flow refactoring design
Covers splitting the god class into per-path workflow services,
compensating transactions via DistributedTransactionService,
error classification, XState frontend state machine, and
legacy signup flow removal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:57:43 +09:00
barsa
5c329bbe96 refactor: update WHMCS mappers and schemas to use numberLike for type safety
- Refactor various mappers in billing, payments, services, and subscriptions to ensure IDs are consistently converted to numbers.
- Update raw types schemas to utilize whmcsNumberLike and whmcsString for improved validation and type safety.
- Enhance the whmcs-utils to include schema exports for better modularity.
2026-02-24 13:56:02 +09:00
barsa
7bc4c14b4c refactor: consolidate error handling to safeOperation 2026-02-24 13:15:45 +09:00
barsa
9736e96cb3 refactor: consolidate error handling to safeOperation
- Enhance safeOperation with rethrow and fallbackMessage options for CRITICAL operations
- Migrate all 19 withErrorHandling calls across 5 services to safeOperation
- Remove safeAsync from error.util.ts
- Delete error-handler.util.ts (withErrorHandling, withErrorSuppression, withErrorLogging)
- Update barrel exports in core/utils/index.ts
2026-02-24 13:15:35 +09:00