doc: Update CONTRIBUTING.md

This commit is contained in:
Akash Jana 2024-10-02 14:16:54 +05:30 committed by GitHub
parent 9eccc14d6b
commit 9c9c7329fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 61 additions and 8 deletions

View File

@ -14,20 +14,73 @@ As a general rule;
- **If a change is less than 3 lines**: You're probably safe just to submit the change without a discussion. This includes typos, dependency changes, and quick fixes, etc.
- **If a change is more than 3 lines**: It's probably best to discuss the change in an issue or on discord first. This is simply because you might not be aware of the roadmap for the project, or understand the impact this change might have. We're just trying to save you time here, and importantly, avoid you being disappointed if your change isn't accepted.
## Types of Contributions
Contributions can include:
- **Code improvements:** Fixing bugs or adding new features.
- **Documentation updates:** Enhancing clarity or adding missing information.
- **Feature requests:** Suggesting new capabilities or integrations.
- **Bug reports:** Identifying and reporting issues.
## How to contribute
This project follows a Fork/Feature Branch/Pull Request model. If you're not familiar with this, here's how it works:
1. Fork the project to your GitHub account.
2. Clone your fork to your local machine.
3. Create a new branch for your changes.
4. Make your changes in this new branch.
5. Push your changes to your fork.
6. Create a pull request from your fork to this project.
7. We'll review your changes and approve or comment on them.
1. **Fork the project:** Create a personal copy of the repository on your GitHub account.
2. **Clone your fork:** Bring a copy of your fork to your local machine.
```bash
git clone https://github.com/YOUR_USERNAME/postiz.git
```
3. **Create a new branch**: Start a new branch for your changes
```bash
git checkout -b feature/your-feature-name
```
6. **Make your changes**: Implement the changes you wish to contribute.
7. **Push your changes**: Upload your changes to your fork.
```bash
git push origin feature/your-feature-name
```
9. **Create a pull request**: Propose your changes to the main project.
## Setting up your development environment
To contribute effectively, youll need to set up your development environment. Follow the instructions below:
Documentation on how to setup a development environment is available here; https://docs.postiz.com/installation/development
### Prerequisites
1. **Node.js** (version 18+): Install [Node.js](https://nodejs.org/en/download/package-manager)
2. **PostgreSQL**: Install PostgreSQL for your database. You can run it in Docker:
```bash
docker run -e POSTGRES_USER=root -e POSTGRES_PASSWORD=your_password --name postgres -p 5432:5432 -d postgres
```
3. **Redis**: Also install Redis, which can be done using Docker:
```bash
docker run --name redis -p 6379:6379 -d redis
```
4. **Cloud Services**
- Cloudflare R2: For image uploads and storage (optional).
- Social Media API Keys: Obtain various API keys and secrets for services you wish to integrate (e.g., Reddit, X, Instagram).
### Setting Up the Project
1. **Clone the repository**:
```bash
git clone https://github.com/gitroomhq/gitroom
```
2. **Set environment variables**: Copy `.env.example` to `.env` and fill in the required values.
3. **Install dependencies**:
```bash
npm install
```
4. **Generate the Prisma client and run migrations**:
```bash
npm run prisma-db-push
```
5. **Run the project**:
```bash
npm run dev
```
If everything runs successfully, open http://localhost:4200 in your browser!
Need Help?
If you encounter any issues, please visit our support page or check the community forums. Your contributions help make Postiz better!