Skip to content

Commit 1ebda22

Browse files
NebraskaCoderclaude
andcommitted
Add i18n caching documentation and update CLAUDE.md
Document the root cause of random locale switching on Vercel: - next-intl's localeDetection reads Accept-Language header - This triggers dynamic rendering in Next.js - Vercel can't cache dynamic pages properly Includes: - Detailed technical analysis with request flow - Three solution options with pros/cons - Step-by-step implementation guide - Testing plan and debug commands - Links to relevant Next.js/next-intl issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent d1cbd64 commit 1ebda22

File tree

3 files changed

+431
-15
lines changed

3 files changed

+431
-15
lines changed

CLAUDE.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Rocky Linux Website - AI Assistant Instructions
1+
# CLAUDE.md
22

3-
This document provides instructions for AI assistants working with the Rocky Linux website codebase.
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
44

55
## Project Overview
66

@@ -21,17 +21,6 @@ npm run dev
2121
- `npm run test` - Run unit tests
2222
- `npm run e2e` - Run Playwright E2E tests
2323

24-
## Documentation Structure
25-
26-
Detailed documentation is organized in the `/docs` folder:
27-
28-
- **[Architecture Overview](./docs/architecture/overview.md)** - System design and structure
29-
- **[Tech Stack](./docs/architecture/tech-stack.md)** - Technologies and dependencies
30-
- **[Project Structure](./docs/architecture/project-structure.md)** - File organization
31-
- **[Development Guide](./docs/development/getting-started.md)** - Setup and development workflow
32-
- **[Component Guide](./docs/components/overview.md)** - UI component documentation
33-
- **[Deployment Guide](./docs/deployment/overview.md)** - Build and deployment processes
34-
3524
## Important Conventions
3625

3726
1. **TypeScript First** - All new code should be written in TypeScript
@@ -76,6 +65,9 @@ Detailed documentation is organized in the `/docs` folder:
7665
- Keep components small and focused
7766
- Document complex logic
7867

79-
## Need More Details?
68+
## Technical Documentation
69+
70+
Detailed technical documentation is available in the `/docs` folder:
8071

81-
Refer to the specific documentation files in the `/docs` folder for in-depth information about any aspect of the project.
72+
- [Documentation Index](./docs/README.md)
73+
- [i18n Caching and Locale Detection](./docs/i18n/caching-and-locale-detection.md) - Critical information about Vercel caching behavior with next-intl

docs/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Rocky Linux Website Documentation
2+
3+
Technical documentation for the Rocky Linux website codebase.
4+
5+
## Documentation Index
6+
7+
### Internationalization (i18n)
8+
9+
- [Caching and Locale Detection](./i18n/caching-and-locale-detection.md) - Deep dive into i18n caching issues with Vercel and next-intl, including root cause analysis and recommended solutions.
10+
11+
## Quick Links
12+
13+
- [Project README](../README.md)
14+
- [Contributing Guidelines](../CONTRIBUTING.md)
15+
- [AI Assistant Instructions](../CLAUDE.md)
16+
17+
## Documentation Standards
18+
19+
When adding new documentation:
20+
21+
1. Use clear, descriptive headings
22+
2. Include code examples where applicable
23+
3. Link to external sources and references
24+
4. Add entries to this index file
25+
5. Include a "Last updated" date at the bottom of documents

0 commit comments

Comments
 (0)