phoneburner/pinch-template

The Pinch Application Template

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Type:project

v0.0.17 2025-08-08 08:15 UTC

This package is auto-updated.

Last update: 2025-08-08 08:36:20 UTC


README

Note: This repository is a read-only subtree split of the Pinch Framework monorepo. Please submit issues and pull requests to the main repository.

About

The Pinch Template package provides a complete application starter template for building REST APIs with the Pinch Framework. This opinionated template includes pre-configured Docker setup, database migrations, testing infrastructure, and example implementations following the framework's type-safe, API-first philosophy.

Quick Start

Create a New Project

composer create-project phoneburner/pinch-template my-api
cd my-api

Initial Setup

  1. Configure Environment

    cp .env.dist .env
    # Edit .env with your configuration
  2. Build Docker Images and Install Dependencies

    make
  3. Start Docker Services

    docker compose up -d
  4. Run Database Migrations

    docker compose run --rm php pinch migrations:migrate
  5. Verify Installation

    curl http://localhost:8080/

Project Overview

my-api/
├── bin/               # Console commands
├── config/            # Configuration files
├── database/          # Database migrations
├── public/            # Web root
├── src/               # Application source code
├── tests/             # Test suites
├── storage/           # Cache and logs
├── .env.dist          # Environment template
├── composer.json      # Project Composer dependencies
├── compose.yaml       # Docker Compose configuration
├── Makefile           # Development commands
└── openapi.yaml       # API specification

Development

Common Commands

# Run tests
make test

# Code quality checks
make lint
make phpstan

Documentation

Troubleshooting

Common Issues

Docker services not starting:

docker compose down -v
docker compose up -d

Permission issues:

docker compose exec php chown -R www-data:www-data var/

Database connection errors:

  • Verify .env database settings
  • Check Docker network: docker compose ps
  • Verify database service: docker compose logs db

Contributing

This is a read-only repository. To contribute:

  1. Visit the main repository
  2. Submit issues and pull requests there
  3. Follow the contribution guidelines in the main repository

License

The Pinch Framework is open-source software licensed under the MIT license.