pg-smart-search

Contributing

Learn how to contribute to the pg-smart-search open-source project, including development setup and coding standards.

Contributing

We welcome contributions to pg-smart-search! Whether it's a bug fix, a new feature, or improved documentation, your help is appreciated.

Development Setup

  1. Fork and Clone the repository

    git clone https://github.com/abubakrmuminov/pg-smart-search.git
    cd pg-smart-search
  2. Install dependencies

    npm install
  3. Set up your environment There's no .env.example in the repo — PgAdapter (used by the CLI and integration tests) reads connection settings from PG_HOST, PG_PORT, PG_USER, PG_PASSWORD, and PG_DATABASE env vars (each defaults to a local Postgres on localhost:5432). Integration tests instead spin up their own database via docker-compose.test.yml — you don't need to set these manually just to run npm test.

  4. Run tests Ensure your setup is working by running the test suite:

    npm test

Coding Standards

  • TypeScript: All code must be strictly typed. Avoid any where possible.
  • Testing: Any new feature must include corresponding unit/integration tests.
  • Commits: We follow Conventional Commits (e.g., feat:, fix:, docs:).

Pull Request Process

  1. Create a new branch for your feature or fix (git checkout -b feat/my-feature).
  2. Make your changes and commit them.
  3. Ensure all tests pass (npm test).
  4. Push to your fork and open a Pull Request against the main branch.
  5. Clearly describe the problem and solution in the PR description.

Reporting Bugs

If you find a bug, please open an issue on GitHub with:

  • A clear description of the problem.
  • Steps to reproduce the issue.
  • Your Node.js, PostgreSQL, and pg-smart-search versions.