Tài liệu này trình bày lộ trình đầy đủ để phát triển phần mềm từ ý tưởng đến vận hành, tận dụng tối đa Claude Code CLI trong mọi giai đoạn.
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ Phase 1 │──▶│ Phase 2 │──▶│ Phase 3 │──▶│ Phase 4 │
│ Ý tưởng │ │ Khởi tạo │ │ Phát triển│ │ Testing │
│ & Thiết │ │ dự án │ │ tính năng│ │ & QA │
│ kế │ │ │ │ │ │ │
│ 1-2 tuần │ │ 1-3 ngày │ │ 2-8 tuần │ │ 1-2 tuần │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
│ │
│ VÒNG LẶP PHÁT TRIỂN │
│ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ Phase 8 │◀──│ Phase 7 │◀──│ Phase 6 │◀──│ Phase 5 │
│ Vận hành │ │ Phát hành│ │ Deploy │ │ DevOps │
│ & Bảo trì│ │ │ │ │ │ & CI/CD │
│ │ │ │ │ │ │ │
│ Liên tục │ │ 1-2 tuần │ │ 1-3 ngày │ │ 3-5 ngày │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
Sử dụng Claude Code để phân tích yêu cầu dự án một cách có hệ thống:
claude "Phân tích yêu cầu cho dự án [tên dự án]:
- Mục tiêu business chính
- Danh sách user stories theo priority
- Functional requirements chi tiết
- Non-functional requirements (hiệu năng, bảo mật, khả năng mở rộng)
- Constraints (ngân sách, thời gian, nhân lực)
- Rủi ro tiềm ẩn và cách giảm thiểu"
Phân tích đối thủ cạnh tranh:
claude "Phân tích các sản phẩm cạnh tranh với [mô tả sản phẩm]:
- Tính năng nổi bật của từng đối thủ
- Điểm mạnh/yếu
- Cơ hội khác biệt hóa
- Bài học rút ra"
Skills khuyên dùng:
/product-skills:product-manager-toolkit
/pm-skills:senior-pm
/engineering-skills:senior-architect
claude "Thiết kế kiến trúc cho hệ thống [mô tả chi tiết]:
- System architecture diagram (mô tả dạng text)
- Các thành phần chính và mối quan hệ
- Database schema (bảng, quan hệ, index)
- API design (endpoints, methods, payload)
- Tech stack recommendation với lý do
- Deployment architecture (cloud, container, CDN)
- Chiến lược caching
- Chiến lược xử lý lỗi"
Thiết kế chi tiết từng module:
claude "Thiết kế chi tiết module [tên module]:
- Responsibility
- Input/Output
- Dependencies
- Error handling
- Sequence diagram mô tả flow chính"
/engineering-skills:tech-stack-evaluator
claude "So sánh tech stack cho dự án [mô tả]:
Yêu cầu: [liệt kê yêu cầu cụ thể]
So sánh các lựa chọn:
- Backend: Node.js vs Go vs Python
- Frontend: Next.js vs Nuxt vs SvelteKit
- Database: PostgreSQL vs MongoDB vs MySQL
- Cache: Redis vs Memcached
- Message Queue: RabbitMQ vs Kafka
- Triển khai: Docker + K8s vs Serverless
Tiêu chí: hiệu năng, tốc độ phát triển, ecosystem, chi phí vận hành"
Tham khảo: 08-database-postgresql.md
claude "Thiết kế database schema cho hệ thống [mô tả]:
- ERD diagram (mô tả text)
- Danh sách bảng với columns, types, constraints
- Quan hệ giữa các bảng
- Indexes cần thiết
- Migration strategy
- Seed data mẫu"
claude "Thiết kế RESTful API cho hệ thống [mô tả]:
- Danh sách endpoints theo resource
- HTTP methods và status codes
- Request/Response schema (JSON)
- Authentication flow
- Rate limiting strategy
- Versioning strategy
- OpenAPI/Swagger spec"
claude "Tạo Technical Design Document (TDD) cho dự án [tên]:
- Executive Summary
- Architecture Overview
- Component Design
- Data Model
- API Specification
- Security Design
- Deployment Plan
- Risk Assessment"
Skills khuyên dùng:
/document-skills:doc-coauthoring
/engineering-skills:senior-architect
Tùy theo tech stack đã chọn:
Node.js/TypeScript:
claude "Tạo dự án Node.js TypeScript với cấu trúc production-ready:
- Express/Fastify server
- TypeScript strict mode
- ESLint + Prettier
- Cấu trúc thư mục: src/controllers, src/services, src/models, src/middleware
- Environment config với dotenv
- Logger (Winston/Pino)
- Error handling middleware
- Health check endpoint"
Tham khảo: 05-nodejs-typescript.md
Golang:
claude "Tạo dự án Go với cấu trúc production-ready:
- Gin/Echo framework
- Project layout theo golang-standards
- Cấu trúc: cmd/, internal/, pkg/, api/
- Config management (Viper)
- Structured logging (Zap/Zerolog)
- Graceful shutdown
- Makefile với các targets phổ biến"
Tham khảo: 06-golang.md
Next.js:
claude "Tạo dự án Next.js với cấu trúc production-ready:
- App Router
- TypeScript strict mode
- Tailwind CSS
- Cấu trúc: app/, components/, lib/, hooks/, types/
- SEO setup
- PWA config
- Internationalization (i18n) nếu cần"
Tham khảo: 07-nextjs.md
Tạo file CLAUDE.md tại thư mục gốc dự án:
claude "Tạo file CLAUDE.md cho dự án [mô tả] với:
- Mô tả dự án
- Tech stack
- Cấu trúc thư mục
- Quy ước code (naming, patterns)
- Lệnh build/test/run
- Quy tắc commit message
- Các lưu ý đặc biệt"
Tạo file .claudeignore:
claude "Tạo file .claudeignore phù hợp cho dự án [tech stack]:
- node_modules, vendor, dist, build
- File secrets (.env, credentials)
- File binary, media lớn
- Cache directories"
Tham khảo: 01-cai-dat-va-cau-hinh.md
claude "Tạo Docker Compose cho môi trường development:
- App container với hot reload
- PostgreSQL/MySQL container
- Redis container
- Adminer/pgAdmin (tùy chọn)
- Volume mounts cho persistent data
- Network configuration"
claude "Cấu hình Git hooks với Husky (hoặc tương đương):
- pre-commit: lint, format
- commit-msg: validate commit message format
- pre-push: run tests"
claude "Tạo GitHub Actions workflow cơ bản:
- Trigger on push/PR to main
- Install dependencies
- Run linter
- Run tests
- Build check
- Report kết quả"
Tham khảo: 10-devops-va-cicd.md (nếu có)
Quy trình cho mỗi tính năng:
# Bước 1: Tạo branch mới
git checkout -b feature/ten-tinh-nang
# Bước 2: Yêu cầu Claude implement
claude "Implement tính năng [mô tả chi tiết]:
- Acceptance criteria: [liệt kê]
- Input/Output mong đợi
- Edge cases cần xử lý
- Viết kèm unit tests"
# Bước 3: Review code
/simplify
# Bước 4: Chạy tests
claude "Chạy tests và fix nếu có lỗi"
# Bước 5: Commit
/commit
claude "Implement API endpoints cho module [tên]:
- CRUD operations
- Input validation (Joi/Zod/validator)
- Error handling thống nhất
- Pagination, filtering, sorting
- Response format chuẩn
- Unit tests cho mỗi endpoint"
claude "Tạo API documentation (Swagger/OpenAPI) cho các endpoints vừa tạo"
/engineering-skills:senior-frontend
claude "Implement trang [tên trang] theo thiết kế:
- Component structure
- State management
- API integration
- Responsive design
- Loading/Error states
- Accessibility (a11y)"
claude "Tạo reusable components:
- Button, Input, Select, Modal, Toast
- Table với pagination
- Form với validation
- Layout components (Header, Sidebar, Footer)"
Tham khảo: 08-database-postgresql.md
claude "Tạo database migrations cho module [tên]:
- Create tables
- Add indexes
- Add constraints
- Seed data mẫu cho development"
claude "Implement data access layer:
- Repository pattern hoặc ORM models
- Query builders cho các truy vấn phức tạp
- Connection pooling config
- Transaction handling"
claude "Implement hệ thống authentication:
- JWT access + refresh token
- Login/Register/Logout endpoints
- Password hashing (bcrypt/argon2)
- Email verification flow
- Password reset flow
- Rate limiting cho auth endpoints"
claude "Implement authorization (RBAC):
- Role definitions (admin, user, moderator, ...)
- Permission matrix
- Middleware kiểm tra quyền
- Guard cho API endpoints
- Guard cho frontend routes"
# === BUỔI SÁNG ===
# Tiếp tục phiên làm việc hôm qua
claude --continue
# Xem trạng thái dự án
claude "Tóm tắt trạng thái dự án: những gì đã xong, đang làm, sắp làm"
# === PHÁT TRIỂN ===
# Implement tính năng mới
claude "Implement tính năng [mô tả]"
# Review và tối ưu code vừa viết
/simplify
# Fix bug
claude "Debug và fix lỗi: [mô tả lỗi, error log]"
# Refactor
claude "Refactor module [tên] để cải thiện [readability/performance/maintainability]"
# === CUỐI NGÀY ===
# Review tất cả thay đổi
claude "Review tất cả thay đổi hôm nay, liệt kê những gì đã hoàn thành"
# Commit
/commit
# Push
git push origin feature/ten-tinh-nang
# Review code trước khi merge
/code-review
# Review PR cụ thể
claude "Review PR #[số] và đề xuất cải thiện"
# Review bảo mật
/engineering-skills:senior-security
Tham khảo: 09-testing-va-qa.md
claude "Viết unit tests cho module [tên]:
- Test tất cả public functions
- Happy path và edge cases
- Mock external dependencies
- Đạt coverage tối thiểu 80%"
# Chạy tests với coverage report
claude "Chạy toàn bộ unit tests và phân tích coverage report:
- Những file nào chưa đạt 80%?
- Những function nào chưa có test?
- Đề xuất thêm test cases"
claude "Viết integration tests cho API module [tên]:
- Test flow đầy đủ từ request đến response
- Test database operations thực tế (dùng test DB)
- Test authentication/authorization
- Test error scenarios
- Cleanup data sau mỗi test"
/engineering-skills:playwright-pro
claude "Viết E2E tests với Playwright cho flow [mô tả]:
- Setup test fixtures
- Test user journey hoàn chỉnh
- Screenshot comparison (nếu cần)
- Test trên nhiều viewport (mobile, tablet, desktop)
- Test cross-browser (Chromium, Firefox, WebKit)"
claude "Tạo kịch bản performance test với k6/Artillery:
- Load test: 100 concurrent users trong 5 phút
- Stress test: tăng dần đến 1000 users
- Soak test: 50 users trong 1 giờ
- Phân tích kết quả và đề xuất tối ưu"
/engineering-skills:senior-security
/engineering-skills:senior-secops
claude "Thực hiện security audit cho dự án:
- OWASP Top 10 checklist
- SQL Injection / XSS / CSRF check
- Authentication vulnerabilities
- Authorization bypass
- Sensitive data exposure
- Dependency vulnerabilities (npm audit / go vuln)
- Environment variable security
- CORS configuration
- Rate limiting
- Input validation"
/engineering-skills:senior-qa
claude "Tạo QA checklist hoàn chỉnh cho dự án:
- Functional testing checklist
- UI/UX checklist
- Performance checklist
- Security checklist
- Accessibility checklist
- Browser compatibility checklist
- Mobile responsiveness checklist
- Data integrity checklist"
/engineering-skills:senior-devops
claude "Tạo Dockerfile production-optimized:
- Multi-stage build
- Minimize image size
- Non-root user
- Health check
- Security best practices
- .dockerignore file"
claude "Tạo Docker Compose cho production:
- App service với replicas
- Database với backup config
- Redis với persistence
- Nginx reverse proxy
- SSL termination
- Log aggregation
- Monitoring stack (Prometheus + Grafana)"
claude "Tạo CI/CD pipeline hoàn chỉnh (GitHub Actions):
Jobs:
1. Lint & Format check
2. Unit tests + coverage
3. Integration tests
4. Security scan (Snyk/Trivy)
5. Build Docker image
6. Push to registry
7. Deploy to staging (auto)
8. E2E tests on staging
9. Deploy to production (manual approval)
10. Post-deploy health check
11. Rollback tự động nếu health check fail"
claude "Thiết lập quản lý environment configuration:
- Development / Staging / Production configs
- Secret management (GitHub Secrets / Vault)
- Environment-specific Docker Compose overrides
- Feature flags setup
- Database migration strategy cho mỗi môi trường"
claude "Thiết lập monitoring stack:
- Application metrics (Prometheus)
- Dashboards (Grafana)
- Log aggregation (Loki/ELK)
- Alerting rules:
+ CPU/Memory > 80%
+ Error rate > 1%
+ Response time P95 > 500ms
+ Disk space < 20%
+ SSL certificate sắp hết hạn"
/engineering-skills:aws-solution-architect
claude "Tạo Terraform config cho infrastructure:
- VPC, Subnets, Security Groups
- ECS/EKS cluster
- RDS instance
- ElastiCache (Redis)
- S3 buckets
- CloudFront CDN
- Route53 DNS
- ACM SSL certificates
- IAM roles và policies"
claude "Hướng dẫn deploy lên staging environment:
- Checklist trước khi deploy
- Lệnh deploy
- Verify deployment
- Smoke tests
- Rollback procedure nếu có lỗi"
# Deploy với Docker
docker compose -f docker-compose.staging.yml up -d
# Kiểm tra status
docker compose -f docker-compose.staging.yml ps
# Xem logs
docker compose -f docker-compose.staging.yml logs -f app
claude "Tạo production deployment checklist:
- [ ] Tất cả tests pass trên staging
- [ ] Security audit hoàn thành
- [ ] Performance test đạt yêu cầu
- [ ] Database migration đã test trên staging
- [ ] Backup database production trước khi deploy
- [ ] Thông báo team về deployment window
- [ ] Monitoring dashboards sẵn sàng
- [ ] Rollback plan đã document"
# Deploy production
docker compose -f docker-compose.production.yml up -d
# Health check
curl -f https://api.example.com/health
# Verify critical endpoints
claude "Tạo script verify sau deploy: kiểm tra tất cả critical endpoints"
claude "Hướng dẫn cấu hình:
- Domain pointing (DNS A/CNAME records)
- SSL certificate (Let's Encrypt / ACM)
- Nginx/Caddy reverse proxy config
- HTTP to HTTPS redirect
- HSTS header
- Security headers (CSP, X-Frame-Options, ...)"
claude "Thiết lập post-deployment monitoring:
- Real-time error tracking (Sentry)
- Uptime monitoring (UptimeRobot / Healthchecks.io)
- Performance monitoring (APM)
- User analytics
- Alert channels (Slack / Email / SMS)"
claude "Checklist phát hành web:
- SEO optimization (meta tags, sitemap, robots.txt)
- Open Graph tags cho social sharing
- Google Analytics / Plausible setup
- Cookie consent banner
- Terms of Service & Privacy Policy
- Performance audit (Lighthouse > 90)
- Accessibility audit (WCAG 2.1 AA)"
Tham khảo: 12-app-store-va-web.md (nếu có)
claude "Cấu hình PWA:
- Web manifest (name, icons, theme)
- Service Worker (caching strategy)
- Offline fallback page
- Install prompt
- Push notifications (nếu cần)
- Test trên các trình duyệt khác nhau"
claude "Hướng dẫn submit App Store:
- Apple Developer Account setup
- App Store Connect configuration
- Screenshots cho mỗi device size
- App description, keywords
- Privacy policy URL
- Review guidelines checklist
- TestFlight beta testing
- Submit for review"
claude "Hướng dẫn submit Google Play:
- Google Play Console setup
- Store listing (title, description, screenshots)
- Content rating questionnaire
- Privacy policy
- App signing
- Internal/Closed/Open testing tracks
- Production release"
claude "Lên kế hoạch marketing launch:
- Landing page
- Product Hunt launch
- Social media announcements
- Email campaign cho early users
- Press kit
- Blog post giới thiệu sản phẩm
- Kênh support (Discord / Telegram / Email)"
claude "Tạo runbook cho operations:
- Daily health check procedure
- Weekly performance review
- Monthly security scan
- Quarterly dependency update
- Incident response procedure
- Escalation matrix"
# Kiểm tra hệ thống hàng ngày
claude "Phân tích logs và metrics hôm nay:
- Error rate trends
- Response time trends
- Resource utilization
- Unusual patterns"
# Khi nhận bug report
claude "Debug lỗi: [mô tả lỗi]
Error log: [paste error log]
Steps to reproduce: [các bước tái hiện]
Expected vs Actual behavior"
# Fix và test
claude "Fix bug [mô tả], viết regression test để đảm bảo không tái phát"
# Deploy hotfix
claude "Tạo hotfix release cho bug [mô tả]:
- Cherry-pick fix vào release branch
- Chạy tests
- Deploy staging -> verify -> deploy production"
# Lặp lại quy trình Phase 3
claude "Phân tích và lên kế hoạch implement tính năng mới [mô tả]:
- Impact analysis
- Breaking changes?
- Database migration cần thiết?
- Backward compatibility
- Feature flag strategy
- Rollout plan (canary / blue-green)"
claude "Phân tích và tối ưu hiệu năng:
- Slow queries analysis
- N+1 query detection
- Caching strategy review
- Frontend bundle size analysis
- Image optimization
- CDN configuration review
- Database indexing review
- Connection pooling optimization"
# Quét dependency vulnerabilities
claude "Kiểm tra và cập nhật dependencies:
- npm audit / go vuln check
- Outdated packages list
- Breaking changes khi update
- Update strategy (minor first, then major)
- Test sau khi update"
# Review bảo mật định kỳ
/engineering-skills:senior-security
| Phase | Skills sử dụng | File tham khảo |
|---|---|---|
| 1 - Ý tưởng & Thiết kế | /product-skills:product-manager-toolkit, /engineering-skills:senior-architect, /engineering-skills:tech-stack-evaluator, /pm-skills:senior-pm |
01-cai-dat-va-cau-hinh.md, 04-prompt-hieu-qua.md |
| 2 - Khởi tạo dự án | /engineering-skills:senior-backend, /engineering-skills:senior-frontend, /engineering-skills:senior-devops |
01-cai-dat-va-cau-hinh.md, 05-nodejs-typescript.md, 06-golang.md, 07-nextjs.md |
| 3 - Phát triển | /simplify, /code-review, /commit, /engineering-skills:senior-backend, /engineering-skills:senior-frontend |
05-nodejs-typescript.md, 06-golang.md, 07-nextjs.md, 08-database-postgresql.md |
| 4 - Testing & QA | /engineering-skills:senior-qa, /engineering-skills:playwright-pro, /engineering-skills:senior-security |
09-testing-va-qa.md |
| 5 - DevOps & CI/CD | /engineering-skills:senior-devops, /engineering-skills:aws-solution-architect |
10-devops-va-cicd.md (nếu có) |
| 6 - Deploy | /engineering-skills:senior-devops, /engineering-skills:senior-secops |
11-deploy-production.md (nếu có) |
| 7 - Phát hành | /engineering-skills:senior-frontend, /document-skills:doc-coauthoring |
12-app-store-va-web.md (nếu có) |
| 8 - Vận hành | /engineering-skills:senior-security, /engineering-skills:senior-devops, /simplify |
Tất cả file |
Tuần 1: ████████ Phase 1 - Ý tưởng & Thiết kế (rút gọn 1 tuần)
Tuần 1-2: ██████ Phase 2 - Khởi tạo dự án
Tuần 2-4: ████████████████ Phase 3 - Phát triển core features
Tuần 4-5: ████████ Phase 4 - Testing cơ bản
Tuần 5: ████ Phase 5 - CI/CD cơ bản
Tuần 5-6: ██████ Phase 6 - Deploy lên production
──────── Phase 7 & 8 - Phát hành đơn giản, bắt đầu vận hành
Đặc điểm MVP:
Tháng 1: ████████████ Phase 1 - Thiết kế đầy đủ
████████ Phase 2 - Khởi tạo & Setup hoàn chỉnh
Tháng 2-3: ████████████████████████ Phase 3 - Phát triển features
Tháng 3-4: ████████████ Phase 4 - Testing toàn diện
Tháng 4: ████████ Phase 5 - DevOps & CI/CD hoàn chỉnh
Tháng 4-5: ████████ Phase 6 - Deploy staging + production
Tháng 5: ████████ Phase 7 - Phát hành web + PWA
Tháng 5-6+: ████████████████ Phase 8 - Vận hành & iteration
Đặc điểm Full Product:
Tháng 1-2: ████████████████ Phase 1 - Thiết kế & Architecture review
Tháng 2-3: ████████████ Phase 2 - Setup infrastructure & standards
Tháng 3-7: ████████████████████████████████ Phase 3 - Phát triển
Tháng 7-8: ████████████ Phase 4 - QA toàn diện + UAT
Tháng 8-9: ████████████ Phase 5 - DevOps + IaC + Security hardening
Tháng 9-10: ████████████ Phase 6 - Deploy multi-environment
Tháng 10-11: ████████████ Phase 7 - Phát hành theo từng giai đoạn
Tháng 11-12+: ████████████████ Phase 8 - Vận hành, SLA, on-call
Đặc điểm Enterprise:
╔══════════════════════════════════════════════════════════╗
║ CHECKLIST TRƯỚC KHI GO-LIVE ║
╠══════════════════════════════════════════════════════════╣
║ ║
║ Code & Testing: ║
║ [ ] Tất cả tests pass ║
║ [ ] Code review hoàn thành ║
║ [ ] Security audit pass ║
║ [ ] Performance test đạt yêu cầu ║
║ [ ] No critical/high vulnerabilities ║
║ ║
║ Infrastructure: ║
║ [ ] SSL certificate cài đặt ║
║ [ ] DNS configured ║
║ [ ] CDN setup ║
║ [ ] Database backup hoạt động ║
║ [ ] Auto-scaling configured ║
║ ║
║ Monitoring: ║
║ [ ] Error tracking (Sentry) hoạt động ║
║ [ ] Uptime monitoring hoạt động ║
║ [ ] Alert channels configured ║
║ [ ] Dashboards sẵn sàng ║
║ [ ] Log aggregation hoạt động ║
║ ║
║ Documentation: ║
║ [ ] API documentation cập nhật ║
║ [ ] Runbook cho operations ║
║ [ ] Incident response plan ║
║ [ ] Rollback procedure documented ║
║ ║
║ Business: ║
║ [ ] Terms of Service ║
║ [ ] Privacy Policy ║
║ [ ] Cookie consent ║
║ [ ] Support channels sẵn sàng ║
║ ║
╚══════════════════════════════════════════════════════════╝
| File | Nội dung | Phase liên quan |
|---|---|---|
01-cai-dat-va-cau-hinh.md |
Cài đặt và cấu hình Claude Code | 1, 2 |
02-cac-lenh-co-ban.md |
Các lệnh cơ bản | Tất cả |
03-skills-va-plugins.md |
Skills và plugins | Tất cả |
04-prompt-hieu-qua.md |
Kỹ thuật viết prompt hiệu quả | Tất cả |
05-nodejs-typescript.md |
Phát triển với Node.js/TypeScript | 2, 3 |
06-golang.md |
Phát triển với Go | 2, 3 |
07-nextjs.md |
Phát triển với Next.js | 2, 3 |
08-database-postgresql.md |
Thiết kế và quản lý PostgreSQL | 1, 3 |
09-testing-va-qa.md |
Testing và QA | 4 |