Add frontend/modules/loyalty with types, API client, design system, feature pages and thin App Router routes under app/loyalty/. BFF proxy at app/api/loyalty/. Include loyalty frontend docs. Co-authored-by: Cursor <cursoragent@cursor.com>
3.1 KiB
3.1 KiB
Phase: Package & Membership
| Field | Value |
|---|---|
| Identifier | beauty-business-14-5 |
| Status | Planned |
| Owner | Platform |
| Module(s) | beauty_business.packages, beauty_business.memberships |
| Service(s) | beauty_business |
| Depends On | beauty-business-14-0, beauty-business-14-3 (service refs), beauty-business-14-4 (customer refs) |
| ADR(s) | TBD |
| Manifest | phase-manifest.yaml |
| Framework | ADR-013 · ADR-018 · ADR-019 |
Objective
Deliver beauty commercial packages and memberships: prepaid multi-session bundles, session balance tracking, recurring membership plans (monthly spa, unlimited blow-dry tiers), redemption against appointments — without owning Loyalty program ledger or Accounting subscription billing.
Enterprise Phase Discovery
Required before Implementation.
Target Responsibility (this phase when Complete)
- PackageDefinition (sessions, services included, validity)
- CustomerPackage with session balance and redemption history
- MembershipPlan and CustomerMembership (renewal, freeze, cancel shells)
- Redemption hooks on appointment completion (14.1)
- Events:
beauty_business.package.*,beauty_business.membership.* - Permissions:
beauty_business.packages.*,beauty_business.memberships.*
Explicitly Excluded
- Loyalty PointAccount / Wallet (Loyalty service)
- Accounting invoice/subscription engine
- Healthcare treatment plans / insurance packages
Business Analysis
| Item | Detail |
|---|---|
| Actors | Front desk, salon owner, customer |
| Business capabilities | Sell packages, track sessions, manage memberships |
| Success metrics | Accurate session balance; idempotent redemption |
| Non-goals | Platform-wide SaaS subscription (Core) |
Scope
In Scope
- PackageDefinition, PackageLine (service refs)
- CustomerPackage, PackageRedemption
- MembershipPlan, CustomerMembership, MembershipLifecycleEvent
- Integration intents to Accounting (payment ref only)
High-Level Entities
| Entity | Purpose |
|---|---|
| PackageDefinition | 10-session laser package |
| CustomerPackage | Purchased package instance |
| PackageRedemption | Session consumed on visit |
| MembershipPlan | Monthly spa membership |
| CustomerMembership | Active membership instance |
Out of Scope
- Loyalty campaigns and points (14.7 / Loyalty service)
- Full payment gateway (Accounting / future payment provider)
- Commission on package sales (14.6)
Completion Criteria
- Package redemption integrated with appointment completion by ref
- No Loyalty ledger duplication
- Healthcare billing packages untouched