Skip to content

Latest commit

 

History

History
152 lines (99 loc) · 4.05 KB

CONTRIBUTION.md

File metadata and controls

152 lines (99 loc) · 4.05 KB

Contribution Guidelines

Thank you for your interest in contributing to Search with AI! We appreciate your efforts in helping improve the project. To ensure a smooth contribution process, please follow these guidelines.

How to Contribute

1. Fork the Repository

2. Clone the Forked Repository

  • After forking, clone the repository to your local machine:
git clone https://github.com/<your-username>/search_with_ai.git
  • Navigate into the project directory:
cd search_with_ai

3. Create a Branch for Your Changes

  • Create a new branch from the main branch for your changes:
git checkout -b feature/your-feature-name
  • Ensure your branch name is descriptive (e.g., feature/add-search-engine, fix/docker-deployment).

4. Make Your Changes

  • Make the necessary changes or improvements to the code, documentation, or tests.
  • Ensure that your changes follow the existing code style.
  • Write or update unit tests where applicable.

5. Run Tests

  • Make sure to run the tests to verify your changes didn’t break anything. Run:
yarn test

6. Commit Your Changes

  • After making your changes, add and commit your code:
git add .
git commit -m "Brief description of your changes"

7. Push to Your Fork

  • Push your branch to your forked repository:
git push origin feature/your-feature-name

8. Create a Pull Request

  • Go to the original repository on GitHub and click the New Pull Request button.
  • Select your branch and submit the pull request.
  • Provide a clear description of your changes and reference any related issues.

Development Workflow

Setting Up the Project Locally

Ensure that you have the following installed:

  • Node.js >= 20
  • Yarn

1. Install Dependencies

  • After cloning the repository, run:
yarn install

2. Build the Project

  • Build both the server and web components:
yarn run build

3. Start the Project

  • Run the project locally:
yarn run start
  • The app should now be accessible at http://localhost:3000.

Docker Deployment

For Docker users, you can easily deploy the project using Docker. Follow the steps in the README.md.

Updating the Project

To pull the latest changes from the main repository, run:

git pull
yarn install
cd web && yarn install && yarn run build

Writing Tests

Tests are essential for maintaining the quality and stability of the project. If you’re adding new functionality, ensure that your contribution includes appropriate test coverage. You can run the test suite with:

yarn test

Code Style Guidelines

To maintain consistency across the project, please follow these coding conventions:

  • Use camelCase for JavaScript variables and function names.
  • Use PascalCase for component names in Vue3.
  • Write descriptive commit messages.
  • Keep your changes concise and focused on a single feature or fix.
  • Add comments where necessary to explain complex code logic.

Reporting Bugs & Suggesting Features

1. Reporting Bugs

If you encounter any bugs or issues with the project, please open an issue here. Provide as much detail as possible, including steps to reproduce the issue and any relevant screenshots.

2. Suggesting Features

We welcome new feature ideas! If you’d like to suggest a feature, feel free to start a discussion here.


License

By contributing to Search with AI, you agree that your contributions will be licensed under the MIT License.


Thank you again for your contribution! Let's build something great together! 💻✨