Modern NBA statistics application with React frontend, Node.js API, and PostgreSQL database. Fully automated Azure deployment with CI/CD pipelines.
- 🏀 Real NBA data from BallDontLie API
- 💾 PostgreSQL caching for fast performance
- 🔄 Automatic cache updates
- ☁️ Azure Container Apps deployment
- 🔐 Secure secrets management with Azure Key Vault
- 🚀 CI/CD with Azure DevOps pipelines
- 🌍 Multi-environment (Dev/Test/Prod)
-
Get BallDontLie API Key from balldontlie.io
-
Add API key to
.env:NBA_API_KEY=your_api_key_here
-
Start with Docker Compose:
docker-compose up
Access:
- Frontend: http://localhost:3001
- API: http://localhost:3000/api/v1
- Health: http://localhost:3000/health
Prerequisites:
- Azure DevOps project with service connection
- Pipeline variables:
POSTGRES_ADMIN_PASSWORD,NBA_API_KEY
Deploy:
- Push to
mainbranch (infrastructure changes trigger deployment) - Or manually run pipelines in Azure DevOps
Pipelines:
- Infrastructure → API → Frontend (cascade automatically)
- Manual approval required for Test/Prod environments
See Infrastructure Guide for details.
- Frontend: React 19, TypeScript, Vite, Tailwind CSS
- Backend: Node.js, Express, PostgreSQL
- Infrastructure: Azure Bicep, Container Apps, Key Vault
- DevOps: Azure DevOps Pipelines, Docker
- External API: BallDontLie.io
GET /api/v1/teams- List all teamsGET /api/v1/teams/:id- Get team details
GET /api/v1/players- List players (paginated)GET /api/v1/players/:id- Get player details
GET /api/v1/games- List games (filtered)GET /api/v1/games/:id- Get game details
nba-stats/
├── frontend/ # React app (port 3001)
├── services/api/ # Node.js API (port 3000)
├── infra/ # Bicep IaC templates
├── pipelines/ # Azure DevOps YAML
├── docker-compose.yml # Local development
└── tests/ # Test suites
- Infrastructure - Deployment and Azure resources
- Pipelines - CI/CD configuration
- API Schemas - Data models
- Error Handling - API error patterns
401 Unauthorized: Invalid/missing NBA_API_KEY in .env (local) or Key Vault (Azure)
No Data: Check containers are running (docker-compose ps or Azure Portal logs)
Port Conflict: Modify ports in docker-compose.yml
Azure Deployment: Review pipeline logs, verify service connections and RBAC permissions
Key Vault Conflict: Purge soft-deleted vault with az keyvault purge --name <vault-name> (dev/test only)
- Fork and create feature branch
- Test locally with Docker Compose
- Test Azure deployment
- Create Pull Request
ISC