Commit Graph

39 Commits

Author SHA1 Message Date
Ho Ngoc Hai
4e595d0746 feat(docs): Remove outdated service templates and enhance Vietnamese architecture documentation
- Deleted obsolete service architecture templates in both English and Vietnamese to streamline content.
- Updated the Vietnamese architecture documentation with improved Mermaid diagrams for better visual clarity.
- Enhanced color coding in diagrams to improve readability and consistency across documentation.
- Added a new section detailing visual indicators for better understanding of architecture components.
2026-01-10 21:00:02 +07:00
Ho Ngoc Hai
808ab54d31 refactor: Cập nhật cấu hình PrismaClient trong môi trường kiểm thử để sử dụng biến môi trường DATABASE_URL. 2026-01-07 18:18:16 +07:00
Ho Ngoc Hai
2b64101adb refactor: Sắp xếp lại các import và đơn giản hóa khối catch trong health controller. 2026-01-07 18:17:14 +07:00
Ho Ngoc Hai
a7d2362b2f refactor: cập nhật cấu hình ESLint, TypeScript để bao gồm tệp kiểm thử và chuẩn hóa cách sắp xếp import, ghi log. 2026-01-07 18:15:00 +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
935c253c7e feat: upgrade Phase 1 dependencies to latest versions
- Upgrade TypeScript 5.3.3 → 5.9.3
- Upgrade @types/node to 25.0.3 (all workspaces)
- Upgrade Prisma 5.22.0 → 7.2.0 (BREAKING)
- Upgrade @prisma/client 5.9.1 → 7.2.0 (BREAKING)

BREAKING CHANGES:
- Prisma 7 requires prisma.config.ts instead of url in datasource
- Migrated to Neon adapter with @neondatabase/serverless
- Added @prisma/adapter-neon for Prisma 7 compatibility
- Removed url property from schema.prisma datasource blocks
- Created prisma.config.ts for iam-service and _template

