39 Commits

Author SHA1 Message Date
Temuulen Ankhbayar
d7efede122 refactor: complete shadcn/ui migration and unify raw HTML with component library
Some checks failed
Pull Request Checks / Code Quality & Security (push) Has been cancelled
Security Audit / Security Vulnerability Audit (push) Has been cancelled
Security Audit / Dependency Review (push) Has been cancelled
Security Audit / CodeQL Security Analysis (push) Has been cancelled
Security Audit / Check Outdated Dependencies (push) Has been cancelled
- Migrate all molecule components (DataTable, PaginationBar, FilterDropdown,
  AlertBanner, FormField, SectionCard, SubCard, MetricCard, AnimatedCard,
  OtpInput) to shadcn/ui primitives with legacy backups and comparison stories
- Install 24 shadcn/ui primitives (accordion, alert, badge, button, card,
  checkbox, collapsible, dialog, dropdown-menu, input-otp, input, label,
  pagination, popover, radio-group, select, separator, sheet, skeleton,
  table, tabs, toggle-group, toggle, tooltip) with barrel exports
- Replace 69 raw HTML elements across all features with shadcn components:
  35+ <button> → Button, 5 <select> → Select, 15+ <label> → Label,
  6 <input type=checkbox> → Checkbox, 7 <input type=radio> → RadioGroup
- Add TextRotate animation component and integrate into hero section
  with rotating service names (Internet, Phone Plans, VPN, IT Support, Business)
- Add destructive color token aliases for error state consistency
- Add CLAUDE.md rules for shadcn migration process

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 17:21:36 +09:00
Temuulen Ankhbayar
4c31c448f3 feat: add portal UI components and stories
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:25:01 +09:00
barsa
18b4c515a4 feat: enhance Salesforce account handling and OTP components
- Updated SalesforceAccountService to include dynamic portal source field in SOQL query for improved account retrieval.
- Modified VerificationWorkflowService to conditionally parse addresses based on portal source eligibility.
- Refactored OTP components to utilize OtpExpiryDisplay for better user feedback on expiration.
- Cleaned up unused code in LoginOtpStep and OtpStep components for improved clarity and performance.
- Enhanced CompleteAccountStep to remove unnecessary address prefill logic, streamlining the user experience.
2026-03-07 11:37:57 +09:00
barsa
1610e436a5 feat: integrate input-otp library and enhance OTP input handling
- Added input-otp library to streamline OTP input functionality.
- Refactored OtpInput component to utilize InputOTP for improved user experience and mobile SMS autofill.
- Enhanced LoginOtpStep and VerificationStep components to handle OTP input errors and clear states effectively.
- Updated global styles to include animations for OTP caret, improving visual feedback during input.
- Made minor adjustments to LoginForm and OtpStep components for better error handling and user interaction.
2026-03-06 18:56:16 +09:00
barsa
7d290c814d feat: enhance authentication and billing components for improved user experience
- Added rate limiting to the AuthController to prevent abuse of authentication endpoints.
- Updated OtpInput component to simplify completion logic for better usability.
- Refactored ForgotPasswordView to improve email confirmation handling and user feedback.
- Enhanced PaymentMethods components with refresh functionality for better payment management.
- Made minor UI adjustments across various components for improved consistency and clarity.
2026-03-06 17:52:57 +09:00
barsa
7502068ea9 refactor: remove unused billing and payment components, enhance animation capabilities
- Deleted loading and page components for invoices and payment methods to streamline the billing section.
- Updated AnimatedContainer, InlineToast, and other components to utilize framer-motion for improved animations.
- Refactored AppShell and Sidebar components to enhance layout and integrate new animation features.
- Adjusted various sections across the portal to ensure consistent animation behavior and visual appeal.
2026-03-06 14:48:34 +09:00
barsa
cab58d1c5b refactor: streamline component layouts and enhance navigation
- Updated the AppShell and Sidebar components for improved layout and spacing.
- Replaced font colors in the Logo component for better visibility.
- Adjusted the PageLayout component to utilize backLink props instead of breadcrumbs for navigation consistency.
- Removed unnecessary description props from multiple PageLayout instances across various views to simplify the codebase.
- Introduced SectionCard component in OrderDetail for better organization of billing information.
- Enhanced utility styles in CSS for improved typography and layout consistency.
2026-03-06 10:45:51 +09:00
barsa
57f2c543d1 style: update typography and layout across components
- Replaced font references in globals.css to use DM Sans and JetBrains Mono for improved typography consistency.
- Adjusted various components to utilize the new font styles, enhancing visual hierarchy and readability.
- Updated layout properties in AppShell and Sidebar for better alignment and spacing.
- Enhanced button styles to include a new subtle variant for improved UI flexibility.
- Refactored SearchFilterBar to support active filter display, improving user interaction experience.
- Made minor adjustments to the DashboardView and landing page components for better visual consistency.
2026-03-06 10:45:51 +09:00
4665394bd4 Revert "fix: OTP auto-submit not firing when typing manually"
This reverts commit 6be28b4fb5df366ac5aec89121130f03c8d37401.
2026-03-05 18:34:49 +09:00
6be28b4fb5 fix: OTP auto-submit not firing when typing manually
String.includes("") always returns true in JavaScript, so the condition
`!newValue.includes("")` was always false, preventing onComplete from
ever firing on manual input. Only paste worked because it uses a
separate code path. The length check alone is sufficient since empty
digits produce a shorter joined string.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 18:31:19 +09:00
barsa
9145b4aaed style: standardize conditional rendering syntax across components
- Updated multiple components to use consistent conditional rendering syntax by adding parentheses around conditions.
- Enhanced readability and maintainability of the code in components such as OtpInput, AddressCard, and others.
- Improved overall code quality and developer experience through uniformity in the codebase.
2026-03-05 15:52:26 +09:00
barsa
0caf536ac2 style: standardize conditional rendering syntax across components
- Updated multiple components to use consistent conditional rendering syntax by adding parentheses around conditions.
- Enhanced readability and maintainability of the code in components such as OtpInput, AppShell, AddressCard, and others.
- Ensured uniformity in the codebase, improving overall code quality and developer experience.
2026-03-05 15:31:47 +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
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
Temuuleenn
df742e50bc fix: resolve BFF TypeScript errors and improve mobile UX
BFF fixes:
- Fix pino-http type import by using Params from nestjs-pino
- Use Prisma-generated AuditAction enum instead of local duplicate
- Add null check for sfAccountId in mapping mapper

