Kick off your next big idea with a sleek, ready-to-use Symfony + API Platform stack designed for effortless REST API development.
- PHP 8.4: Latest stable version with modern features and performance improvements
- Symfony 7.3: Enterprise-grade PHP framework for robust API development
- API Platform 4.1: Modern REST and GraphQL API framework with built-in documentation
- Doctrine ORM: Powerful object-relational mapper for database interactions
- Docker: Containerization for consistent development and deployment environments
- Nginx: High-performance web server and reverse proxy
- PHP-FPM: FastCGI Process Manager for efficient PHP request handling
- PostgreSQL 17: Advanced open-source database with robust features for complex data management
- PHPUnit: Comprehensive testing framework for quality assurance
- PHPStan: Static analysis tool for code quality
- PHP CS Fixer: Code style enforcement tool
- Rector: Instant PHP code upgrades and automated refactoring
- Docker and Docker Compose
Clone the repository:
git clone https://github.com/mztrix/symfony-api-starter
Configure environment variables:
cp .env .env.local
# Edit .env.local with your configurations
Generate a JWT passphrase:
# Generate a secure passphrase for JWT signing
openssl rand -base64 32
# Copy the generated passphrase to .env.local and assign it to JWT_PASSPHRASE
# Example: JWT_PASSPHRASE=your_generated_passphrase
Build and start Docker containers:
cp compose.override.yaml.dist compose.override.yaml
docker compose build --no-cache
docker compose up -d --wait
The project uses several configuration files:
.env
: default configuration.env.local
: local configuration to create.env.test
: configuration for tests.env.dev
: configuration for development
The project uses PHPUnit for testing. To run the tests, you must first configure the test environment (APP_ENV=test).
docker compose exec app-php bin/phpunit
Contributions are welcome! Please check our contribution guide for more details.
To report a security vulnerability, please contact us directly.
For any questions or assistance, please contact us via [SUPPORT_CHANNEL].