This is the source code for the official website of the book "Node.js Design Patterns" by Mario Casciaro and Luciano Mammino. The website serves as the primary landing page and resource hub for the book.
The website is available at https://nodejsdesignpatterns.com
The site is deployed as a static site on GitHub Pages and is automatically updated on every push to the main branch.
This project is built with:
- Astro - Static site generator for optimal performance
- Tailwind CSS - Utility-first CSS framework
- React - Used sparingly for interactive components
- TypeScript - For type safety and better developer experience
- pnpm - Fast, disk space efficient package manager
/
โโโ .claude/ # Claude Code AI assistant configuration
โ โโโ commands/ # Custom Claude commands
โโโ .github/ # GitHub Actions workflows
โโโ public/ # Static assets served directly
โ โโโ images/ # Public images
โโโ src/
โ โโโ components/ # Reusable UI components
โ โ โโโ pages/ # Page-specific components
โ โ โ โโโ Home/ # Home page components
โ โ โ โโโ components/ # Shared Home components
โ โ โโโ ui/ # Generic UI components (Astro)
โ โ โ โโโ social/ # Social media icons
โ โ โโโ blog/ # Blog-related components
โ โ โโโ AnimatedCounter.tsx # React: Animated counter component
โ โ โโโ ParallaxBackground.tsx # React: Parallax background effect
โ โโโ content/ # Content collections (Astro)
โ โ โโโ authors/ # Author information
โ โ โโโ blog/ # Blog posts with assets
โ โ โโโ chapters/ # Book chapters
โ โ โโโ faq/ # FAQ entries
โ โ โโโ quotes/ # Testimonial quotes
โ โ โโโ reviews/ # Book reviews
โ โโโ hooks/ # React hooks (minimal set)
โ โ โโโ useAnimatedCounter.tsx # Hook for counter animation
โ โ โโโ useInView.tsx # Hook for viewport detection
โ โโโ images/ # Optimized images for Astro
โ โ โโโ authors/ # Author photos
โ โ โโโ mktg/ # Marketing images
โ โ โโโ people/ # People photos
โ โ โโโ promo/ # Promotional materials
โ โโโ lib/ # Utility functions and constants
โ โโโ pages/ # Astro pages and routes
โ โ โโโ blog/ # Blog pages
โ โโโ styles/ # Global CSS and theme files
โโโ dist/ # Built site (generated)
- Node.js 18+
- pnpm (recommended package manager)
# Clone the repository
git clone [repository-url]
# Install dependencies
pnpm install
# Start development server
pnpm devThe site will be available at http://localhost:4321
| Command | Action |
|---|---|
pnpm install |
Installs dependencies |
pnpm dev |
Starts local dev server at localhost:4321 |
pnpm build |
Build your production site to ./dist/ |
pnpm preview |
Preview your build locally, before deploying |
pnpm lint |
Run ESLint on the codebase |
pnpm lint:fix |
Fix auto-fixable ESLint issues |
pnpm format |
Format code with Prettier |
pnpm format:check |
Check code formatting |
pnpm typecheck |
Run TypeScript type checking |
This project is configured to work seamlessly with AI coding assistants:
- Claude Code - Full project configuration in
.claude/directory
The AI assistant configuration includes project structure understanding, coding standards, and constitutional principles to help maintain consistency and quality during development.
Contributions are super welcome! Whether you want to:
- Fix a bug
- Add a new feature
- Improve documentation
- Enhance accessibility
- Optimize performance
Please feel free to:
- Open an Issue - For bug reports, feature requests, or questions
- Submit a Pull Request - For code contributions
Please read our project constitution to understand our coding standards, principles, and guidelines.
- Follow the mobile-first responsive design approach
- Maintain accessibility standards (WCAG AA)
- Keep the site lean and performant
- Prefer Astro components over React when possible
- Write semantic HTML with proper ARIA attributes
- Ensure all PRs pass linting and formatting checks
This project is licensed under the MIT License - see the LICENSE file for details.
"Node.js Design Patterns" is a comprehensive guide to mastering Node.js development through proven design patterns and best practices. Learn more about the book and purchase it from the official website.
Built with โค๏ธ using Astro | Deployed on GitHub Pages