A clean, well-documented Astro + React + Tailwind CSS template repository for building modern, performant websites. This template follows atomic design principles and includes comprehensive documentation for AI agents and developers.
This template is designed to be the starting point for new website projects. It provides:
- Atomic Design Structure: Organized component hierarchy (atoms, molecules, organisms, layouts)
- Modern Tech Stack: Astro.js, React, TypeScript, and Tailwind CSS
- Best Practices: SEO-first, performance-optimized, accessible by default
- Comprehensive Documentation: README files in every directory to guide development
All new sites created from this template must be stored in the Pink-Marlin-Digital organization GitHub in a new repository.
When creating a new project:
- Create a new repository in the Pink-Marlin-Digital organization
- Clone this template or use it as a starting point
- Update the site configuration in
src/config/site.json - Follow the development guidelines in this README and
CLAUDE.md
- Node.js 18+
- pnpm (recommended) or npm
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Build for production
pnpm build
# Preview production build
pnpm preview/
βββ public/ # Static assets (images, favicons, etc.)
βββ src/
β βββ components/ # React and Astro components
β β βββ atoms/ # Basic building blocks (buttons, inputs, etc.)
β β βββ molecules/ # Simple component groups (form groups, cards, etc.)
β β βββ organisms/ # Complex sections (headers, footers, hero sections)
β β βββ layouts/ # Page-level layouts
β βββ config/ # Site-wide configuration (site.json)
β βββ pages/ # Astro pages (file-based routing)
β βββ styles/ # Global styles (global.css with Tailwind)
β βββ utils/ # Utility functions and helpers
βββ astro.config.mjs # Astro configuration
βββ tailwind.config.mjs # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ CLAUDE.md # Agent-specific rules and guidelines
Each directory contains a README.md file with detailed documentation about its purpose and usage patterns.
Inline styles are NOT allowed in this project. All styling must be done using Tailwind CSS utility classes.
This project uses Tailwind CSS for all styling.
- Use utility classes: Apply Tailwind classes directly to elements
- Compose classes: Combine multiple utility classes for complex styles
- Extend theme: Add custom values in
tailwind.config.mjsif needed - Custom utilities: Add custom utility classes in
src/styles/global.cssusing@layer utilitiesif necessary
// β
Good - Using Tailwind classes
<button className="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">
Click me
</button>
// β Bad - Using inline styles
<button style={{ padding: '1rem', backgroundColor: 'blue' }}>
Click me
</button>This project follows atomic design principles:
- Atoms: Basic building blocks (buttons, inputs, labels)
- Molecules: Simple component groups (form groups, cards)
- Organisms: Complex sections (headers, footers, hero sections)
- Layouts: Page-level structure
See the README files in each component directory for detailed guidelines.
Each component should live in its own folder:
components/
Button/
Button.tsx
Button.test.tsx
Button.stories.tsx (optional)
All components must be properly typed:
interface ButtonProps {
variant?: 'primary' | 'secondary';
children: React.ReactNode;
onClick?: () => void;
}
export const Button = ({ variant = 'primary', children, onClick }: ButtonProps) => {
// Component implementation
};Site-wide data is stored in src/config/site.json. This includes:
- Site name, description, base URL
- Brand information
- Business information (NAP - Name, Address, Phone)
- Social media links
- SEO defaults
Always import and use this config instead of hard-coding values. See src/config/README.md for details.
- Plan First: Review
CLAUDE.mdfor agent-specific rules - Create Components: Follow atomic design principles
- Use Tailwind: Apply utility classes, never inline styles
- Type Everything: Use TypeScript for all components
- Test: Write tests for components (snapshot tests at minimum)
- Build: Ensure
pnpm buildcompletes without errors - Lint: Ensure
pnpm lintpasses (if configured)
This template is set up for testing with Vitest and React Testing Library. Each component should have at least a snapshot test.
# Run tests
pnpm test
# Run tests in watch mode
pnpm test:watch- This README: Project overview and quick start
- CLAUDE.md: Detailed rules and guidelines for AI agents
- Component READMEs: Purpose and usage for each component directory
- Config README: How to use site configuration
This project builds to static files in the dist/ directory. It can be deployed to:
- Netlify
- Vercel
- GitHub Pages
- Any static hosting service
# Build for production
pnpm build
# The dist/ directory contains the static siteWhen working with this template:
- Follow the atomic design structure
- Use Tailwind CSS for all styling (no inline styles)
- Write TypeScript for all components
- Add tests for new components
- Update documentation as needed
- Follow the guidelines in
CLAUDE.md
This template is for use by Pink Marlin Digital and TryMarlin.ai projects.