Contributing to RepoGPT
October 9, 2024 ยท View on GitHub
Thank you for considering contributing to RepoGPT! We welcome contributions of all kinds, including bug fixes, feature enhancements, documentation improvements, and more. This guide will help you get started with contributing to the project.
Table of Contents
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Coding Guidelines
- Testing
- Community and Support
- License
Code of Conduct
By participating in this project, you agree to abide by our Code of Conduct. Please read it to understand the expected behavior in our community.
How Can I Contribute?
Reporting Bugs
If you find a bug in the project, please help us by reporting it:
- Search Existing Issues: Before creating a new issue, check if the bug has already been reported.
- Create a New Issue: If it hasn't been reported, create a new issue and include:
- A clear and descriptive title.
- Steps to reproduce the problem.
- Expected vs. actual behavior.
- Screenshots or logs, if applicable.
- Environment details (OS, Node.js version, etc.).
Suggesting Features
We welcome new ideas to improve RepoGPT:
- Check for Existing Feature Requests: See if your idea has already been suggested.
- Open a New Issue: Provide:
- A detailed description of the feature.
- Why it would be useful.
- Any potential drawbacks.
Improving Documentation
Good documentation helps everyone. You can contribute by:
- Fixing typos or grammatical errors.
- Clarifying instructions.
- Adding examples or tutorials.
Submitting Pull Requests
We appreciate your efforts to contribute code:
- Fork the Repository: Click the "Fork" button on GitHub to create your own copy.
- Create a Branch: Use a descriptive name (e.g.,
fix-login-issueoradd-chat-feature). - Make Changes: Implement your feature or fix.
- Commit Changes: Write clear and concise commit messages.
- Push to Your Fork:
git push origin your-branch-name. - Create a Pull Request:
- Go to the original repository.
- Click on "New Pull Request".
- Select your branch and provide a detailed description.
Development Setup
Prerequisites
Ensure you have the following installed:
- Node.js (v18 or higher)
- pnpm (preferred package manager)
- Docker (for database setup)
- PostgreSQL with the pgvector extension
- OpenAI API Key (for AI functionalities)
Forking the Repository
- Navigate to the RepoGPT GitHub page.
- Click the Fork button to create a copy in your GitHub account.
Setting Up Your Environment
-
Clone Your Forked Repository:
git clone https://github.com/your-username/repogpt.git cd repogpt -
Add Upstream Remote:
git remote add upstream https://github.com/mbarinov/repogpt.git -
Install Dependencies:
pnpm install -
Set Up PostgreSQL with pgvector:
docker run -d \ --name pgvector \ -e POSTGRES_USER=postgres \ -e POSTGRES_PASSWORD=yourpassword \ -e POSTGRES_DB=repogpt \ -p 5432:5432 \ ankane/pgvector -
Create a
.envFile:In the project root directory, create a
.envfile and add:DATABASE_URL=postgresql://postgres:yourpassword@localhost:5432/repogpt -
Initialize the Database Schema:
npx prisma db push
Running the Application
Start the development server:
pnpm dev
Access the app at http://localhost:3000.
Coding Guidelines
Code Style
- Consistency: Match the existing code style.
- Formatting: Use Prettier and ESLint configurations provided in the project.
- Comments: Comment complex logic and ensure public methods are documented.
- Variables and Functions: Use clear and descriptive names.
Commit Messages
- Format: Use the Conventional Commits standard (e.g.,
feat: add new chat feature). - Language: Write in the imperative mood.
- Reference Issues: If applicable, reference related issues (e.g.,
fix: resolve login bug closes #123).
Community and Support
- Discussions: Join our GitHub Discussions for questions and community support.
- Issues: For bugs and feature requests, use the GitHub Issues page.
- Email: For sensitive matters, contact [me@maxbarinov.com].
License
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for your interest in contributing to RepoGPT! Together, we can make this project even better.