All services tested and typecheck passes
2026-01-07 17:20:34 +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
c54a9debe3 feat: Vô hiệu hóa tạm thời Redis cache và sử dụng in-memory cache làm fallback. 2026-01-04 15:19:05 +07:00
Ho Ngoc Hai
101c333181 feat: Cải thiện cấu hình Redis client với tùy chọn kết nối ổn định hơn, chiến lược thử lại nâng cao và xử lý sự kiện kết nối tốt hơn. 2026-01-04 15:08:02 +07:00
Ho Ngoc Hai
d4f6115179 refactor: Cập nhật cấu hình các tuyến đường (routes) của dịch vụ IAM và API xác thực phía client, đồng thời loại bỏ tệp sao lưu RBAC cũ. 2026-01-04 14:35:12 +07:00
Ho Ngoc Hai
a383d8772e feat: Cấu hình lại ứng dụng IAM, cập nhật cấu trúc routes, tích hợp RBAC và thêm các bài kiểm tra tích hợp. 2026-01-04 14:27:41 +07:00
Ho Ngoc Hai
ccfb2a7fb2 feat: Thêm định nghĩa schema cho yêu cầu truy cập, đánh giá truy cập, chính sách, báo cáo tuân thủ và phiên vào tài liệu Swagger. 2026-01-04 13:56:12 +07:00
Ho Ngoc Hai
7e7a7a5853 refactor: Modularize IAM service routes into dedicated modules and add home page description 2026-01-04 13:53:34 +07:00
Ho Ngoc Hai
76b1c9b3a0 refactor: chuẩn hóa xử lý lỗi bằng cách giới thiệu tiện ích getErrorMessage và cập nhật kiểu catch thành unknown. 2026-01-04 13:31:11 +07:00
Ho Ngoc Hai
19e5e9b242 refactor: Cập nhật các import thư viện sang named imports cho express-rate-limit, jsonwebtokendompurify. 2026-01-04 13:17:28 +07:00
Ho Ngoc Hai
202b99873a feat: Thêm cấu hình môi trường cục bộ và hoàn thành các tác vụ tăng cường bảo mật cho IAM service, bao gồm tạo dịch vụ mã hóa. 2026-01-04 12:09:46 +07:00
Ho Ngoc Hai
f315a7af51 refactor: Replaced dynamic rate limit creation with pre-configured role-based limiters. 2026-01-04 12:00:23 +07:00
Ho Ngoc Hai
fc33f027d6 build: Thêm binary targets cho Prisma, chuyển rate limiter sang memory store, và cập nhật Dockerfile để sử dụng pnpm hoisting cùng openssl runtime. 2026-01-04 11:53:33 +07:00
Ho Ngoc Hai
fcbe176b3e feat: Tối ưu Dockerfile của iam-service bằng cách lọc cài đặt pnpm, tinh chỉnh loại bỏ dev dependencies và thiết lập workspace đúng cách. 2026-01-04 11:24:43 +07:00
Ho Ngoc Hai
c05ce82c7b feat: Thêm bước generate Prisma Client rõ ràng vào Dockerfile của iam-service. 2026-01-04 10:52:13 +07:00
Ho Ngoc Hai
7154c37a31 feat: Cải thiện dịch vụ mã hóa AES-256-GCM và tích hợp khóa mã hóa vào cấu hình môi trường để bảo vệ dữ liệu nhạy cảm. 2026-01-04 10:48:08 +07:00
Ho Ngoc Hai
9aed3da8eb refactor: Đổi tên các model Prisma userPermissions, userRoles, riskAssessment và bỏ backupCode trong IAM service. 2026-01-04 10:02:54 +07:00
Ho Ngoc Hai
0d48dedc08 feat: Khởi tạo Prisma client, bổ sung các bài kiểm tra đơn vị và tích hợp, đồng thời điều chỉnh cấu hình dịch vụ. 2026-01-04 09:34:37 +07:00
Ho Ngoc Hai
1a2103f86e Update IAM Service E2E tests and audit plan
- Marked E2E test tasks as completed in the IAM Service audit plan for better tracking.
- Enhanced E2E tests by mocking the Prisma client and its methods to simulate database interactions.
- Improved test coverage for feature creation, update, and deletion operations in the E2E tests.

These changes aim to streamline testing processes and ensure accurate simulation of service behavior.
2026-01-02 16:14:41 +07:00
Ho Ngoc Hai
8cc2f66df6 Update IAM Service with various enhancements and fixes
- Added `xmlchars` dependency to `pnpm-lock.yaml` for improved XML character handling.
- Updated IAM Service audit plan to streamline post-deployment monitoring tasks.
- Enhanced Dockerfile to prune development dependencies after build for a leaner production image.
- Introduced a new encryption key configuration in the environment example for better security practices.
- Refactored multiple service files to improve import organization and maintainability.
- Improved error handling in seed scripts to provide more detailed logging on failures.
- Updated various controllers and services to ensure consistent import statements and enhance readability.

These changes aim to improve the overall functionality, security, and maintainability of the IAM Service.
2026-01-02 16:13:36 +07:00
Ho Ngoc Hai
5ce05c63e7 Enhance web-admin application with internationalization and UI improvements
- Integrated `@hookform/resolvers` and `@radix-ui/react-avatar` for improved form handling and avatar components.
- Updated Tailwind CSS configuration and global styles for better responsiveness and accessibility.
- Refactored layout components to include `I18nProvider` for dynamic language support.
- Enhanced various UI elements with translated strings for better user experience.
- Improved error handling and validation messages in forms to support localization.

These changes aim to provide a more inclusive and user-friendly experience in the web-admin application.
2026-01-02 10:36:38 +07:00
Ho Ngoc Hai
c088de53c3 Update dependencies and enhance Tailwind CSS configuration for web applications
- Added new dependencies including clsx, lucide-react, recharts, and various Radix UI components to improve UI functionality.
- Upgraded Tailwind CSS to version 4.0.0 and updated configuration to utilize CSS variables for theming and responsive design.
- Introduced global styles and improved accessibility features in the layout and components.
- Removed outdated login page and refactored authentication store for better state management.
- Enhanced API service with additional authentication methods and improved error handling.

