- {/* EN: Display user avatar / VI: Hiển thị avatar người dùng */}
-

-
- {/* EN: User information section / VI: Phần thông tin người dùng */}
-
-
{user.name}
-
{user.email}
-
-
- );
-}
-```
-
-### Prisma Schema
-```prisma
-/// EN: User model for authentication and profile
-/// VI: Model người dùng cho xác thực và hồ sơ
-model User {
- /// EN: Unique identifier / VI: Mã định danh duy nhất
- id String @id @default(cuid())
-
- /// EN: User email (unique) / VI: Email người dùng (duy nhất)
- email String @unique
-
- /// EN: Hashed password / VI: Mật khẩu đã mã hóa
- password String
-
- /// EN: Display name / VI: Tên hiển thị
- name String
-
- /// EN: Account creation timestamp / VI: Thời gian tạo tài khoản
- createdAt DateTime @default(now())
-
- /// EN: Last update timestamp / VI: Thời gian cập nhật cuối
- updatedAt DateTime @updatedAt
-
- @@map("users")
-}
-```
-
-### API Controllers
-```typescript
-/**
- * EN: User management controller
- * VI: Controller quản lý người dùng
- */
-export class UserController {
- /**
- * EN: Get user by ID
- * VI: Lấy thông tin người dùng theo ID
- *
- * GET /api/users/:id
- */
- async getById(req: Request, res: Response) {
- try {
- // EN: Extract user ID from params
- // VI: Lấy ID người dùng từ params
- const { id } = req.params;
-
- // EN: Fetch user from database
- // VI: Lấy người dùng từ database
- const user = await this.userService.findById(id);
-
- if (!user) {
- return res.status(404).json({
- success: false,
- error: {
- code: 'USER_NOT_FOUND',
- message: 'User not found / Không tìm thấy người dùng',
- },
- });
- }
-
- return res.json({
- success: true,
- data: user,
- });
- } catch (error) {
- logger.error('Failed to get user', { error, userId: req.params.id });
- return res.status(500).json({
- success: false,
- error: {
- code: 'INTERNAL_ERROR',
- message: 'Internal server error / Lỗi máy chủ nội bộ',
- },
- });
- }
- }
-}
-```
-
-### Middleware
-```typescript
-/**
- * EN: Authentication middleware to verify JWT tokens
- * VI: Middleware xác thực để kiểm tra JWT token
- */
-export function authMiddleware(
- req: Request,
- res: Response,
- next: NextFunction
-) {
- // EN: Extract token from Authorization header
- // VI: Lấy token từ header Authorization
- const authHeader = req.headers.authorization;
- const token = authHeader?.replace('Bearer ', '');
-
- if (!token) {
- return res.status(401).json({
- success: false,
- error: {
- code: 'NO_TOKEN',
- message: 'Authentication required / Yêu cầu xác thực',
- },
- });
- }
-
- try {
- // EN: Verify token and extract payload
- // VI: Xác minh token và lấy payload
- const payload = jwt.verify(token, JWT_SECRET);
- req.user = payload;
- next();
- } catch (error) {
- return res.status(401).json({
- success: false,
- error: {
- code: 'INVALID_TOKEN',
- message: 'Invalid or expired token / Token không hợp lệ hoặc hết hạn',
- },
- });
- }
-}
-```
-
-## Best Practices
-
-### 1. Comment Placement
-- Place bilingual comments together (EN first, then VI)
-- Keep comments close to the code they describe
-- Use JSDoc format for functions and classes
-
-### 2. Comment Content
-- **DO**: Explain WHY, not WHAT (code shows what)
-- **DO**: Document complex logic and business rules
-- **DO**: Include parameter descriptions and return types
-- **DO**: Document error conditions and exceptions
-- **DON'T**: State the obvious
-- **DON'T**: Write redundant comments
-
-### 3. Language Guidelines
-- **English**: Use clear, concise technical English
-- **Vietnamese**: Use proper Vietnamese technical terms
-- Keep translations accurate and natural
-- Use consistent terminology across codebase
-
-### 4. Special Cases
-
-#### TODO Comments
-```typescript
-// TODO EN: Implement caching for better performance
-// TODO VI: Triển khai caching để cải thiện hiệu suất
-```
-
-#### FIXME Comments
-```typescript
-// FIXME EN: This causes memory leak, needs refactoring
-// FIXME VI: Đoạn này gây rò rỉ bộ nhớ, cần refactor
-```
-
-#### WARNING Comments
-```typescript
-// WARNING EN: Do not modify this without updating the database schema
-// WARNING VI: Không sửa đổi phần này mà không cập nhật schema database
-```
-
-### 5. Documentation Priority
-
-**High Priority** (Always document):
-- Public APIs and exported functions
-- Complex algorithms and business logic
-- Security-critical code
-- Configuration and environment setup
-- Error handling strategies
-
-**Medium Priority** (Document when helpful):
-- Helper functions with non-obvious behavior
-- Data transformations
-- Integration points with external services
-
-**Low Priority** (Optional):
-- Simple getters/setters
-- Self-explanatory code
-- Standard CRUD operations
-
-
-## Integration with Project Rules
-
-When commenting code in this project:
-- Follow the code organization from `project-rules` skill
-- Use consistent terminology with project documentation
-- Align with the API response format standards
-- Document according to the testing standards
-- Include security considerations where relevant
-
-## Quick Reference
-
-### Function Comment Template
-```typescript
-/**
- * EN: [Brief description in English]
- * VI: [Mô tả ngắn gọn bằng tiếng Việt]
- *
- * @param paramName - EN description / VI mô tả
- * @returns EN description / VI mô tả
- * @throws ErrorType EN when / VI khi nào
- */
-```
-
-### Inline Comment Template
-```typescript
-// EN: [English explanation]
-// VI: [Giải thích tiếng Việt]
-```
-
-### Complex Block Template
-```typescript
-// EN: Step N: [What this block does]
-// VI: Bước N: [Block này làm gì]
-```
diff --git a/docs/en/skills/configuration-management.md b/docs/en/skills/configuration-management.md
deleted file mode 100644
index b0db6753..00000000
--- a/docs/en/skills/configuration-management.md
+++ /dev/null
@@ -1,131 +0,0 @@
----
-name: configuration-management
-description: Configuration management patterns for GoodGo microservices including feature flags, dynamic configuration reloading, environment-specific configurations, and secrets management.
----
-
-# Configuration Management Patterns
-
-## When to Use This Skill
-
-Use this skill when:
-- Implementing feature flags and feature toggles
-- Managing environment-specific configurations
-- Implementing dynamic configuration reloading
-- Managing secrets and sensitive configuration
-- Implementing configuration validation
-
-## Key Patterns
-
-### Configuration Loading Flow
-
-The configuration loading process fetches configuration from multiple sources, validates it, and supports dynamic reloading:
-
-```mermaid
-flowchart TD
- Start([Application Startup]) --> LoadConfig[Load Configuration]
- LoadConfig --> FetchSource{Fetch from Source}
-
- FetchSource --> |Environment Variables| EnvVars[Read Env Vars]
- FetchSource --> |Config Files| ConfigFiles[Read JSON/YAML]
- FetchSource --> |Database| Database[Query Config Table]
- FetchSource --> |External Service| ExternalService[Call Config API]
-
- EnvVars --> Validate[Validate with Zod Schema]
- ConfigFiles --> Validate
- Database --> Validate
- ExternalService --> Validate
-
- Validate --> |Valid| StoreConfig[Store in Memory Map]
- Validate --> |Invalid| LogError[Log Validation Error]
- LogError --> ThrowError[Throw Error]
- ThrowError --> End([Application Fails to Start])
-
- StoreConfig --> CheckChange{Value Changed?}
- CheckChange --> |Yes| EmitEvent[Emit 'config-changed' Event]
- CheckChange --> |No| SkipEvent[Skip Event]
-
- EmitEvent --> Ready[Configuration Ready]
- SkipEvent --> Ready
- Ready --> End
-
- Ready --> AutoReload{Auto-Reload Enabled?}
- AutoReload --> |Yes| SetInterval[Set Interval Timer]
- AutoReload --> |No| End
- SetInterval --> Wait[Wait Interval]
- Wait --> LoadConfig
-```
-
-### Feature Flag Evaluation Flow
-
-Feature flags support multiple evaluation strategies including global flags, user-specific flags, and percentage-based rollouts:
-
-```mermaid
-flowchart TD
- Start([Check Feature Flag]) --> GetFlag[Get Flag by Key]
- GetFlag --> FlagExists{Flag Exists?}
-
- FlagExists --> |No| ReturnFalse[Return false]
- ReturnFalse --> End([End])
-
- FlagExists --> |Yes| CheckEnabled{Flag Enabled?}
- CheckEnabled --> |No| ReturnFalse
-
- CheckEnabled --> |Yes| HasUserId{User ID Provided?}
- HasUserId --> |No| ReturnTrue[Return true]
- ReturnTrue --> End
-
- HasUserId --> |Yes| CheckUserSpecific{User-Specific Flag?}
- CheckUserSpecific --> |Yes| MatchUser{User ID Matches?}
- MatchUser --> |Yes| ReturnTrue
- MatchUser --> |No| CheckPercentage
-
- CheckUserSpecific --> |No| CheckPercentage{Percentage Rollout?}
- CheckPercentage --> |No| ReturnTrue
-
- CheckPercentage --> |Yes| HashUser[Hash User ID]
- HashUser --> CalcHash[Calculate Hash % 100]
- CalcHash --> CompareHash{Hash < Percentage?}
-
- CompareHash --> |Yes| ReturnTrue
- CompareHash --> |No| ReturnFalse
-```
-
-### Feature Flags
-
-```typescript
-// Check if feature is enabled
-const enabled = await featureFlagService.isEnabled('new-feature', userId);
-
-if (enabled) {
- // Use new feature
-}
-```
-
-### Dynamic Configuration
-
-```typescript
-// Load and auto-reload configuration
-await configService.load();
-configService.startAutoReload(60000); // Reload every minute
-
-const value = configService.get('config-key', 'default-value');
-```
-
-### Configuration Validation
-
-```typescript
-// Validate with Zod
-const config = validateConfig(process.env);
-```
-
-## Best Practices
-
-1. Always validate configuration at startup
-2. Provide sensible defaults
-3. Never commit secrets to code
-4. Use feature flags for gradual rollouts
-
-## Resources
-
-- [Feature Flags Pattern](https://martinfowler.com/articles/feature-toggles.html)
-- Skill Source: `.cursor/skills/configuration-management/SKILL.md`
diff --git a/docs/en/skills/data-consistency-patterns.md b/docs/en/skills/data-consistency-patterns.md
deleted file mode 100644
index d3845a80..00000000
--- a/docs/en/skills/data-consistency-patterns.md
+++ /dev/null
@@ -1,363 +0,0 @@
----
-name: data-consistency-patterns
-description: Data consistency patterns for distributed microservices including Saga patterns, distributed transactions, eventual consistency, compensation, and idempotency. Use when handling distributed transactions, implementing eventual consistency, or managing data synchronization across services.
----
-
-# Data Consistency Patterns
-
-## When to Use This Skill
-
-Use this skill when:
-- Implementing distributed transactions across multiple services
-- Handling eventual consistency in microservices
-- Implementing Saga patterns for distributed workflows
-- Designing compensation strategies for failed transactions
-- Implementing idempotent operations
-- Managing data synchronization across services
-- Handling conflict resolution
-
-## Core Concepts
-
-### ACID vs BASE
-
-**ACID (Traditional):** Atomicity, Consistency, Isolation, Durability
-
-**BASE (Distributed):** Basic Availability, Soft state, Eventual consistency
-
-### Consistency Models
-
-- **Strong Consistency**: All nodes see same data at same time
-- **Eventual Consistency**: System becomes consistent over time
-- **Weak Consistency**: No guarantees about when consistency occurs
-
-## Key Patterns
-
-### Saga Orchestrator Pattern
-
-#### Saga Orchestration Flow
-
-The following diagram illustrates how a Saga orchestrator executes steps sequentially and handles compensation on failure:
-
-```mermaid
-sequenceDiagram
- participant Client
- participant Orchestrator
- participant Step1 as Step 1: Create Order
- participant Step2 as Step 2: Reserve Inventory
- participant Step3 as Step 3: Process Payment
-
- Client->>Orchestrator: Execute Saga
- Orchestrator->>Step1: Execute Step 1
- Step1-->>Orchestrator: Success (Order Created)
- Orchestrator->>Step2: Execute Step 2
- Step2-->>Orchestrator: Success (Inventory Reserved)
- Orchestrator->>Step3: Execute Step 3
- Step3-->>Orchestrator: Failure (Payment Failed)
- Orchestrator->>Step2: Compensate Step 2
- Step2-->>Orchestrator: Compensation Complete
- Orchestrator->>Step1: Compensate Step 1
- Step1-->>Orchestrator: Compensation Complete
- Orchestrator-->>Client: Saga Failed (Compensated)
-```
-
-#### Compensation Flow
-
-When a step fails, the orchestrator compensates all previously completed steps in reverse order:
-
-```mermaid
-flowchart TD
- Start([Saga Execution Starts]) --> Step1[Execute Step 1]
- Step1 -->|Success| Step2[Execute Step 2]
- Step1 -->|Failure| Fail1[Saga Failed