Contribute code
Learn how to set up the development environment and submit code changes.
We welcome code contributions to PixelPlanet. Review this document to understand the repository structure and development workflow before submitting a pull request.
Repository structure
Section titled “Repository structure”PixelPlanet uses Astro and Starlight for documentation. The project structure organizes components and registry definitions logically:
Directorysrc
Directoryassets/ # Logos and images
- …
Directorycomponents/ # Documentation site components
- …
Directorycontent/docs # Documentation pages
Directorycomponents/
- …
Directorygetting-started/
- …
Directorycontributing/
- …
Directoryregistry/new-york # Component registry
Directoryexamples/ # Usage examples
- …
Directoryitems/ # Component source code
- …
Local development
Section titled “Local development”Follow these steps to set up the project on your local machine.
-
Fork the repository
Fork the repository to your GitHub account.
-
Clone the project
Clone your fork to your local machine:
git clone git@github.com:FartLabs/pixel-planet.git -
Install dependencies
Navigate to the project directory and install dependencies using
npm:cd pixel-planetnpm install -
Configure environment
Copy the example environment file to create your local configuration:
cp .env.example .env -
Start the development server
Run the development server to view your changes in real-time:
npm run dev
Test the registry
Section titled “Test the registry”To verify that your component builds correctly in the registry, run the build command:
npm run buildYou can test the installation of your component in a separate project using the local registry URL:
npx shadcn@latest add http://localhost:4321/r/<component-name>.json