Commit Graph

86 Commits

Author SHA1 Message Date
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
6abea5b18b feat: Bổ sung nhiều tài liệu quy tắc mới về thiết kế, kiến trúc và phát triển, đồng thời loại bỏ các quy tắc cũ về kiến trúc và đặt tên. 2026-01-04 09:52:46 +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
f43aec8a03 Implement internationalization support and enhance user experience in web-client
- Added `next-intl` dependency for improved internationalization capabilities.
- Integrated translation hooks across various components, including authentication, chat, and settings, to support dynamic language switching.
- Updated UI elements to utilize translated strings for better accessibility and user experience.
- Refactored forms and validation schemas to include localized messages for error handling and user prompts.
- Enhanced chat functionality with localized messages for actions and notifications.

These changes aim to provide a more inclusive experience for users by supporting multiple languages and improving overall usability.
2026-01-02 10:06:22 +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
2640b351c3 Enhance documentation with detailed diagrams and structured flows
- Added request/response flow diagrams to api-design and api-gateway-advanced skills for better visualization of processes.
- Introduced configuration loading flow in configuration-management skill to clarify the configuration process.
- Included error propagation flow in error-handling-patterns skill to illustrate error handling across layers.
- Enhanced various skills with additional diagrams to improve understanding of complex concepts.

These updates aim to provide clearer guidance and improve the overall documentation experience for developers.
2026-01-01 23:22:54 +07:00
Ho Ngoc Hai
6399cf18db Update skill metadata to improve consistency and clarity
- Changed 'dependencies' field to 'compatibility' in multiple skills for uniformity
- Added a detailed reference link in the microservices-development-process skill for enhanced guidance

These updates ensure a more coherent structure across the documentation, aiding developers in understanding compatibility requirements.
2026-01-01 17:12:27 +07:00
Ho Ngoc Hai
ed1eb2b6e4 Update skill metadata and enhance documentation across multiple skills
- Change 'dependencies' to 'compatibility' in various skills for consistency
- Add detailed examples and best practices to improve clarity in api-design, api-gateway-advanced, data-consistency-patterns, database-prisma, deployment-kubernetes, event-driven-architecture, inter-service-communication, observability-monitoring, security, and testing-patterns
- Refine Common Mistakes sections with BAD/GOOD code examples for better learning

All skills now feature improved structure and comprehensive guidance for developers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-01 16:14:11 +07:00
Ho Ngoc Hai
6436fafcbd Add Common Mistakes sections to remaining 4 skills
- project-rules: directory structure, naming, response format, bilingual comments
- security: password hashing, secrets, input validation, logging sensitive data
- testing-patterns: implementation details, shared state, mocking, edge cases
- api-design: RESTful URLs, response format, status codes, pagination

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 11:23:33 +07:00
Ho Ngoc Hai
8279bf2bd8 Add Resources sections and cross-references, fix TypeScript types in skills
- Add Resources sections to all 26 skills (7 were missing)
- Add cross-references between related skills (resilience-patterns, middleware-patterns)
- Replace `any` with proper types/`unknown` in api-gateway-advanced, middleware-patterns
- Add Common Mistakes section to comment-code skill
- Add type definitions for API composition (CreateOrderInput, OrderWithPaymentResult)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 11:19:08 +07:00
Ho Ngoc Hai
5d60403488 Complete Quick Reference and Common Mistakes for remaining 5 skills
Added comprehensive Quick Reference tables and Common Mistakes sections to:

- api-gateway-advanced: Traefik patterns, API composition, middleware order
- api-versioning-strategy: Versioning strategies, deprecation lifecycle, headers
- infrastructure-as-code: Terraform commands, GitOps workflow, module structure
- microservices-development-process: Phase overview, quick commands, file structure
- service-discovery-registry: K8s DNS patterns, health checks, load balancing

All 26 skills now have:
- Quick Reference tables for fast lookup
- Common Mistakes with BAD/GOOD code examples
- Practical patterns and essential imports

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 11:09:13 +07:00
Ho Ngoc Hai
a0dda79478 Add Quick Reference and Common Mistakes sections to 14 skills
Enhanced skills with practical quick reference tables and common mistakes:

