Clean, modern documentation site built with Astro and Tailwind CSS following SOLID principles.
This project follows SOLID principles for maintainable, scalable components:
Each component has one clear purpose:
BaseLayout.astro- Page structure onlyButton.astro- Button rendering onlyCard.astro- Card container onlyHero.astro- Hero section only
Components are open for extension via props and slots:
<Card title="Custom Title" icon="🎯">
<p>Any content here</p>
</Card>Components can be swapped without breaking functionality:
<!-- Can use any variant -->
<Button variant="primary">Click me</Button>
<Button variant="secondary">Or me</Button>Components only require props they actually use:
interface Props {
title?: string; // Optional, only if needed
required: string; // Required only when necessary
}High-level pages depend on abstractions (components), not concrete implementations.
docs/
├── src/
│ ├── components/
│ │ ├── layout/ # Layout components
│ │ ├── ui/ # Reusable UI components
│ │ │ ├── Button.astro
│ │ │ └── Card.astro
│ │ └── content/ # Content components
│ │ ├── Hero.astro
│ │ └── CodeExample.astro
│ ├── layouts/
│ │ └── BaseLayout.astro # Base page layout
│ ├── pages/
│ │ └── index.astro # Home page (uses composition)
│ ├── styles/
│ │ └── global.css # Tailwind styles
│ └── types/ # TypeScript types
├── public/ # Static assets
│ └── favicon.svg
└── astro.config.mjs # Astro config
# Install dependencies
pnpm install
# Start dev server
pnpm dev
# Build for production
pnpm build
# Preview production build
pnpm preview- Primary: Blue (
#3b82f6) - Secondary: Purple (
#8b5cf6) - Background: Slate shades
All components are modular and reusable following component composition patterns.
- ⚡ Fast builds with Astro
- 🎨 Tailwind CSS for styling
- 🌙 Dark mode support
- 📱 Fully responsive
- ♿ Accessible
- 🧩 Component-based architecture
- 🔧 TypeScript for type safety
malydev (Miguel Lipa)