|
| 1 | +# CLAUDE.md |
| 2 | + |
| 3 | +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
| 4 | + |
| 5 | +## Project Overview |
| 6 | + |
| 7 | +This is **The Tractor Store** - a micro frontend demonstration project built with Astro. It serves as a blueprint for experimenting with micro frontend architecture, similar to TodoMVC but focused on micro frontends. The project is a showcase website that documents the concept and displays various implementation examples. |
| 8 | + |
| 9 | +## Development Commands |
| 10 | + |
| 11 | +- `npm run dev` / `npm start` - Start development server on port 3000 |
| 12 | +- `npm run build` - Build for production |
| 13 | +- `npm run preview` - Preview production build locally |
| 14 | +- `npm run clean` - Remove dist directory |
| 15 | + |
| 16 | +## Code Formatting |
| 17 | + |
| 18 | +- `prettier` - Format code using Prettier with Astro plugin |
| 19 | +- Configuration in `.prettierrc.mjs` includes special handling for `.astro` files |
| 20 | + |
| 21 | +## Architecture |
| 22 | + |
| 23 | +### Tech Stack |
| 24 | +- **Astro** - Static site generator with component islands |
| 25 | +- **TypeScript** - Type safety throughout |
| 26 | +- **Tailwind CSS** - Utility-first styling with custom design system |
| 27 | +- **React** (via @astrojs/react) - For interactive components |
| 28 | + |
| 29 | +### Project Structure |
| 30 | +``` |
| 31 | +src/ |
| 32 | +├── components/ # Reusable UI components |
| 33 | +│ ├── content/ # Page-specific content components |
| 34 | +│ └── *.astro # Various UI components (Header, Footer, Nav, etc.) |
| 35 | +├── layouts/ # Page layout templates |
| 36 | +│ ├── PageLayout.astro # Main layout with header/footer |
| 37 | +│ └── ContentLayout.astro # Content-focused layout |
| 38 | +├── pages/ # File-based routing |
| 39 | +│ ├── index.astro # Homepage |
| 40 | +│ └── projects.astro # Projects page |
| 41 | +├── lib/ # Utilities and helpers |
| 42 | +│ ├── seo.ts # SEO meta generation |
| 43 | +│ └── markdoc/ # Markdoc configuration |
| 44 | +├── styles/ # Global styles |
| 45 | +└── config.ts # Site configuration |
| 46 | +``` |
| 47 | + |
| 48 | +### Key Architecture Patterns |
| 49 | +- **Component-based design**: Heavy use of Astro components for modularity |
| 50 | +- **Layout composition**: Main layout provides header/footer, content layouts handle page structure |
| 51 | +- **SEO-first**: Comprehensive meta tag generation via `lib/seo.ts` |
| 52 | +- **Theme system**: CSS custom properties for colors, dark mode support |
| 53 | +- **Static generation**: Built for GitHub Pages deployment |
| 54 | + |
| 55 | +### Styling System |
| 56 | +- Custom CSS properties defined in theme classes (`theme-bubblegum`) |
| 57 | +- Tailwind extended with custom color palette using CSS variables |
| 58 | +- Typography plugin for content styling |
| 59 | +- Custom font loading for Raleway family |
| 60 | + |
| 61 | +### Configuration Details |
| 62 | +- Base URL configured for GitHub Pages (`/tractor-store/`) |
| 63 | +- Assets prefix for CDN deployment |
| 64 | +- Sitemap and RSS generation enabled |
| 65 | +- Prism syntax highlighting included |
| 66 | + |
| 67 | +## Deployment |
| 68 | + |
| 69 | +Automated deployment to GitHub Pages via GitHub Actions (`.github/workflows/deploy.yml`). Builds are triggered on pushes to `main` branch. |
| 70 | + |
| 71 | +## Development Notes |
| 72 | + |
| 73 | +- The site showcases micro frontend concepts but is itself a traditional Astro site |
| 74 | +- Content is primarily static with some interactive elements |
| 75 | +- Font assets are loaded from external CDN |
| 76 | +- Project includes markdoc integration for potential content management |
0 commit comments