Skip to content

Latest commit

 

History

History
73 lines (54 loc) · 1.65 KB

File metadata and controls

73 lines (54 loc) · 1.65 KB

Contributing to @crafter/rn-ai-elements

Thank you for your interest in contributing! This guide will help you get started.

Development Setup

  1. Clone the repository:

    git clone https://github.com/crafter-station/rn-ai-elements.git
    cd rn-ai-elements
  2. Install dependencies:

    pnpm install
  3. Build all packages:

    pnpm turbo build
  4. Run the example app:

    cd apps/example
    npx expo start

Project Structure

  • packages/elements/ — Core component library
  • packages/cli/ — Copy-paste CLI
  • apps/example/ — Expo example app
  • apps/docs/ — Documentation site

Development Workflow

  1. Create a branch from main
  2. Make your changes
  3. Add a changeset: pnpm changeset
  4. Run checks: pnpm turbo lint typecheck test
  5. Open a pull request

Code Style

  • Use StyleSheet.create() for all styles
  • Use useAIElementsTheme() for theming — no hardcoded colors
  • Export all prop types
  • Wrap components in React.memo when beneficial
  • Use lucide-react-native for icons

Adding a Component

  1. Create the component in the appropriate category folder (chatbot/, code/, voice/, workflow/)
  2. Export from the category's index.ts
  3. Export from src/index.ts
  4. Add to the example app
  5. Add tests

Commit Convention

Use Conventional Commits:

  • feat: new feature
  • fix: bug fix
  • docs: documentation
  • refactor: code refactoring
  • test: adding tests
  • chore: maintenance

License

By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.