Portal mobile UX improvements:
- DataTable: Add responsive card view for mobile with stacked layout
- Header: Increase touch targets to 44px minimum, better spacing
- PageLayout: Optimize padding and make breadcrumbs scrollable
- PublicShell: Add iOS safe area support, slide animation, language
  switcher and sign-in button visible in mobile header

Also removes "Trusted by Leading Companies" section from AboutUsView.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 18:29:55 +09:00
barsa
7abd433d95 Refactor conditional rendering and improve code readability across multiple components
- Simplified conditional rendering in OrderSummary, ProductCard, InstallationOptions, InternetOfferingCard, DeviceCompatibility, SimPlansContent, and other components by removing unnecessary parentheses.
- Enhanced clarity in the use of ternary operators for better maintainability.
- Updated documentation to reflect changes in development setup for skipping OTP verification during login.
- Removed outdated orchestrator refactoring plan document.
- Added new environment variable for skipping OTP verification in development.
- Minor adjustments in domain contracts and mappers for consistency in conditional checks.
2026-02-03 18:28:38 +09:00
barsa
2dec0af63b fix: resolve nested ternary lint errors across codebase 2026-02-03 18:11:51 +09:00
barsa
d5e22f14f5 feat: add address reconciliation queue service for Salesforce integration
- Implement AddressReconcileQueueService to handle address reconciliation jobs between WHMCS and Salesforce.
- Define job data structure and queue configuration for retries and error handling.
- Add methods for enqueueing reconciliation jobs and retrieving queue health metrics.

feat: create loading components for various services in the portal

