docs: add CLAUDE.md with comprehensive codebase documentation#113
docs: add CLAUDE.md with comprehensive codebase documentation#113praveentcom merged 1 commit intomainfrom
Conversation
Provides AI assistants with project structure, tech stack, commands, architecture patterns, code conventions, and common task guides. https://claude.ai/code/session_018DcChR2JGyvPSZKuHZ5ecv
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive documentation for AI assistants working with the DevMDX codebase. The CLAUDE.md file provides detailed information about the project's tech stack, architecture, conventions, and common tasks to help AI tools better understand and work with the codebase.
Changes:
- Added CLAUDE.md with complete project documentation including tech stack, commands, project structure, architecture patterns, code conventions, and common tasks
- Documented all path aliases, environment variables, routing patterns, and component organization
- Included security practices and configuration details
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ### Component Organization | ||
|
|
||
| - **UI primitives** (`components/ui/`): shadcn/ui components. These are auto-generated — do not manually modify. |
There was a problem hiding this comment.
The statement that "UI primitives (components/ui/): shadcn/ui components. These are auto-generated — do not manually modify" is inaccurate. While many components in this directory are indeed shadcn/ui components, several are custom components including markdown.tsx (558 lines), code-block.tsx (374 lines), structured-data.tsx, theme-switcher.tsx, prefetch-link.tsx, empty-state.tsx, and spinner.tsx. This statement should be revised to clarify that the directory contains both auto-generated shadcn/ui components and custom UI components.
| - **UI primitives** (`components/ui/`): shadcn/ui components. These are auto-generated — do not manually modify. | |
| - **UI primitives** (`components/ui/`): shadcn/ui-based components and shared UI primitives. Many of these are derived from shadcn/ui generators/templates and should generally be updated via those sources rather than heavily modified in place, but this directory also contains custom components (e.g. `markdown.tsx`, `code-block.tsx`, `structured-data.tsx`, `theme-switcher.tsx`, `prefetch-link.tsx`, `empty-state.tsx`, `spinner.tsx`) that are intended to be edited as needed. |
| - Strict mode enabled | ||
| - Use Zod schemas for all content frontmatter validation | ||
| - Types exported alongside their schemas from `src/types/` | ||
| - Prefer `type` over `interface` for data shapes (project convention) |
There was a problem hiding this comment.
The statement "Prefer type over interface for data shapes (project convention)" is not accurate. The codebase actually uses both type and interface with a specific pattern: type is used for Zod-inferred types and content models (articles, projects, community, work, education), while interface is used for configuration objects (ConfigData, ConfigAnalyticsData, ConfigSeoData, Profile, SocialLinks, etc.). The convention should be clarified to reflect this nuanced pattern rather than suggesting a blanket preference for type.
| - Prefer `type` over `interface` for data shapes (project convention) | |
| - Use `type` for Zod-inferred types and content models (articles, projects, community, work, education), and use `interface` for configuration objects (e.g., `ConfigData`, `ConfigAnalyticsData`, `ConfigSeoData`, `Profile`, `SocialLinks`). |
Provides AI assistants with project structure, tech stack, commands,
architecture patterns, code conventions, and common task guides.
https://claude.ai/code/session_018DcChR2JGyvPSZKuHZ5ecv