phoneburner / pinch-template
The Pinch Application Template
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Type:project
pkg:composer/phoneburner/pinch-template
Requires
- php: ^8.4
- phoneburner/composer-replacements: ^1.0.0
- phoneburner/pinch-framework: ^0.0.36
Requires (Dev)
- behat/behat: ^3.25.0
- brianium/paratest: ^7.14.1
- eventsauce/test-utilities: dev-main
- league/openapi-psr7-validator: ^0.22.0
- phoneburner/coding-standard: ^1.0.1
- phoneburner/pinch-phpstan: ^0.0.36
- php-parallel-lint/php-parallel-lint: ^1.4
- phpunit/phpunit: ^12.4.0
- rector/rector: ^2.2.1
- roave/security-advisories: dev-latest
- symfony/var-dumper: ^7.3.4
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
- 
Configure Environment cp .env.dist .env # Edit .env with your configuration
- 
Build Docker Images and Install Dependencies make 
- 
Start Docker Services docker compose up -d 
- 
Run Database Migrations docker compose run --rm php pinch migrations:migrate 
- 
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 .envdatabase settings
- Check Docker network: docker compose ps
- Verify database service: docker compose logs db
Contributing
This is a read-only repository. To contribute:
- Visit the main repository
- Submit issues and pull requests there
- Follow the contribution guidelines in the main repository
License
The Pinch Framework is open-source software licensed under the MIT license.