- Add loading skeletons for Internet, SIM, VPN, and public services configuration.
- Implement loading states for account-related views including account details, services, and verification settings.
- Introduce loading states for support case details and subscription actions.

feat: implement OTP input component for user verification

- Create OtpInput component to handle 6-digit OTP input with auto-focus and navigation.
- Add LoginOtpStep component for OTP verification during login, including countdown timer and error handling.

feat: define address domain constants for validation

- Establish constants for address field length limits to ensure compliance with WHMCS API constraints.
- Include maximum lengths for address fields and user input fields to maintain data integrity.
2026-02-03 11:48:49 +09:00
barsa
5c6bd00346 feat(auth): update migration and password set flows with improved redirect handling
feat(billing): enhance invoice list with filtering and summary stats

feat(components): add ClearFiltersButton, FilterDropdown, and DetailStatsGrid components for better UI consistency

fix(get-started): refactor button links to use new Button component for consistency

style(services): update ServicesOverviewContent to conditionally render hero section

refactor(orders): simplify OrderDetail and OrdersList views with new stat grid and filtering components

chore: add useInvoicesFilter hook for managing invoice filtering logic
2026-01-20 11:26:40 +09:00
barsa
dd8259e06f feat: Add SummaryStats component for displaying statistics in cards and inline formats
- Introduced SummaryStats component to standardize the display of statistics across the application.
- Updated SubscriptionsList and SupportCasesView to utilize the new SummaryStats component for better UI consistency.
- Refactored existing statistics display code into the new component, improving maintainability.

feat: Implement OrderDetailSkeleton and OrderProgressTimeline components

- Created OrderDetailSkeleton for loading states in order details view.
- Developed OrderProgressTimeline to visually represent the order status progression.
- Added skeleton loading states for both components to enhance user experience during data fetching.

feat: Enhance orders filtering with useOrdersFilter hook

- Implemented useOrdersFilter hook to manage order filtering logic, including search and status filters.
- Improved filtering capabilities for orders based on various criteria, enhancing user interaction.

feat: Add VpnPlansContent component for VPN service plans display

- Developed VpnPlansContent component to showcase available VPN plans and features.
- Integrated loading and error handling states for better user feedback.
- Included FAQ and How It Works sections to provide users with essential information about the VPN service.

chore: Update index files for new components

- Added exports for new components in their respective index files for easier imports.
2026-01-19 17:08:28 +09:00
barsa
0a5a33da98 Refactor conditional statements for improved readability and consistency
- Updated various components to use parentheses in conditional statements for clarity.
- Refactored `renderSubCardHeader` to use an options object for better parameter handling.
- Enhanced error handling messages across multiple components to provide clearer feedback.
- Adjusted query string handling in routing to improve readability.
- Made minor adjustments to ensure consistent formatting and style across the codebase.
2026-01-19 15:14:39 +09:00
barsa
2db3d9ec5d feat: for improved UI consistency 2026-01-15 11:30:29 +09:00
barsa
0f6bae840f feat: add eligibility check flow with form, OTP, and success steps
- Implemented FormStep component for user input (name, email, address).
- Created OtpStep component for OTP verification.
- Developed SuccessStep component to display success messages based on account creation.
- Introduced eligibility-check.store for managing state throughout the eligibility check process.
- Added commitlint configuration for standardized commit messages.
- Configured knip for workspace management and project structure.
2026-01-15 11:28:25 +09:00
barsa
bb4be98444 feat: Enhance About Us page with animations and updated styles
- Updated typography for headings and paragraphs in AboutUsView.
- Added animation effects for header and sections to improve user experience.
- Refactored section headers to use new display styles.

feat: Implement bilingual address handling in AddressConfirmation

- Integrated JapanAddressForm for ZIP code lookup and bilingual address input.
- Updated state management to handle bilingual addresses and validation.
- Enhanced save functionality to support dual-write to WHMCS and Salesforce.

fix: Adjust Japan Post address mapping to handle nullish values

