Contributing
December 2, 2025 · View on GitHub
We welcome contributions to our project! This guide will help you get started with development and contributing to the blocks registry.
Development
Prerequisites
- Bun - This project uses Bun as the package manager
- Node.js 18+ - Required for Next.js
Getting Started
-
Fork the repository on GitHub.
-
Clone your forked repository to your local machine:
git clone https://github.com/your-username/blocks.git cd blocks -
Install dependencies:
bun install -
Start the development server:
bun run devThe development server will be available at
http://localhost:3000.
Scripts
# Development
bun run dev # Start dev server with Turbopack
bun run build # Build the project
bun run start # Start production server
# Registry Management
bun run generate:registry # Generate registry.json
bun run generate:markdown # Generate MDX documentation
bun run validate:registry # Validate registry structure
# Code Quality
bunx ultracite lint # Lint codebase with Biome
Project Structure
blocks/
├── app/ # Next.js app router pages
├── components/ # Shared UI components
├── content/
│ ├── components/ # Block implementations
│ ├── markdown/ # Generated MDX docs
│ ├── blocks-metadata.ts # Block registry metadata
│ └── blocks-categories.tsx # Category definitions
├── lib/ # Utility functions
├── public/
│ └── r/ # Registry JSON files
├── scripts/ # Build and generation scripts
└── registry.json # Main registry file
Adding New Blocks
We'd love your block contributions! To keep the library well-organized, we ask that you add blocks to existing categories rather than creating new ones. If you have ideas for a new category, feel free to open an issue to discuss it with the maintainers.
Existing categories can be found in content/blocks-categories.tsx.
- Create the component in
content/components/{category}/{block-id}.tsx - Register metadata in
content/blocks-metadata.ts - Map the component in
content/blocks-components.tsx - Export from category in
content/components/{category}/index.ts - Generate registry with
bun run generate:registry
See CLAUDE.md for detailed development guidelines.
Contributing Process
-
Create a new branch for your feature or bug fix:
git checkout -b your-branch-name -
Make your changes to the codebase.
-
Build and test the project:
bun run build -
Test the application to ensure your changes work as expected.
-
Run linting to ensure code quality:
bunx ultracite lint -
Commit your changes:
git commit -m "Your descriptive commit message" -
Push your changes to your fork:
git push -u origin your-branch-name -
Open a pull request on the original repository.
Thank you for contributing to our project!