Skills updated:
- database-prisma: CRUD patterns, schema types, query examples
- caching-patterns: TTL guidelines, key patterns, cache layers
- observability-monitoring: Log levels, metrics, health checks
- middleware-patterns: Middleware order, async patterns, imports
- error-handling-patterns: Error classes, response format, codes
- repository-pattern: BaseRepository methods, query options
- deployment-kubernetes: kubectl commands, resource sizing
- configuration-management: Config types, Zod validation
- event-driven-architecture: Kafka concepts, event structure
- performance-optimization: Profiling, connection pooling
- service-layer-patterns: Layer responsibilities, DI patterns
- data-consistency-patterns: Saga patterns, idempotency
- inter-service-communication: Protocol selection, client setup
- cicd-advanced-patterns: Deployment strategies, rollback

All sections include:
- Quick Reference tables with practical patterns
- Common Mistakes with BAD/GOOD code examples
- Essential commands and imports

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 11:05:36 +07:00
Ho Ngoc Hai
2cfe903ebb Enhance skills with improved metadata and Quick Reference sections
- Shorten all skill descriptions to under 200 characters (Claude requirement)
- Add dependencies field to 22 skills for better context
- Add Quick Reference sections to key skills (project-rules, security,
  testing-patterns, api-design, resilience-patterns)
- Significantly expand resilience-patterns skill with:
  - Bulkhead pattern implementation
  - Combined ResilienceService class
  - Health check integration example
  - Expanded Common Mistakes with code examples
- Standardize skill structure following Claude and agentskills.io best practices

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 10:58:37 +07:00
Ho Ngoc Hai
2e55a501fd Update skill documentation to reflect the addition of a new Cursor Skill, increasing the total from 25 to 26 in both English and Vietnamese README files. 2026-01-01 10:10:58 +07:00
Ho Ngoc Hai
478254400a Refactor service documentation and enhance bilingual support
- Updated service template structure in `ARCHITECTURE.md` and `README.md` for clarity and usability.
- Enhanced bilingual documentation across skills, increasing the number of available skills from 15 to 25.
- Added new sections on event-driven architecture, inter-service communication, and performance optimization.
- Improved formatting and removed outdated references to streamline the documentation experience.
2026-01-01 10:06:27 +07:00
Ho Ngoc Hai
9b6c585f57 Enhance documentation structure and improve bilingual support across skills
- Updated skill documentation files to include structured metadata for better organization.
- Enhanced bilingual descriptions and guidelines for clarity in both English and Vietnamese.
- Refined sections on usage, best practices, and related skills to ensure consistency across all documentation.
- Improved formatting and removed outdated references to streamline the documentation experience.
- Added best practices checklists to relevant skills for better usability and adherence to standards.
2026-01-01 07:35:44 +07:00
Ho Ngoc Hai
fb5434188a Update service configurations and enhance bilingual documentation
- Refined service configurations to improve clarity and usability.
- Enhanced bilingual documentation across various files for better understanding of service structure and usage.
- Updated deployment scripts and workflows to align with recent changes.
- Removed outdated references and files to streamline the project structure.
2025-12-30 21:10:59 +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
7a4bda8da7 Refactor service template and improve documentation for better usability
- Updated service template with new features and improved structure.
- Enhanced bilingual documentation across various files for clarity.
- Refined configuration files for better guidance and usability.
- Improved error handling and logging mechanisms for enhanced debugging.
- Added new dependencies and updated existing ones for better performance.
2025-12-29 11:14:00 +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
d92cfb3bf3 Add Promtail service to Docker Compose and update Loki configuration
- Introduced a new Promtail service in `docker-compose.observability.yml` for log collection.
- Configured Promtail with necessary volumes and command for log processing.
- Updated `loki-config.yml` to include `allow_structured_metadata` setting for enhanced metadata handling.
2025-12-27 10:47:35 +07:00
Ho Ngoc Hai
5ff8035013 Remove local development README and enhance scripts for cross-platform compatibility
- Deleted `README.md` for local development setup as it was deemed unnecessary.
- Updated `setup-neon.sh`, `start-all.sh`, and `create-service.sh` scripts to source an OS helper for improved cross-platform command execution.
- Modified commands in `init-project.sh` to reflect the new script structure for starting services.
2025-12-27 10:26:04 +07:00
Ho Ngoc Hai
29c40ea681 Update project documentation and scripts for improved setup and bilingual support
- Enhanced `README.md` with a quick start guide and detailed project structure.
- Updated `SETUP_GUIDE.md` by removing it as it was redundant.
- Improved `local-development.md` and `development.md` with clearer instructions for database migrations.
- Added bilingual comments in various scripts for better understanding and usability.
- Updated `.gitignore` to include specific build scripts while ignoring others.
- Enhanced `scripts` for database management, including backup and seeding functionalities with bilingual support.
2025-12-27 10:12:46 +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