postiz/CONTRIBUTING.md

87 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Contributing
Contributions are welcome - code, docs, whatever it might be! If this is your first contribution to an Open Source project or you're a core maintainer of multiple projects, your time and interest in contributing to this project is most welcome.
## Write code with others
This is an open source project, with an open and welcoming community that is always keen to welcome new contributors. We recommend the two best ways to interact with the community are:
- **GitHub issues**: To discuss more slowly, or longer-written messages.
- **[Discord chat](https://discord.postiz.com)**: To chat with people [Discord chat](https://discord.postiz.com/) and a quicker feedback.
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:** 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:
### 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!