Commit Graph

12 Commits

Author SHA1 Message Date
Ho Ngoc Hai
36a0a9c256 feat: Add functional tests for MktZaloService, new contract and load tests, and audit documentation, while removing a legacy infrastructure project and updating service configurations. 2026-03-25 15:00:05 +07:00
Ho Ngoc Hai
7a752f4a82 fix(qa): resolve build failures and test issues found in QA verification
- packages/logger: upgrade tsconfig target to ES2022 to support Array.at()
- packages/http-client: exclude test files from tsc build to prevent noUnusedLocals errors
- packages/http-client/test: use vi.hoisted() for mock functions (vi.mock hoisting fix)
- services/goodgo-mcp-server/tests: use vi.hoisted() for all 4 test files (catalog, inventory, analytics, recipe)
- web-client-tpos: remove stale @using WebClientTpos.Client.Components.Auth from 10 auth pages (moved to blazor-ui RCL)
- web-client-tpos: remove AttachToken() calls in PosDataService (auth via BFF httpOnly cookie)
- web-client-tpos: fix IamApiService.SetAuthHeader() and MerchantApiService.AttachTokenAsync() — make no-op, remove _auth dependency
- web-client-tpos: fix Profile.razor — remove AttachToken() method and calls
- web-client-tpos: fix OnboardingReady.razor — escape @keyframes → @@keyframes in Razor style block
- web-client-tpos: fix PosDataService.GetListFromApiAsync() — check array before property lookup to fix plain array deserialization
- web-client-tpos/tests: update AuthStateServiceTests to new AuthStateService.Login(email, role) signature (no token param)
- web-client-tpos/tests: update PosDataServiceTests to new PosDataService(http) constructor (no authState param)

All 113 Node.js tests pass. All 30 .NET component tests pass. All .NET builds succeed.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 12:07:58 +07:00
Ho Ngoc Hai
af0461f233 fix(frontend): resolve 4 P2 architecture issues (Wave 3)
FRONT-I-01: Extract Auth components to Razor Class Library packages/blazor-ui/
- Created GoodGo.BlazorUi RCL (net10.0, MudBlazor 8.15) at packages/blazor-ui/
- Moved AuthButton, AuthCard, AuthInput, OtpInput, BrandPanel, SocialLogin, LanguageSwitcher
- Referenced RCL from WebClientTpos.Client via ProjectReference
- Added GoodGo.BlazorUi.Components.Auth/Common namespaces to _Imports.razor

FRONT-I-02: Add ARIA/accessibility attributes (WCAG 2.1 AA)
- AuthButton: aria-label, aria-busy, aria-disabled, aria-hidden on decorative icons
- OtpInput: role=group, aria-label per digit, autocomplete=one-time-code
- PosLayout: aria-expanded + aria-controls on sidebar/order toggles, aria-label on all icon buttons

FRONT-I-03: Implement Style Dictionary design token pipeline
- Created packages/design-tokens/ with token JSON (color, spacing, typography, border)
- Style Dictionary config outputs: CSS custom properties → wwwroot/css/tokens.generated.css
- Second output: C# constants → packages/blazor-ui/DesignTokens/DesignTokens.g.cs
- Added tokens:build script to root package.json
- Added tokens.generated.css link to index.html (before app.css for cascade correctness)

FRONT-I-04: Replace eval() in OtpInput with safe JS interop
- Created wwwroot/js/otp-input.js with window.focusOtpInput(index) helper
- Replaced JS.InvokeVoidAsync("eval", ...) with JS.InvokeVoidAsync("focusOtpInput", index)
- Eliminates CSP-violating eval(), improves security and debuggability

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-23 09:50:13 +07:00
Ho Ngoc Hai
945d35c751 feat: Cập nhật cấu hình TypeScript để sử dụng module ES2020 và thêm tùy chọn moduleResolution cho gói types. 2026-01-07 17:59:06 +07:00
Ho Ngoc Hai
b5f97e2012 feat: Cấu hình ESLint flat config mới, thêm jsconfig.json, và sắp xếp lại các import tự động. 2026-01-07 17:48:49 +07:00
Ho Ngoc Hai
471508baa4 feat: Xóa ứng dụng web-admin và cập nhật các controller, DTO, cấu hình dịch vụ cùng các dependency của gói. 2026-01-07 17:28:23 +07:00
Ho Ngoc Hai
200bf0b8fd chore: Cập nhật các phụ thuộc như TypeScript, Node.js types, Prisma và thông tin về thương hiệu, người duy trì trên toàn dự án. 2026-01-07 17:18:36 +07:00
Ho Ngoc Hai
63f5b10fe2 chore: upgrade to Node.js 25.2.1
- Update .nvmrc to Node 25
- Update all Dockerfiles to use node:25-alpine
- Update package.json engines to >=25.0.0
- Update CI/CD workflows for Node 25
- Update @types/node in packages
- Fix ESLint config to use ES module syntax
- Update OpenTelemetry imports for compatibility

All services tested and working with Node.js 25.2.1
2026-01-07 17:15:25 +07:00
Ho Ngoc Hai
019c79b898 Refactor auth-service to iam-service and update related configurations
- Renamed auth-service to iam-service across various files for consistency.
- Updated deployment workflows, database migration scripts, and documentation to reflect the service name change.
- Enhanced bilingual documentation for clarity on the new service structure and usage.
- Removed outdated references to auth-service in scripts and configuration files to streamline the project structure.
2025-12-30 21:03:00 +07:00
Ho Ngoc Hai
79866e22cf Enhance application metadata and user interface with bilingual support
- Added bilingual comments and metadata in `layout.tsx`, including application title and description in both English and Vietnamese.
- Updated `page.tsx` to include bilingual loading messages, welcome prompts, and login instructions for improved user experience.
- Enhanced `login/page.tsx` with bilingual labels and messages for form fields and error handling.
- Improved `auth.api.ts` with detailed comments on authentication processes, including registration, login, logout, and token management.
- Updated `auth.store.ts` to include bilingual comments for state management and authentication methods.
- Enhanced API response types in `api.types.ts` with bilingual documentation for better clarity.
- Improved user management routes and services in `user.controller.ts` and `user.service.ts` with bilingual comments for better maintainability.
2025-12-27 01:41:42 +07:00
Ho Ngoc Hai
526f376c5f Enhance configuration and authentication features across services
- Updated `next.config.js` in both web-admin and web-client to enable React strict mode, set output to standalone, and expose environment variables for API URL.
- Enhanced `auth-sdk` with detailed comments for JWT verification, decoding, and token management functions.
- Improved `http-client` with comprehensive documentation for HTTP client configuration and methods.
- Expanded `logger` functionality with detailed configuration options and logging formats.
- Enhanced `tracing` setup with detailed comments for distributed tracing configuration.
- Updated `types` definitions for authentication and user data transfer objects with comprehensive comments.
- Improved `auth-service` with detailed comments in controllers, services, and middlewares for better clarity and maintainability.
- Added health check endpoints in `health.controller.ts` for service monitoring.
- Enhanced error handling and logging throughout the application for better debugging and user feedback.
2025-12-27 01:37:59 +07:00
Ho Ngoc Hai
4da46b5b8e Sure! Pl 2025-12-27 01:31:10 +07:00