Skip to content

Commit

Permalink
docs: add testing instructions and update main contribution doc
Browse files Browse the repository at this point in the history
  • Loading branch information
wajeshubham committed Mar 3, 2024
1 parent cc7be67 commit 4450a8a
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 48 deletions.
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ To contribute to FreeAPI, please follow these guidelines:

1. Fork the repository on GitHub.
2. Clone your forked repository to your local machine.
3. Create a new branch for your feature or bug fix: `git checkout -b feat/your-feature-name` or `git checkout -b fix/your-bug-fix-name`.
4. Make your changes and commit them with descriptive messages: `git commit -am 'add your commit message'`.
5. Push your changes to your forked repository: `git push origin feat/your-feature-name`.
6. Submit a pull request to the main repository.
3. Create a new branch for your feature or bug fix: `git checkout -b feat/your-feature-name` or `git checkout -b fix/your-bug-fix-name` and make your changes.
4. Run all the tests 🧪 before committing the changes and make sure all tests are passed.
5. After all tests are passed, commit your changes with a descriptive messages: `git commit -am 'add your commit message'`.
6. Push your changes to your forked repository: `git push origin feat/your-feature-name`.
7. Submit a pull request to the main repository.

## Commit Message Format <a name="commit-message-format"></a>

Expand Down
114 changes: 70 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,50 +77,6 @@ This ensures that your work is not affected by the server resets and allows you
To self-host the FreeAPI.app application, you can take advantage of a pre-built template that is readily available.
[Click here for detailed docs](https://github.com/hiteshchoudhary/apihub/#-using-railway-one-click-deploy)

# How to contribute - Guidelines

## Contribute in core FreeAPI codebase:

We welcome your interest in contributing to our open source project!

To contribute to FreeAPI, please follow these steps:

1. Fork the repository.
2. Create a new branch for your feature or bug fix: `git checkout -b feat/your-feature-name` or `git checkout -b fix/your-bug-fix-name`.
3. Make your changes and commit them using conventional commit messages: `git commit -am "feat: Add new feature"`. For more details on the commit format and other guidelines, please refer to the [Contributor Guidelines](./CONTRIBUTING.md).
4. Push your changes to your forked repository: `git push origin feat/your-feature-name`.
5. Submit a pull request to the main repository, explaining the changes you've made and providing any necessary details.

Here's a guide on how you can effectively contribute to our API hub:

1. Pull Requests for Readme Updates: Please refrain from sending pull requests solely for updating the project's readme file. While we appreciate the importance of clear and concise documentation, we prefer to focus on substantial code contributions and feature enhancements.

2. Grammar Updates: Our team values effective communication, but we're not grammar sticklers. You don't need to send pull requests solely for grammar fixes or minor language improvements. Instead, concentrate on the core functionalities and features of the project.

3. Avoid Updating Existing Public APIs: To maintain stability and consistency, we discourage direct updates to existing public APIs within the API hub. These APIs have been thoroughly tested and approved. However, if you encounter any bugs or issues, we encourage you to open an issue on our project's issue tracker to notify us.

4. Build New Project APIs: We encourage you to explore your creativity and contribute by building complete project APIs. These APIs should provide comprehensive solutions that can assist developers in constructing complex projects to showcase their skills and abilities. Your contributions in this area will greatly benefit the community.

5. Draft a Proposal and Discuss on Discord: Before diving into your project, we recommend drafting a proposal. This can include a mind map or outline of the API you intend to build and its potential benefits. Join our Discord community, where you can share your proposal, discuss ideas, and gather feedback from fellow contributors. Engaging in these discussions will enhance your backend portfolio and help shape the future direction of the project.

We appreciate your enthusiasm and look forward to your valuable contributions to our open source API hub project.

Together, we can foster a collaborative environment and make a significant impact in the API integration landscape.

Click [here](https://github.com/hiteshchoudhary/apihub/blob/main/CONTRIBUTING.md) for detailed contribution guide.

## Contribute by creating frontend application:

Thank you for your interest in contributing to the FreeAPI project by creating frontend applications consuming FreeAPIs! Your efforts play a crucial role in enhancing the user experience and expanding the reach of our APIs. Please follow this guide to ensure a smooth and collaborative contribution process.

Click [here](https://github.com/hiteshchoudhary/apihub/blob/main/CONTRIBUTING_FRONTEND.md) for detailed contribution guide for Frontend Developers 🚀!

## Contribute in testing suite

Thank you for your interest in contributing to the FreeAPI project to increase code coverage of our API service that helps us to ship robust endpoints that are battlefield tested. Please follow this guide to ensure a smooth and collaborative contribution process.

Click [here](https://github.com/hiteshchoudhary/apihub/blob/main/CONTRIBUTING_CODE_COVERAGE.md) for detailed contribution guide for increasing code coverage.

# 🏁 Installation

### 📦 Using Docker (recommended)
Expand Down Expand Up @@ -199,6 +155,76 @@ To self-host the FreeAPI.app application, you can take advantage of a pre-built

Note: Once the application is deployed, please wait for 3-5 minutes for the swagger docs to be available.

# 🧪 Testing

To ensure reliability & stability for our end users, we utilize Playwright, a powerful testing framework to automate testing across all endpoints.

### 💻 Run the Test Server

Make sure to add `MONGO_MEMORY_SERVER_PORT=10000` (mongodb port for e2e testing) in your `.env` file.

```bash
yarn start:test-server
```

### 🧪 Run Tests

```bash
yarn test:playwright
```

This will generate a Playwright report. To view this report run the following command

```bash
yarn playwright show-report
```

Make sure all the test cases are passed whenever you make any changes.

# How to contribute - Guidelines

## ⚡️ Contribute in core FreeAPI codebase:

We welcome your interest in contributing to our open source project!

To contribute to FreeAPI, please follow these steps:

1. Fork the repository.
2. Create a new branch for your feature or bug fix: `git checkout -b feat/your-feature-name` or `git checkout -b fix/your-bug-fix-name`.
3. Make your changes and commit them using conventional commit messages: `git commit -am "feat: Add new feature"`. For more details on the commit format and other guidelines, please refer to the [Contributor Guidelines](./CONTRIBUTING.md).
4. Push your changes to your forked repository: `git push origin feat/your-feature-name`.
5. Submit a pull request to the main repository, explaining the changes you've made and providing any necessary details.

Here's a guide on how you can effectively contribute to our API hub:

1. Pull Requests for Readme Updates: Please refrain from sending pull requests solely for updating the project's readme file. While we appreciate the importance of clear and concise documentation, we prefer to focus on substantial code contributions and feature enhancements.

2. Grammar Updates: Our team values effective communication, but we're not grammar sticklers. You don't need to send pull requests solely for grammar fixes or minor language improvements. Instead, concentrate on the core functionalities and features of the project.

3. Avoid Updating Existing Public APIs: To maintain stability and consistency, we discourage direct updates to existing public APIs within the API hub. These APIs have been thoroughly tested and approved. However, if you encounter any bugs or issues, we encourage you to open an issue on our project's issue tracker to notify us.

4. Build New Project APIs: We encourage you to explore your creativity and contribute by building complete project APIs. These APIs should provide comprehensive solutions that can assist developers in constructing complex projects to showcase their skills and abilities. Your contributions in this area will greatly benefit the community.

5. Draft a Proposal and Discuss on Discord: Before diving into your project, we recommend drafting a proposal. This can include a mind map or outline of the API you intend to build and its potential benefits. Join our Discord community, where you can share your proposal, discuss ideas, and gather feedback from fellow contributors. Engaging in these discussions will enhance your backend portfolio and help shape the future direction of the project.

We appreciate your enthusiasm and look forward to your valuable contributions to our open source API hub project.

Together, we can foster a collaborative environment and make a significant impact in the API integration landscape.

Click [here](https://github.com/hiteshchoudhary/apihub/blob/main/CONTRIBUTING.md) for detailed contribution guide.

## 🚀 Contribute by creating frontend application:

Thank you for your interest in contributing to the FreeAPI project by creating frontend applications consuming FreeAPIs! Your efforts play a crucial role in enhancing the user experience and expanding the reach of our APIs. Please follow this guide to ensure a smooth and collaborative contribution process.

Click [here](https://github.com/hiteshchoudhary/apihub/blob/main/CONTRIBUTING_FRONTEND.md) for detailed contribution guide for Frontend Developers 🚀!

## 🧪 Contribute in testing suite

Thank you for your interest in contributing to the FreeAPI project to increase code coverage of our API service that helps us to ship robust endpoints that are battlefield tested. Please follow this guide to ensure a smooth and collaborative contribution process.

Click [here](https://github.com/hiteshchoudhary/apihub/blob/main/CONTRIBUTING_CODE_COVERAGE.md) for detailed contribution guide for increasing code coverage.

# 📜 Swagger Docs

[Swagger Docs](https://api.freeapi.app): https://api.freeapi.app

0 comments on commit 4450a8a

Please sign in to comment.