Architecture Overview
Pétanque Life is built as a monorepo containing multiple applications and shared packages. This architecture enables code reuse, consistent design, and efficient development.
High-Level Architecture
Monorepo Structure
petanque-ecosystem/
├── apps/ # All applications
│ ├── player/ # Player app
│ ├── club/ # Club management
│ ├── tournament/ # Tournament system
│ ├── scoring/ # Live scoring
│ ├── stats/ # Statistics
│ ├── federation/ # Federation admin
│ ├── umpire/ # Umpire tools
│ ├── community/ # Social features
│ ├── find/ # Boulodrome finder
│ ├── shop/ # Marketplace
│ ├── academy/ # Training content
│ ├── public/ # Main website
│ └── docs/ # Documentation (this site)
│
├── packages/ # Shared packages
│ ├── ui/ # Component library
│ ├── shared/ # Shared utilities
│ ├── api-client/ # API client
│ ├── auth/ # Authentication
│ ├── i18n/ # Internationalization
│ ├── config/ # Shared configuration
│ └── analytics/ # Analytics tracking
│
├── infrastructure/ # IaC (Bicep/Terraform)
└── turbo.json # Turborepo configKey Design Decisions
1. Monorepo with Turborepo
We use Turborepo for:
- Efficient caching of builds
- Parallel task execution
- Dependency graph awareness
- Incremental builds
2. Shared UI Components
The @petanque/ui package provides:
- Consistent design system
- Accessible components
- Dark mode support
- Mobile-first responsive design
3. Progressive Web Apps
All apps are PWAs with:
- Offline support via Service Workers
- App-like experience
- Push notifications
- Background sync
4. Internationalization
43 languages supported via:
- Vue I18n integration
- Lazy-loaded translations
- RTL support where needed
- Locale-aware formatting
Deployment
Each app deploys to its own Azure Static Web App with custom domains:
- Production:
*.petanque.life - Test:
*.test.petanque.life