A personal website built with Symfony showcasing development experiences, projects, and technical blog posts.
This is a modern web application built with Symfony 7.4 and PHP 8.5, featuring:
- Modular Architecture: Organized into domain modules (Analytics, Contact, Experience, GitHub, Settings, User)
- Real-time Features: Mercure integration for live updates
- Modern Frontend: Tailwind CSS 4.1 with Symfony AssetMapper and Stimulus
- Message Queue: Symfony Messenger with Doctrine transport
- Caching: Valkey (Redis-compatible) for application cache
- Database: PostgreSQL 17 with Doctrine ORM
- Server: FrankenPHP for high-performance PHP serving
- Language: PHP 8.5
- Framework: Symfony 7.4
- ORM: Doctrine ORM 3.5
- Server: FrankenPHP
- Package Manager: Composer
- CSS Framework: Tailwind CSS 4.1
- JavaScript: Stimulus (via Symfony UX)
- Asset Management: Symfony AssetMapper
- Components: Twig Components, Turbo
- Database: PostgreSQL 17
- Cache: Valkey 9.0 (Redis-compatible)
- Containerization: Docker & Docker Compose
- Build Tool: Make
- Docker & Docker Compose
- Make
- Git
git clone https://github.com/tales-from-a-dev/website.git
cd websitemake buildmake upFor development with Xdebug:
make up-devFor testing environment:
make up-testmake installmake dbThis command will:
- Create the database
- Apply migrations
- Seed initial data
- HTTP: http://localhost
- HTTPS: https://localhost
| Command | Description |
|---|---|
make build |
Build Docker images |
make up |
Start containers in detached mode |
make up-dev |
Start containers with Xdebug for debugging |
make up-test |
Start containers for testing |
make up-prod |
Start containers in production mode |
make stop |
Stop containers |
make restart |
Restart containers |
make down |
Stop and remove all containers, networks, volumes |
make logs |
Show live logs |
make sh |
Connect to PHP container shell |
| Command | Description |
|---|---|
make install |
Install dependencies |
make update |
Update dependencies |
make composer c='<command>' |
Run custom composer command |
| Command | Description |
|---|---|
make sf c='<command>' |
Run Symfony console command |
make cc |
Clear cache |
make container |
Display all services |
make envs |
Display environment variables |
make parameters |
Display parameters |
make router |
Display all routes |
| Command | Description |
|---|---|
make importmap |
Install JavaScript dependencies |
make asset-build |
Build Tailwind CSS |
make asset-watch |
Watch and rebuild assets |
make asset-compile |
Compile assets for production |
make asset-outdated |
List outdated JavaScript packages |
make asset-update |
Update JavaScript packages |
make asset-audit |
Check for vulnerabilities in assets |
| Command | Description |
|---|---|
make db |
Create database, apply migrations, and seed data |
make db-create |
Create database |
make db-migrate |
Run migrations |
make db-diff |
Generate migration from entity changes |
make db-update |
Force schema update |
make db-load |
Load fixtures |
make db-seed |
Seed database with initial data |
make db-validate |
Validate ORM mapping |
make db-test |
Setup test database |
| Command | Description |
|---|---|
make test |
Run all tests |
make test f='<path>' |
Run specific test file |
make test-unit |
Run unit tests |
make test-functional |
Run functional tests |
make test-integration |
Run integration tests |
make coverage |
Run tests with code coverage |
| Command | Description |
|---|---|
make phpcsfixer |
Fix PHP coding style |
make phpcsfixer-dry |
Check PHP coding style (dry-run) |
make phpstan |
Run static analysis |
make phpstan-baseline |
Update PHPStan baseline |
make rector |
Run Rector refactoring |
make rector-dry |
Check Rector suggestions (dry-run) |
make twigcsfixer |
Fix Twig coding style |
make twigcsfixer-dry |
Check Twig coding style (dry-run) |
make fixer |
Fix PHP and Twig coding style |
make linter |
Lint Twig, YAML, and validate Doctrine mapping |
Key environment variables (defined in .env and .env.local):
APP_ENV: Application environment (dev,test,prod)APP_SECRET: Secret key for cryptographic operationsSECURE_SCHEME: URL scheme (httporhttps)
CONTACT_EMAIL: Contact email addressCONTACT_PHONE: Contact phone number
GITHUB_ACCESS_TOKEN: GitHub API access tokenGITHUB_USERNAME: GitHub username
DATABASE_URL: PostgreSQL connection stringPOSTGRES_USER: Database user (default:app)POSTGRES_PASSWORD: Database passwordPOSTGRES_DB: Database name (default:app)POSTGRES_VERSION: PostgreSQL version (default:17)
CACHE_DSN: Valkey/Redis connection string
MESSENGER_TRANSPORT_DSN: Message queue transport DSN
MAILER_DSN: Mailer transport DSN
FREE_MOBILE_DSN: Free Mobile notifier DSN
MERCURE_URL: Internal Mercure hub URLMERCURE_PUBLIC_URL: Public Mercure hub URLMERCURE_JWT_SECRET: JWT secret for Mercure
The project uses PHPUnit with three test suites:
- Unit: Fast, isolated tests for individual classes
- Functional: Tests for HTTP endpoints and user interactions
- Integration: Tests for database interactions and external services
# Run all tests
make test
# Run specific suite
make test-unit
make test-functional
make test-integration
# Run specific test file
make test f=tests/Unit/Shared/Domain/ValueObject/AlertTest.php
# Generate code coverage (requires Xdebug)
make coverage- Place tests in
tests/directory following the same structure assrc/ - Test classes must end with
Test - Inherit from
PHPUnit\Framework\TestCase(unit) or specialized Symfony test cases
.
โโโ assets/ # Frontend assets (CSS, JS)
โโโ bin/ # Executables (console)
โโโ config/ # Configuration files
โ โโโ packages/ # Bundle configurations
โ โโโ routes/ # Route definitions
โโโ docker/ # Docker configuration files
โโโ fixtures/ # Database fixtures
โโโ migrations/ # Doctrine migrations
โโโ public/ # Web root
โ โโโ index.php # Application entry point
โโโ src/ # Application source code
โ โโโ Analytics/ # Analytics module
โ โโโ Contact/ # Contact module
โ โโโ Experience/ # Experience module
โ โโโ GitHub/ # GitHub integration module
โ โโโ Settings/ # Settings module
โ โโโ Shared/ # Shared/common code
โ โโโ User/ # User module
โโโ templates/ # Twig templates
โโโ tests/ # Test files
โ โโโ Fixtures/ # Test fixtures
โ โโโ Functional/ # Functional tests
โ โโโ Integration/ # Integration tests
โ โโโ Unit/ # Unit tests
โโโ translations/ # Translation files
โโโ var/ # Cache, logs, sessions
โโโ vendor/ # Composer dependencies
- Never commit
.env.localor production secrets - Use Symfony Secrets for sensitive production data
- Change default passwords in production
- Keep dependencies up to date
The project enforces code quality through:
- PHP CS Fixer: PSR-12 coding standards
- PHPStan: Static analysis (Level 8)
- Rector: Automated refactoring and upgrades
- Twig CS Fixer: Twig template standards
- Symfony Linters: YAML and Twig validation
Run all quality checks:
make linter
make phpstan
make phpcsfixer-dry
make rector-dry
make twigcsfixer-dryThis project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) Romain Monteil