@fengsoft/saas-core
v0.2.0
Published
`@fengsoft/saas-core` is the domain layer for multi-tenant SaaS products.
Maintainers
Readme
@fengsoft/saas-core
@fengsoft/saas-core is the domain layer for multi-tenant SaaS products.
It owns workspace lifecycle, membership and invite rules, billing transitions, plan entitlements, quota policy, and the infrastructure ports around those flows. It does not implement auth, UI, provider SDK glue, or a production database adapter by itself.
Install
pnpm add @fengsoft/saas-coreWhat The Package Contains
WorkspaceService,MembershipService,InviteService,BillingService,EntitlementService, andUsageService- domain types for workspaces, members, invites, subscriptions, quotas, and usage snapshots
- public ports for billing providers, audit, notification, queue, cache, and event publication
- in-memory stores for tests and local composition
Start Here
- Package docs landing page: https://github.com/fengsoft/saas-core/blob/main/docs/README.md
- Adoption guide: https://github.com/fengsoft/saas-core/blob/main/docs/guides/adopt-saas-core-in-an-app.md
- Service API reference: https://github.com/fengsoft/saas-core/blob/main/docs/reference/service-apis.md
- Port and store contracts: https://github.com/fengsoft/saas-core/blob/main/docs/reference/ports-and-store-contracts.md
- Verification and release flow: https://github.com/fengsoft/saas-core/blob/main/docs/operations/verification-and-release.md
Package Boundary
saas-core owns:
- domain state transitions
- aggregate invariants
- side-effect port contracts
- plan and quota policy evaluation
Keep these outside saas-core:
- auth and session resolution
- HTTP handlers and transport validation
- billing provider SDK wiring
- queue workers and delivery orchestration
- production persistence adapters
Contributor Verification
Inside the repository:
pnpm check
pnpm verify:dockerLicense
Apache-2.0
