Skip to content

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.

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

Follow these steps to set up the project on your local machine.

  1. Fork the repository

    Fork the repository to your GitHub account.

  2. Clone the project

    Clone your fork to your local machine:

    git clone git@github.com:FartLabs/pixel-planet.git
  3. Install dependencies

    Navigate to the project directory and install dependencies using npm:

    cd pixel-planet
    npm install
  4. Configure environment

    Copy the example environment file to create your local configuration:

    cp .env.example .env
  5. Start the development server

    Run the development server to view your changes in real-time:

    npm run dev

To verify that your component builds correctly in the registry, run the build command:

npm run build

You 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