Cart Operations & Validation
Testing, monitoring, and operational validation for the golf cart management system.
Last updated: 2026-01-26 Where to find it: Facilities API > Golf Carts > Operations Who can use it: Developers, QA engineers Prerequisites: API credentials, development environment Help link: /golf-carts/operations
Testing
- Unit suite (covers cart CRUD, assignments, incidents, maintenance, analytics/zones):
NX_CLI_SET_DAEMON=false NX_DAEMON=false NODE_OPTIONS=--max_old_space_size=6144 pnpm nx run facilities-service:test:unit --runInBand --skip-nx-cache --output-style=stream
- Integration smoke (module wiring with mocked repos):
libs/facilities/facilities-service/src/lib/__tests__/integration/facilities-service.module.spec.ts
Monitoring Suggestions
- Availability: new endpoints (
/golf-carts/available,/analytics/utilization,/zones/summary) are good SLO probes. - Predictive maintenance: alert on non-empty results to drive service bay actions.
- GPS staleness: alert if
lastLocationAtis stale for in-use carts.
API Smoke Checklist
- Utilization: expect 200 and fields
utilizationRate,avgDailyAssignments. - Zones:
GET /golf-carts/zones?tenantId=...&zone=...returns array;zonerequired. - Predictive:
horizonDays > 0enforced; defaults applied when omitted.
Dependencies
- Prisma schema:
GolfCartDetailsincludes GPS + service fields;CartAssignmentandCartIncidentunderpin usage and incident analytics. - Service code:
libs/facilities/facilities-service/src/lib/golf-cart.*for controllers/resolvers/DTOs.
Expected outcome
- Unit and integration tests validate cart management logic.
- Monitoring covers availability, predictive maintenance, and GPS staleness.
- API smoke tests confirm endpoint health.
Related
- Golf Cart Overview — Cart management overview
- Golf Cart API — REST and GraphQL endpoints
- Analytics & GPS — Utilization and zones