- Updated address mapping to use nullish coalescing for optional fields.
- Ensured compatibility with API responses that may return null for certain fields.

feat: Add ServiceCard component for displaying services

- Created a flexible ServiceCard component with multiple variants (default, featured, minimal, bento).
- Implemented accent color options and responsive design for better UI.
- Added detailed props documentation and usage examples.

chore: Clean up development scripts

- Removed unnecessary build steps for validation package in manage.sh.
2026-01-14 16:25:06 +09:00
barsa
87fa789fce Add Account and Auth API Services with Profile Management
- Introduced `accountService` for managing user profiles, including fetching and updating profile and address information.
- Created `auth.store` to handle client-side authentication state, including login, signup, and session management.
- Added centralized exports for authentication services in `auth/api/index.ts`.
- Implemented API services for billing and checkout functionalities, enhancing the overall service architecture.
- Established a new structure for service APIs, promoting better organization and maintainability across the portal features.
2025-12-29 18:19:27 +09:00
barsa
a2e81798ef Refactor color tokens across components for improved consistency and clarity
- Removed legacy color aliases from globals.css to streamline design tokens.
- Updated various components, including Badge, Button, Checkbox, and Input, to utilize new color tokens for error states.
- Enhanced error messaging styles in components like ErrorBoundary and AlertBanner for better visual coherence.
- Standardized color usage in billing and subscription components to align with updated design tokens.
- Improved overall styling consistency across the application by adopting the new color system.
2025-12-16 18:12:12 +09:00
barsa
9d6c7dcde0 Refactor UI components for improved styling and consistency
- Updated global styles to enhance color usage and contrast across the application.
- Refined input components for better accessibility and visual feedback.
- Enhanced layout components with consistent padding and margins for a cleaner look.
- Improved card and button styles to align with the new design tokens.
- Standardized text colors and hover effects for better user interaction.
2025-12-16 16:08:17 +09:00
barsa
b99799c2fe Refactor UI components and enhance styling consistency across the portal
- Updated various components to use consistent color tokens, improving visual coherence.
- Refactored layout components to utilize the new PublicShell for better structure.
- Enhanced error and status messaging styles for improved user feedback.
- Standardized button usage across forms and modals for a unified interaction experience.
- Introduced new UI design tokens and guidelines in documentation to support future development.
2025-12-16 13:54:31 +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
d6f7c50e7b Refactor Salesforce request handling and improve logging
- Moved metrics tracking and logging from the queueing phase to the execution phase in SalesforceRequestQueueService for better accuracy.
- Updated CSRF token generation in CsrfController to accept parameters in a more flexible manner.
- Enhanced CacheService to handle immediate expiry requests without leaking stale values.
- Improved error handling and re-authentication logic in SalesforceConnection for better resilience during session expiration.
- Refactored logout functionality in AuthFacade to handle optional userId and improve logging during token revocation.
- Updated AuthController to apply rate limit headers and improved type handling in various request contexts.
- Streamlined imports and improved overall code organization across multiple modules for better maintainability.
2025-11-05 15:47:06 +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
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
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
ec69e3dcbb Refactor Freebit and WHMCS integrations to enhance maintainability and error handling. Update type definitions and streamline service methods across various modules. Improve import paths and clean up unused code to ensure better organization and clarity in the project structure. 2025-09-25 17:42:36 +09:00
barsa
065e2f9acf Refactor import paths for AlertBanner, AsyncBlock, and other components in the portal to enhance module structure and maintainability. Remove unused components and streamline imports across various views and features, ensuring consistent file organization. 2025-09-25 15:54:54 +09:00
barsa
3da96d0c84 Refactor import paths for components in the portal to enhance module structure and maintainability, ensuring consistent file organization across DataTable, FormField, SearchFilterBar, AuthLayout, and PageLayout. 2025-09-25 15:15:50 +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
a9d9036095 Refactor subscription hooks to utilize useAuthStore for token management, enhancing authentication checks. Update query keys for subscriptions to include parameters for better data handling. Remove unused useAuthSession hook and clean up imports in related files. 2025-09-20 13:37:54 +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