Skip to content

[BE-96] Build the software licenses module for digital assets #1149

Description

@yusuftomilola

Overview

The README explicitly covers "physical and digital assets" and calls out that "licenses are shared across teams" as a tracking problem. Licenses have seat counts and renewal dates that physical assets do not.

Tasks

  • Create License (name, vendorId, licenseKey encrypted at rest, type PERPETUAL/SUBSCRIPTION, seatsTotal, startDate, expiryDate, cost, currency, autoRenew) and LicenseAssignment (licenseId, userId or assetId, assignedAt, revokedAt).
  • Build CRUD plus assign and revoke endpoints.
  • Enforce the seat limit — refuse assignment beyond seatsTotal with 409.
  • Expose seats used versus available, and an expiring-soon query.
  • Encrypt license keys at rest and redact them from list responses; reveal only to authorized roles on the detail endpoint.
  • Emit renewal reminders ahead of expiry ([BE-99]).
  • Generate a migration and write tests.

Acceptance Criteria

  • Over-assignment beyond available seats is refused.
  • License keys are encrypted at rest and never appear in list responses.
  • Expiring licenses are queryable and trigger reminders.

Dependencies

Blocked by [BE-94].

Notes for Contributors

The backend is being rebuilt from a clean NestJS skeleton — backend/src/ currently contains only app.module.ts, app.controller.ts, app.service.ts, and main.ts. Follow standard NestJS module structure (module / controller / service / dto / entities) and register your module in app.module.ts. Comment below to be assigned.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions