Nội dung bài họcLesson content
Testing: test trước khi ra mắtTesting: test before launch
Trước khi launch, test kỹ: (1) Unit test — từng function. (2) Integration test — flow end-to-end. (3) Cross-browser test — Chrome, Firefox, Safari, Edge. (4) Mobile test — iOS, Android. (5) Load test — chịu được traffic cao. (6) User acceptance test — cho người thật dùng thử.Before launch, test thoroughly: (1) Unit tests — each function. (2) Integration tests — end-to-end flow. (3) Cross-browser tests — Chrome, Firefox, Safari, Edge. (4) Mobile tests — iOS, Android. (5) Load tests — handle high traffic. (6) User acceptance tests — real users try it.
Security reviewSecurity review
Kiểm tra bảo mật trước launch: (1) SQL injection, XSS, CSRF (xem bài 24). (2) Authentication — JWT hết hạn, refresh token. (3) Authorization — user không truy cập data người khác. (4) Rate limit — chống brute force. (5) Secrets — không lộ API key. (6) HTTPS bắt buộc. (7) Dependency audit — npm audit.Security review before launch: (1) SQL injection, XSS, CSRF (see lesson 24). (2) Authentication — JWT expiry, refresh tokens. (3) Authorization — users can't access others' data. (4) Rate limiting — prevent brute force. (5) Secrets — no exposed API keys. (6) HTTPS mandatory. (7) Dependency audit — npm audit.
Performance và SEOPerformance and SEO
Performance: đo bằng Lighthouse — mục tiêu >90. Tối ưu: nén ảnh (WebP), minify JS/CSS, lazy load, CDN. Core Web Vitals: LCP <2.5s, FID <100ms, CLS <0.1. SEO: meta tags (title, description), sitemap.xml, robots.txt, hreflang, structured data (JSON-LD), canonical URL.Performance: measure with Lighthouse — target >90. Optimize: compress images (WebP), minify JS/CSS, lazy load, CDN. Core Web Vitals: LCP <2.5s, FID <100ms, CLS <0.1. SEO: meta tags (title, description), sitemap.xml, robots.txt, hreflang, structured data (JSON-LD), canonical URL.
Analytics, Legal, SupportAnalytics, Legal, Support
Analytics: cài Google Analytics hoặc Plausible — theo dõi traffic, conversion. Legal: Terms of Service, Privacy Policy, Cookie Policy, GDPR compliance. Support: tạo trang /help, FAQ, email support, docs. Chuẩn bị phản hồi nhanh trong tuần đầu sau launch.Analytics: install Google Analytics or Plausible — track traffic, conversion. Legal: Terms of Service, Privacy Policy, Cookie Policy, GDPR compliance. Support: create /help page, FAQ, email support, docs. Prepare fast responses in the first week after launch.