These changes aim to modernize the web applications and improve user experience through better design and functionality.
2026-01-02 09:41:40 +07:00
Ho Ngoc Hai
af303eaf7b Enhance IAM Service documentation with comprehensive updates
- Expanded the IAM Service README to include a detailed overview, features showcase, and quick start guide.
- Updated API reference with new endpoints for health checks and identity management.
- Improved implementation details, including completed features and module dependencies.
- Enhanced architecture documentation with clear diagrams and structured sections for better understanding.
- Added quick reference tables for API endpoints across various modules, improving accessibility for developers.

These changes aim to provide a clearer, more comprehensive understanding of the IAM Service's capabilities and usage.
2026-01-02 00:39:14 +07:00
Ho Ngoc Hai
d8411abd24 Revise IAM Service Architecture documentation for clarity and comprehensiveness
- Updated the document title to reflect the focus on IAM Service Architecture.
- Expanded the overview section to provide a clearer description of the IAM Service's capabilities.
- Enhanced the table of contents for better navigation.
- Added detailed architecture diagrams illustrating the layered architecture and key components.
- Included comprehensive sections on authentication flows, authorization models, caching strategies, and security architecture.
- Improved overall structure and readability to facilitate understanding of the IAM Service's design and functionality.

These changes aim to provide developers with a thorough understanding of the IAM Service architecture and its components.
2026-01-02 00:30:26 +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
b104fafa85 Refactor auth-service to iam-service and update related documentation
- Renamed auth-service to iam-service across various files for consistency.
- Updated Dockerfiles, deployment configurations, and documentation to reflect the service name change.
- Enhanced testing commands in documentation to point to the new iam-service.
- Removed outdated auth-service files and configurations to streamline the project structure.
- Improved bilingual documentation for clarity on the new service structure and usage.
2025-12-30 20:54:21 +07:00
Ho Ngoc Hai
ab44954bd6 Update project configuration and enhance service template with new features
- Updated `.gitignore` to clarify environment variable handling.
- Enhanced `pnpm-lock.yaml` with new dependencies for Jest and Supertest, including type definitions.
- Improved bilingual documentation in `SKILL.md` files for better clarity on comment patterns and project rules.
- Refined `docker-compose.yml` for local development, adding detailed instructions and access points.
- Updated environment variable example in `env.local.example` for better guidance on configuration.
- Removed outdated architecture documentation from the service template.
- Enhanced Dockerfile for improved security and performance during builds.
- Added Swagger documentation setup in the service template for better API documentation.
- Improved error handling and logging middleware for enhanced debugging capabilities.
2025-12-27 13:54:09 +07:00
Ho Ngoc Hai
9cd074acf1 Add Redis support for rate limiting and caching in service template
- Integrated Redis for distributed rate limiting using `rate-limit-redis`.
- Updated `README.md` to include Redis caching strategy and configuration details.
- Enhanced architecture diagram to reflect Redis usage.
- Added new dependencies for `ioredis`, `opossum`, and their respective type definitions.
- Updated application configuration to include Redis URL.
- Improved bilingual documentation throughout the service template.
2025-12-27 11:40:26 +07:00
Ho Ngoc Hai
7d68f61b82 Update dependencies and enhance service template with bilingual support
- Added `dotenv` and `prom-client` dependencies for environment variable management and metrics collection.
- Updated `package.json` to include new dependencies and types for `dotenv`.
- Enhanced `README.md` with bilingual features, usage instructions, and project structure.
- Improved `app.config.ts` to validate environment variables using Zod.
- Implemented graceful shutdown in `main.ts` for better service reliability.
- Added metrics middleware and updated routes to include metrics endpoint.
- Enhanced error handling middleware with detailed logging and responses.
- Updated feature and health controllers with bilingual comments and improved structure.
2025-12-27 11:01:17 +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