empower-elite-core-domain
v0.1.0
Published
Core ABA domain types and tenant-agnostic user/org/role contracts for Empower + Elite
Maintainers
Readme
@ee/core-domain
Core ABA domain types and tenant-agnostic user/org/role contracts for Empower + Elite.
Overview
Pure TypeScript business logic, types, utilities, and validation schemas with no React dependencies. This is the foundation layer that all other packages depend on.
Installation
npm install @ee/core-domainUsage (Tenant Side)
import { CoreDomainAdapter, CoreUser } from '@ee/core-domain/adapters';
// Implement the adapter in your tenant repo
const myAdapter: CoreDomainAdapter = {
normalizeRoleKey: (raw) => raw ?? 'staff',
mapUser: (record) => ({ id: record.id, displayName: record.name, roleKey: record.role }),
mapOrganization: (record) => ({ id: record.id, name: record.name, slug: record.slug }),
mapUserRole: (record) => ({ id: record.key, name: record.label }),
};Exports
- Types:
CoreUser,CoreOrganization,CoreRole - Constants: Role definitions, status enums, CPT codes, tax rates
- Adapters:
CoreDomainAdapterinterface
PHI Boundary
This package does NOT handle PHI (no DOB, SSN, addresses, diagnoses).
License
UNLICENSED - Private package
