C.W.K.
Stream
Lesson 08 of 08 · published

Production Checklist

~24 min · checklist, launch, audit

Level 0Curious
0 XP0/68 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

Performance

  • Lighthouse audit — 모든 metric 90+.
  • Bundle analyzer 돌림; client chunk 에 surprise 없음.
  • 무거운 library 가 Server Component 안에만.
  • Above-the-fold image 에 preload.
  • 모든 font 위해 next/font.
  • Route 별 caching 전략 명시적.

SEO

  • 모든 page 에 metadata (title, description, OG).
  • app/sitemap.tssitemap.xml 생성.
  • app/robots.ts 가 crawl rule 정의.
  • OG image 정확히 render (Twitter Card validator).

Security

  • next.config.ts 에 security header (CSP, X-Frame-Options, HSTS).
  • 어떤 NEXT_PUBLIC_ variable 에도 secret 없음.
  • Server Action 이 input validate + auth check.
  • Security patch 위해 최신 Next.js minor.

Error handling

  • Custom not-found.tsx.
  • App root 에 error.tsx.
  • Root layout 위한 global-error.tsx.
  • Error tracker (Sentry) wire.

Accessibility

  • 모든 image 에 alt.
  • 모든 input 에 label.
  • Keyboard navigation 작동.
  • Color contrast 가 WCAG AA pass.
  • Screen reader sweep 끝남.

Code

next.config 통한 security header·ts
// next.config.ts
import type { NextConfig } from 'next';

const config: NextConfig = {
  async headers() {
    return [{
      source: '/(.*)',
      headers: [
        { key: 'X-Frame-Options', value: 'DENY' },
        { key: 'X-Content-Type-Options', value: 'nosniff' },
        { key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
        { key: 'Strict-Transport-Security', value: 'max-age=31536000; includeSubDomains' },
        { key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=()' },
      ],
    }];
  },
};
export default config;
sitemap 와 robots·ts
// app/sitemap.ts
import type { MetadataRoute } from 'next';

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
  const posts = await getAllPosts();
  return [
    { url: 'https://myapp.com', lastModified: new Date(), priority: 1 },
    ...posts.map(p => ({
      url: `https://myapp.com/blog/${p.slug}`,
      lastModified: p.updatedAt,
      priority: 0.7,
    })),
  ];
}

// app/robots.ts
import type { MetadataRoute } from 'next';

export default function robots(): MetadataRoute.Robots {
  return {
    rules: { userAgent: '*', allow: '/', disallow: '/admin' },
    sitemap: 'https://myapp.com/sitemap.xml',
  };
}

External links

Exercise

Deploy 된 어떤 Next.js project 든 골라서 위 checklist 통째로 돌려. 어떤 item 이 pass / fail 인지 문서화하고 이번 주에 fix 할 셋 골라.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.