1
- ## Project Structure
1
+ # CLAUDE.md - Project Instructions
2
+ Last updated: 2025-07-31
2
3
3
- This is a personal portfolio site with a blog built using modern web technologies.
4
+ Personal portfolio and blog site built with modern web technologies.
4
5
5
- ### Framework & Libraries
6
+ ## Tech Stack
6
7
7
- - ** React Router v7** (renamed from Remix) - Full-stack React framework
8
- - ** TailwindCSS v4** - Utility-first CSS framework
9
- - ** Three.js** - 3D graphics library for the synthwave background on home page
10
- - ** TypeScript** - Type-safe JavaScript
8
+ - React Router v7 (renamed from Remix) - Full-stack React framework
9
+ - TypeScript 5.x - Type-safe JavaScript
10
+ - TailwindCSS v4 - Utility-first CSS framework
11
+ - Three.js - 3D graphics for synthwave background (home page only)
12
+ - pnpm - Package manager
13
+ - Vite - Build tool
11
14
12
- ### App Architecture
15
+ ## Project Structure
13
16
14
17
- ` app/routes/ ` - File-based routing
15
18
- ` home.tsx ` - Landing page with 3D synthwave background
@@ -29,55 +32,61 @@ This is a personal portfolio site with a blog built using modern web technologie
29
32
- ` content/blog/ ` - Markdown blog posts with frontmatter
30
33
- ` public/images/ ` - Blog post images in WebP format with size variants
31
34
32
- ### Blog Images
35
+ ## Key Features
36
+
37
+ - RSS 2.0 feed at ` /rss.xml `
38
+ - XML sitemap at ` /sitemap.xml `
39
+ - Social sharing (Twitter, LinkedIn, Bluesky, copy link)
40
+ - Dark/light theme switching with system awareness
41
+ - Responsive mobile-first design
42
+ - Multi-size WebP blog images: ` {slug}.webp ` , ` {slug}-twitter.webp ` , ` {slug}-small.webp `
33
43
34
- - Images use WebP format for better compression
35
- - Support for multiple sizes: ` {slug}.webp ` , ` {slug}-twitter.webp ` , ` {slug}-small.webp `
36
- - Images can be specified in frontmatter or auto-detected by slug naming
44
+ ## Commands
37
45
38
- ### Features
46
+ - ` pnpm dev ` - Start development server
47
+ - ` pnpm build ` - Build for production
48
+ - ` pnpm typecheck ` - Run TypeScript type checking
49
+ - ` pnpm lint ` - Run linting with oxlint
39
50
40
- - ** RSS Feed** : Auto-generated RSS 2.0 feed at ` /rss.xml ` for blog syndication
41
- - ** SEO Sitemap** : XML sitemap at ` /sitemap.xml ` with proper priorities and change frequencies
42
- - ** Social Sharing** : Share buttons for Twitter, LinkedIn, Bluesky, and copy-to-clipboard
43
- - ** Dark Mode** : System-aware theme switching with persistence
44
- - ** Responsive Design** : Mobile-first approach with adaptive layouts
51
+ ## Code Style
45
52
46
- ### Performance Optimizations
53
+ - Use ES modules (import/export), not CommonJS
54
+ - Destructure imports when possible
55
+ - 2-space indentation
56
+ - Semicolons required
57
+ - Single quotes for strings
58
+ - Function components with hooks only
59
+ - Arrow functions preferred
60
+ - PascalCase for components, camelCase for functions/variables
47
61
48
- - SynthwaveBackground is lazy-loaded and only renders on home page
49
- - Font preloading is conditional (blog pages only load Lexend fonts)
50
- - Blog content is processed server-side with caching
51
- - RSS and sitemap responses are cached for 1 hour
52
- - Theme toggle includes hydration safety to prevent flashing
62
+ ## Architecture Patterns
53
63
54
- ### Styling Conventions
64
+ - File-based routing with React Router v7
65
+ - Server-side rendering for blog content
66
+ - Lazy loading for heavy components (Three.js)
67
+ - Conditional font preloading (Lexend fonts on blog pages only)
68
+ - 1-hour caching for RSS and sitemap responses
69
+ - Hydration-safe theme switching
55
70
56
- - Home page: Dark theme with synthwave aesthetics
57
- - Blog pages: Clean, readable design with ` dark:bg-slate-900 ` background
58
- - Consistent spacing and typography using Tailwind utilities
71
+ ## Performance Guidelines
59
72
60
- ## Development Guidelines
73
+ - Three.js loads only on home page
74
+ - Blog content processed server-side with caching
75
+ - Images served as WebP with size variants
76
+ - Avoid loading unused fonts on non-blog pages
61
77
62
- ### Do's
78
+ ## Workflow
63
79
64
- - Follow existing patterns in the folder structure
65
- - Use file-based routing conventions for new pages
66
- - Examine node_modules packages to understand library functionality
67
- - Start with README.md files in each package
68
- - Adhere to .prettierrc & oxlint.json configurations
69
- - Use ` pnpm ` as the package manager
70
- - Only comment complex code requiring extra explanation
71
- - Always run ` pnpm typecheck ` and ` pnpm lint ` after creating or updating code
80
+ - Always run ` pnpm typecheck ` and ` pnpm lint ` after code changes
72
81
- Prefer editing existing files over creating new ones
73
- - Use lazy loading for heavy components (like Three.js background)
82
+ - Test with actual builds, not dev server for error testing
83
+ - Follow existing patterns in the codebase
74
84
75
- ### Don'ts
85
+ ## Important Restrictions
76
86
77
- - DON'T USE COMMENTS unless there is a very unique piece of code that requires extra information
78
- - Don't use ` (_) => null ` syntax for unused parameters; omit them instead
79
- - Don't use ` pnpm run dev ` for error testing (inefficient)
80
- - Don't assume knowledge of React Router v7 or TailwindCSS v4 functionality
81
- - Don't use the ` any ` type unless absolutely necessary
82
- - Don't typecast unless absolutely necessary
83
- - Don't load heavy assets (Three.js, unused fonts) on blog pages
87
+ - NEVER add comments unless absolutely necessary for complex logic
88
+ - NEVER use ` (_) => null ` syntax - omit unused parameters
89
+ - NEVER use ` any ` type or typecasting unless absolutely necessary
90
+ - NEVER assume React Router v7 or TailwindCSS v4 APIs - check documentation
91
+ - NEVER load Three.js or heavy assets on blog pages
92
+ - NEVER create new files unless explicitly required
0 commit comments