PRD: Plans & feature flags
| Module | Licensing | PRD ID | PRD-PLN-001 |
| Status | Ready to dev | FEAT | PLN |
| Epic | — | Plane | BANA-1508 |
| Date | 2026-06-05 | Version | v1.0 |
| Packages | @nx/licensing | URD | PLN |
| Surface | Backend | ||
| Owner | Phát Nguyễn | ||
What plans & feature flags are
BANA is sold as plans that bundle different feature sets and device seat limits. The product needs one place that defines what each plan carries, before any license is ever issued from it. Without it, every module ends up defining its own plans and features, leaving the plan catalog inconsistent and impossible to reuse across sign-up and upgrade surfaces.
This PRD establishes the plan template: reusable plans - trial, subscription, perpetual - carrying a duration, a grace period, a device seat limit, and a bag of typed feature flags whose codes are unique within each plan.
License issuance lives in another PRD
This PRD only defines the plan template - it does not issue licenses, drive a lifecycle, or activate devices. Issuing licenses from these plans, renewing, suspending, reinstating, revoking, device activation, and runtime validation are specified in PRD-ACT-001.
One plan, from creation to archival
| What happens | Plan state |
|---|---|
| Operator creates the plan, sets a 365-day duration, a 15-day grace period, a device seat limit | Being authored |
| Attaches typed feature flags, each code unique within the plan | Being authored |
| Sets a bilingual name, description, and display order | Being authored |
| Activates the plan | Active - appears in the public catalog in the right order |
| Plan no longer sold | Archived - disappears from the catalog, its data stays intact |
A public plan catalog lists active plans in display order, for sign-up and upgrade surfaces to read.
Where it's easy to get wrong
Archiving is not deleting
A plan no longer in use is soft-deleted (archived) - never hard-deleted from the app. The plan disappears from the public catalog, but its data and any licenses issued from it stay intact. A feature flag's code must be unique within each plan, and that constraint is enforced at the storage layer, not only in application code.