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