Welcome Contributors
We welcome contributions to the Blocks project! This guide will help you get started with development and contributing to the blocks registry. Whether you’re fixing bugs, adding new blocks, or improving documentation, your contributions help make this library better for everyone.Prerequisites
Before you begin, ensure you have the following installed:- Bun - This project uses Bun as the package manager
- Node.js 18+ - Required for Next.js
- Git - For version control
If you don’t have Bun installed, you can install it from bun.sh
Development Setup
Fork the repository
Fork the repository on GitHub to your own account. This creates a copy of the project under your GitHub username.
Install dependencies
Install all project dependencies using Bun:This will install all the required packages including Next.js, React, Radix UI components, and development tools.
Available Scripts
The project includes several useful scripts for development and maintenance:Project Structure
Understanding the project structure will help you navigate the codebase:Key Directories
- content/components/ - Contains all block implementations organized by category
- content/blocks-metadata.ts - Defines metadata for each block (id, category, name, etc.)
- content/blocks-categories.tsx - Defines available categories
- scripts/ - Contains utilities for registry generation and validation
Submitting Pull Requests
Create a new branch
Create a new branch for your feature or bug fix:Use a descriptive branch name like
feat/add-card-block or fix/login-styling.Make your changes
Make your changes to the codebase. Follow the guidelines for code style and conventions.
Build and test
Build the project to ensure everything works:Test your changes thoroughly in the development environment.
Commit your changes
Commit your changes with a descriptive message:Follow conventional commit format:
feat:, fix:, docs:, refactor:, etc.The project uses commit message validation with commitlint to ensure consistent commit messages.
Getting Help
If you have questions or need help:- Open an issue on GitHub for bugs or feature requests
- Check existing issues and pull requests for similar topics
- Review the documentation for detailed guides