Thank you for your interest in contributing to GPTRouter! This document will guide you through the process of setting up the project and explain how you can contribute to its development. By following these guidelines, you can help us make GPTRouter better for everyone.
To contribute to GPTRouter, ensure that your system meets the following requirements:
- Node.js 18 LTS or later
- npm or yarn package manager
- PostgreSQL database
To install and set up the GPTRouter project, follow these steps:
- Clone the repository:
git clone https://github.com/Writesonic/GPTRouter.git
cd GPTRouter/
- Install project dependencies:
npm install
# or
yarn install
GPTRouter requires a PostgreSQL database to function. Follow these steps to set up PostgreSQL:
-
Install PostgreSQL in your local environment. Refer to the official PostgreSQL documentation for installation instructions based on your operating system.
-
Create a new PostgreSQL database:
createdb model_router_db
- Set the DB credentials in .env using .env.example as reference:
Make sure to replace username
and password
with your own PostgreSQL credentials.
To run the GPTRouter project on your local machine, follow these steps:
- Build the project:
npm run build
- Start the application:
npm start
The application should now be running on http://localhost:8000
.
If you are interested in contributing to GPTRouter's development, take a look at the issues tab on the project's GitHub repository. There, you will find a list of open issues that you can tackle. Feel free to open new issues as well if you encounter any problems or have ideas for improvement.
To maintain a consistent codebase, GPTRouter follows certain code style and coding conventions. Please adhere to the following guidelines when contributing:
- All code should follow the JavaScript Standard Style guidelines.
If you have implemented a new feature, fixed a bug, or made any improvements, we welcome your pull requests. Before submitting a pull request, please make sure to do the following:
-
Branch out from the latest
main
. -
Commit your changes with meaningful commit messages.
-
Push your changes to your forked repository.
-
Submit your pull request to the
main
branch of the main repository.
We will review your changes and get back to you with feedback or merge it if everything looks good.
If you encounter any bugs, have suggestions, or want to discuss new features, please create an issue on the project's GitHub repository. Provide a detailed explanation of the problem or your suggestion so that we can understand it better and discuss it with you.
By contributing to GPTRouter, you agree that your contributions will be licensed under the GNU GENERAL PUBLIC LICENSE.