# Developer Reference — Licensing Architecture

**Document Version:** 1.0.0 (Phase 19)

---

## 1. Services & DI Contracts

- **`LicenseProviderInterface`**: Abstraction for remote/mock validation transports (`activate`, `validate`, `deactivate`).
- **`LicenseService`**: Manages installation registration, SHA-256 key hashing, grace period tracking, and local state.
- **`EntitlementService`**: Resolves feature permissions (`has`, `allows`) and handles atomic monthly counter consumption (`consume`, `canConsume`, `getRemaining`).
- **`RequireEntitlement` Middleware**: Intercepts route requests and enforces entitlement availability.
