> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trypost.it/llms.txt
> Use this file to discover all available pages before exploring further.

# Contributing

> How to contribute to TryPost

# Contributing to TryPost

Thank you for your interest in contributing to TryPost! This guide will help you get started.

## Ways to Contribute

* **Report bugs** - Found a bug? Open an issue
* **Suggest features** - Have an idea? Start a discussion
* **Improve docs** - Fix typos, add examples, clarify instructions
* **Write code** - Fix bugs or implement new features

## Tech stack

TryPost is a Laravel app with an Inertia.js + **Vue 3** front-end. Queues run on Horizon; real-time updates use Reverb.

## Development Setup

### Prerequisites

* PHP 8.2+
* Node.js 20+
* PostgreSQL or MySQL
* Redis
* Composer

### Setup

1. Fork and clone the repository:

```bash theme={null}
git clone https://github.com/YOUR_USERNAME/trypost.git
cd trypost
```

2. Install dependencies and run first-time setup:

```bash theme={null}
composer setup
```

This runs `composer install`, copies `.env`, generates an app key, migrates the database, runs `npm install`, and builds the front-end.

3. Start all dev processes with one command:

```bash theme={null}
composer dev
```

That runs `php artisan serve`, `php artisan queue:listen`, `php artisan pail` (logs), and `npm run dev` concurrently. For SSR development use `composer dev:ssr` instead.

## Code Style

### PHP

We use [Laravel Pint](https://laravel.com/docs/pint) for PHP code formatting:

```bash theme={null}
# Check code style
composer test:lint

# Fix code style
composer lint
```

### JavaScript/TypeScript

We use ESLint and Prettier:

```bash theme={null}
# Lint
npm run lint

# Format
npm run format
```

## Testing

Run the full suite (lint + tests) with:

```bash theme={null}
composer test
```

To run just the test suite:

```bash theme={null}
php artisan test
```

## Pull Request Process

1. **Create a branch** from `main`:

```bash theme={null}
git checkout -b feature/your-feature-name
```

2. **Make your changes** and commit with clear messages

3. **Run tests** and ensure they pass

4. **Run code formatters**:

```bash theme={null}
composer lint
npm run lint
npm run format
```

5. **Push** and create a pull request against the `main` branch

6. **Describe your changes** in the PR description

## Commit Messages

Write clear commit messages:

* `fix: resolve login redirect issue`
* `feat: add Pinterest scheduling support`
* `docs: update installation guide`
* `refactor: simplify post creation logic`

## Questions?

* [GitHub Discussions](https://github.com/trypostit/trypost/discussions) - For questions and ideas
* [GitHub Issues](https://github.com/trypostit/trypost/issues) - For bugs and feature requests

## License

By contributing, you agree that your contributions will be licensed under the same license as the project — **GNU AGPL v3** (see `LICENSE.md` in the repo).
