Join our community of builders on Discord!

Contributing Guide

First off, thank you for considering contributing! It's people like you that make open source such a great community. This guide applies to Lightchain AI's public repositories. Some protocol repositories are currently kept private while the network matures; if a repository is not publicly accessible, the workflow below does not apply to it yet.

Development Environment Setup

Our projects support standard JavaScript package managers. Depending on the specific project, you might need npm, yarn, or pnpm.
  1. Fork & Clone: Fork the repository and clone it to your local machine.
  2. Setup: Install dependencies using your preferred package manager:
    CodeBASH
  3. Environment Variables: Copy .env.example to .env and fill in any required variables.
  4. Run Locally: Start the development server:
    CodeBASH

Making Changes

  • Ensure your branch is up-to-date with main before starting.
  • Create a new branch for your feature or bug fix:
    CodeBASH

Formatting and Linting

We use Biome for rapid and consistent code formatting and linting across all our projects.
  • Check / Lint:
    CodeBASH
  • Type Check:
    CodeBASH
Please ensure all checks pass before submitting a Pull Request — the CI pipeline will fail otherwise.

Commit Guidelines

We enforce Conventional Commits. Your commit messages should be formatted like this:
CodeTEXT
Husky git hooks are set up to run commitlint and lint-staged, which will automatically format your code and verify your commit message on git commit.

Submitting a Pull Request

  1. Push your changes to your fork.
  2. Open a Pull Request against the main branch.
  3. Fill out the Pull Request template comprehensively.
  4. Wait for CI checks to pass and for maintainers to review your code.