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

Development Setup

Prerequisites

  • PHP 8.2+
  • Node.js 18+
  • PostgreSQL or MySQL
  • Redis
  • Composer

Setup

  1. Fork and clone the repository:
git clone https://github.com/YOUR_USERNAME/trypost.git
cd trypost
  1. Install dependencies:
composer install
npm install
  1. Configure environment:
cp .env.example .env
php artisan key:generate
  1. Set up database and run migrations:
php artisan migrate
  1. Start development servers:
# Terminal 1 - Laravel
php artisan serve

# Terminal 2 - Vite
npm run dev

# Terminal 3 - Queue worker
php artisan horizon:watch

Code Style

PHP

We use Laravel Pint for PHP code formatting:

# Check code style
vendor/bin/pint --test

# Fix code style
vendor/bin/pint

JavaScript/TypeScript

We use ESLint and Prettier:

# Lint
npm run lint

# Format
npm run format

Testing

Run the test suite before submitting changes:

php artisan test

Pull Request Process

  1. Create a branch from develop:
git checkout -b feature/your-feature-name
  1. Make your changes and commit with clear messages

  2. Run tests and ensure they pass

  3. Run code formatters:

vendor/bin/pint
npm run lint
npm run format
  1. Push and create a pull request to the develop branch

  2. 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?

License

By contributing, you agree that your contributions will be licensed under the same license as the project (FSL).