# Community Features Package Community features domain (scope-based feature toggles per instance) extracted from monolith. Imported as `@humand-packages/community-features`. ## Structure Hexagonal layout: - `business/` — ports, domain models, services, enums, types - `infrastructure/` — adapters, interfaces, mappers, tokens - No presentation layer (no controllers/routers) Main exports via `src/index.ts` (barrel). ## Conventions Match monolith naming: Port suffix for ports, Adapter for adapters, Service for services, PascalCase for models. See monolith AGENTS.md for full conventions. ## Key commands - `pnpm nx run community-features:build` — build the package - `pnpm nx run community-features:lint` — lint - `pnpm nx run community-features:test` — unit tests (Jest, from package root) Tsconfig covers the whole project (src + test, `baseUrl: "."`). Build uses `tsconfig.build.json` (src only). Unit tests live in `test/`; import from `src/...` (Jest resolves via `moduleNameMapper` in jest.config.ts). Jest uses `tsconfig.jest.json` with `outDir: "./test/build"`. ## Guidelines - Depend only on `@humand-packages/common` (and other extracted packages as needed). Do not import from monolith. - When changing this package, run monolith build and tests that depend on it (`pnpm nx run monolith:build`, `pnpm nx run monolith:test-all` or affected tests). - If a community feature code needs to be referenced in code, add the string constant to `src/business/constants/` in this package, not to the monolith.