You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(claude): update development workflow guidelines
Update CLAUDE.md with refined development workflow guidelines and best practices.
Changes:
- Clarify internationalization requirements and best practices
- Update design system guidelines with emphasis on minimalism
- Refine metadata and SEO best practices
- Update development workflow recommendations
- Add DRY principle section for code quality
These updates ensure better alignment with current project structure and development practices.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Internationalization (i18n)
6
6
7
-
**CRITICAL REQUIREMENTS:**
8
-
9
7
When creating or modifying any page, module, or data:
10
-
-**MUST support at least 3 languages:** English, Simplified Chinese (zh-Hans), and German (de)
8
+
-**MUST support at least 3 languages:** English, Simplified Chinese (zh-Hans), and German (de), NEVER hardcode `'en' | 'zh-Hans'`
11
9
-**MUST use the localized Link component:** Always import and use `import { Link } from '@/i18n/navigation'` instead of Next.js default Link
12
10
13
11
### Localization Best Practices
@@ -23,20 +21,29 @@ When creating or modifying any page, module, or data:
23
21
-**Minimalist approach:** Follow a unified, extremely minimalist design style throughout the entire application
24
22
-**No rounded corners:** All controls, components, labels, and UI elements MUST use sharp corners (border-radius: 0)
25
23
-**Restrained color usage:** Use colors extremely sparingly and intentionally. Prefer grayscale and limit accent colors to essential UI elements only. If colors must be used, prefer low-saturation designs.
26
-
-**Icon usage:** Avoid using emoji or any other characters as icons. Prioritize SVG for icons.
24
+
-**Icon usage:**Prefer using Lucide SVG icons. Avoid using emoji or any other characters as icons.
27
25
-**Page width:**
28
26
-`max-w-8xl`: for all pages globally
29
-
-`max-w-5xl`: for content pages and homepage
27
+
-`max-w-6xl`: for content pages and homepage
30
28
31
29
## Coding Principles
32
30
33
-
**CRITICAL: Follow these principles rigorously in all code:**
34
-
35
31
### DRY - Don't Repeat Yourself
36
32
- Eliminate code duplication by extracting common logic
37
33
- Reuse existing components, functions, and translation keys
38
34
- Create shared utilities when patterns emerge
39
35
36
+
## Metadata & SEO
37
+
38
+
-**File-based OG images:** Use `opengraph-image.tsx` files for all routes, NOT code-based image paths
39
+
-**Request memoization:** Wrap all data fetchers with React `cache()` to prevent duplicate fetching in `generateMetadata()` and page components
40
+
-**Type-safe locales:** Always use `import type { Locale } from '@/i18n/config'`
41
+
-**Auto-detected OG images:** Do NOT manually specify `images` in OpenGraph metadata - Next.js auto-detects `opengraph-image.tsx` files
42
+
43
+
**OG Image Design:**
44
+
- Size: 1200x630px (OpenGraph standard)
45
+
- Follow global design system strictly
46
+
40
47
## Development Workflow
41
48
42
49
-**Development server:** Do not start `npm run dev` automatically. User will start it manually when needed.
0 commit comments