A modern PHP application built with Symfony 7 following Clean Architecture and Domain-Driven Design principles for managing players, games, and scoring.
This project used to be a sandbox for learning and experimenting with new technologies and concepts in PHP development during my last employment. It's now a personal project that I work on for showing a part of what I can do.
- PHP 8
- Symfony 7 framework
- FrankenPHP (High-performance PHP application server)
- Docker for containerization
- PostgreSQL database
- Clean Architecture and Domain-Driven Design methodology
- Player Management: Create, update, and manage players with unique names
- Game Management: Track games, their statuses, and associated players
- Scoring System: Record and retrieve scores for players in specific games
- Event-Driven Architecture: Uses Symfony Messenger for handling domain events
- Validation: Ensures data integrity with Symfony Validator
- Error Handling: Graceful handling of validation and transactional errors
- Docker Compose (v2.10+)
- Git
-
Clone the repository:
git clone https://github.com/PALandoin/Dart_Back cd Dart_Back -
Build the project:
docker compose build --no-cache
-
Start the application:
docker compose up --pull always -d --wait
-
Access the application:
- Open https://localhost in your browser and accept the TLS certificate
-
Stop the application:
docker compose down --remove-orphans
- Environment Variables: Configure database credentials and other settings in the
.envfile - Database: PostgreSQL is used as the default database. Ensure the
POSTGRES_*variables are set correctly
- Testing: Use PHPUnit for unit and integration tests
- Validation: Symfony Validator ensures data consistency
- Event Listeners: Custom event listeners handle domain events like PlayerCreatedEvent
- Production Ready: Optimized for production with Docker and Symfony best practices
- HTTPS: Automatic HTTPS setup with Caddy
- Database Issues: Check Docker logs for the database service:
docker compose logs database
- Validation Errors: Ensure data meets the validation rules defined in the domain models
This project is available under the MIT License.