Extract cameleer-license-api module from server-core #156

Closed
opened 2026-04-26 19:35:34 +02:00 by claude · 0 comments
Owner

Problem

cameleer-license-minter depends on cameleer-server-core for the shared license types (LicenseInfo, LicenseValidator, LicenseState, DefaultTierLimits). This means any consumer of the minter — including cameleer-saas — transitively pulls in cameleer-server-core and cameleer-common onto its classpath.

cameleer-saas
  └─ cameleer-license-minter
       └─ cameleer-server-core    ← server internals on SaaS classpath
            └─ cameleer-common

The SaaS management plane should not carry server runtime types. It only needs the license contract types to mint and verify tokens.

Proposed Solution

Extract a thin cameleer-license-api module containing only the pure license contract types:

  • LicenseInfo (record)
  • LicenseValidator
  • LicenseState / LicenseStateMachine
  • DefaultTierLimits

Then update dependencies:

cameleer-license-minter  → cameleer-license-api  (thin, no server internals)
cameleer-server-core     → cameleer-license-api
cameleer-saas            → cameleer-license-minter → cameleer-license-api

This keeps the minter fully independent from the server runtime, and the SaaS platform only pulls in the license contract — not server internals.

Context

This came up during the SaaS license minter integration (cameleer-saas commits e64bf4f..1066101). The current transitive dependency is not harmful (no conflicting beans — server auto-config won't trigger without server-specific properties), but it's architecturally wrong and will get worse as server-core grows.

## Problem `cameleer-license-minter` depends on `cameleer-server-core` for the shared license types (`LicenseInfo`, `LicenseValidator`, `LicenseState`, `DefaultTierLimits`). This means any consumer of the minter — including `cameleer-saas` — transitively pulls in `cameleer-server-core` and `cameleer-common` onto its classpath. ``` cameleer-saas └─ cameleer-license-minter └─ cameleer-server-core ← server internals on SaaS classpath └─ cameleer-common ``` The SaaS management plane should not carry server runtime types. It only needs the license contract types to mint and verify tokens. ## Proposed Solution Extract a thin `cameleer-license-api` module containing only the pure license contract types: - `LicenseInfo` (record) - `LicenseValidator` - `LicenseState` / `LicenseStateMachine` - `DefaultTierLimits` Then update dependencies: ``` cameleer-license-minter → cameleer-license-api (thin, no server internals) cameleer-server-core → cameleer-license-api cameleer-saas → cameleer-license-minter → cameleer-license-api ``` This keeps the minter fully independent from the server runtime, and the SaaS platform only pulls in the license contract — not server internals. ## Context This came up during the SaaS license minter integration (`cameleer-saas` commits `e64bf4f..1066101`). The current transitive dependency is not harmful (no conflicting beans — server auto-config won't trigger without server-specific properties), but it's architecturally wrong and will get worse as server-core grows.
Sign in to join this conversation.