{"id":35689903,"url":"https://github.com/acontplus/acontplus-libs","last_synced_at":"2026-03-08T04:08:28.935Z","repository":{"id":296974022,"uuid":"814349295","full_name":"acontplus/acontplus-libs","owner":"acontplus","description":"Libs from acontplus sas","archived":false,"fork":false,"pushed_at":"2026-03-06T21:10:19.000Z","size":6377,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-07T00:55:21.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://acontplus.github.io/acontplus-libs/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acontplus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2024-06-12T20:49:59.000Z","updated_at":"2026-03-06T05:48:58.000Z","dependencies_parsed_at":"2026-01-05T17:00:13.128Z","dependency_job_id":null,"html_url":"https://github.com/acontplus/acontplus-libs","commit_stats":null,"previous_names":["acontplus-s-a-s/acontplus-libs","acontplus/acontplus-libs"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/acontplus/acontplus-libs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acontplus%2Facontplus-libs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acontplus%2Facontplus-libs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acontplus%2Facontplus-libs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acontplus%2Facontplus-libs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acontplus","download_url":"https://codeload.github.com/acontplus/acontplus-libs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acontplus%2Facontplus-libs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30244805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-05T23:00:32.727Z","updated_at":"2026-03-08T04:08:28.925Z","avatar_url":"https://github.com/acontplus.png","language":"TypeScript","funding_links":[],"categories":["Third Party Components"],"sub_categories":["Mixed Utilities"],"readme":"# Acontplus Libraries\n\nA comprehensive Nx monorepo containing Angular libraries providing Domain-Driven\nDesign (DDD) architecture, core utilities, and Angular Material UI components\nfor enterprise applications.\n\n## 📚 Libraries\n\n- **[core](packages/core/README.md)**: Core library with pricing calculations,\n  constants, environment configuration, domain models, and clean architecture\n  patterns\n- **[ng-auth](packages/ng-auth/README.md)**: Angular authentication module with\n  JWT token management, route guards, URL redirection, and session handling\n- **[ng-common](packages/ng-common/README.md)**: Common Angular services for\n  WhatsApp Cloud API, report generation, and printing with clean architecture\n  facades\n- **[ng-components](packages/ng-components/README.md)**: Angular Material UI\n  components including cards, tables, dialogs, theme toggle, and styling\n  utilities\n- **[ng-config](packages/ng-config/README.md)**: Angular configuration library\n  with environment tokens and app configuration services\n- **[ng-customer](packages/ng-customer/README.md)**: Customer management\n  components and services following clean architecture\n- **[ng-infrastructure](packages/ng-infrastructure/README.md)**: Angular\n  infrastructure with HTTP interceptors, repositories, adapters, and core\n  services\n- **[ng-notifications](packages/ng-notifications/README.md)**: Notification\n  system with toast notifications, alerts, and snackbars using ngx-toastr and\n  SweetAlert2\n- **[ui-kit](packages/ui-kit/README.md)**: UI kit library for reusable\n  components (under development)\n- **[utils](packages/utils/README.md)**: Shared utility functions for\n  converters, formatters, helpers, and validators\n\n## 📱 Applications\n\n- **[demo-app](apps/demo-app/)**: Demo application showcasing DDD architecture\n  patterns and library usage\n- **[demo-app-e2e](apps/demo-app-e2e/)**: End-to-end tests for the demo\n  application\n\n## 📖 Documentation\n\n- **[API Response Handling](docs/api-response-handling.md)** - DDD patterns for\n  standardized API response handling\n- **[Frontend Architecture Guide](docs/frontend-architecture-guide.md)** -\n  Architecture patterns and guidelines\n- **[Style Guide](docs/style-guide.md)** - Design principles and component\n  guidelines\n- **[Development Setup](docs/linting-and-formatting-setup.md)** - Code quality\n  tools and configuration\n- **[Workspace Setup](docs/workspace-setup.md)** - pnpm workspace configuration\n  and node_modules structure\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Node.js 18+\n- pnpm\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/acontplus/acontplus-libs.git\ncd acontplus-libs\n\n# Install dependencies\npnpm install\n\n# Start demo app\npnpm start\n```\n\n## 🏗️ **Enterprise Features**\n\n- **Clean Architecture**: Proper separation of concerns with distinct layers\n- **CQRS Pattern**: Command Query Responsibility Segregation implementation\n- **BaseRepository Pattern**: Generic, extensible data access layer with factory\n  pattern\n- **Use Case Pattern**: Business logic components with validation and\n  authorization\n- **Response Standardization**: Unified API response handling with interceptors\n- **Nx Monorepo**: Efficient build system with caching and dependency management\n- **Multi-Application Support**: Designed for sharing across multiple Angular\n  apps\n- **Modern Angular Practices**: Latest Angular patterns and best practices\n\n## 🎯 **Key Benefits**\n\n- **Consistent Architecture**: Same patterns across all applications\n- **Easy Configuration**: Environment-specific settings and runtime updates\n- **Scalable BaseRepository Management**: Centralized registration and dynamic\n  creation\n- **Better Testing**: Dependency injection for mocking and isolated components\n- **Developer Experience**: Clear patterns, consistent API design, better error\n  messages\n- **Fast Builds**: Nx caching and parallelization for efficient development\n- **Code Sharing**: Seamless sharing of libraries across applications\n\n## 🛠️ Development\n\n### Available Scripts\n\n- `pnpm start` - Start the demo application with SSL\n- `pnpm run build` - Build the demo application\n- `pnpm run watch` - Build demo app in watch mode\n- `pnpm run test` - Run tests for all projects\n- `pnpm run test:watch` - Run tests in watch mode\n- `pnpm run test:coverage` - Run tests with coverage\n- `pnpm run build:all` - Build all projects\n- `pnpm run build:libs` - Build all library packages\n- `pnpm run lint` - Lint all projects\n- `pnpm run lint:fix` - Lint and auto-fix issues\n- `pnpm run format` - Format all code with Prettier\n- `pnpm run format:check` - Check code formatting\n- `pnpm run clean` - Reset Nx cache\n- `pnpm run local-registry` - Start local npm registry for development\n- `pnpm run e2e` - Run end-to-end tests\n\n## � Publishing to npm\n\nThis project uses **manual publishing** due to npm's enhanced security requirements (2FA, security keys).\n\n### Publishing Workflow\n\n1. **Bump version** using the patch-version script:\n\n   ```bash\n   # For patch version (bug fixes)\n   .\\scripts\\patch-version.ps1 \u003cpackage-name\u003e\n\n   # For minor version (new features)\n   pnpm --filter @acontplus/\u003cpackage-name\u003e exec npm version minor\n\n   # For major version (breaking changes)\n   pnpm --filter @acontplus/\u003cpackage-name\u003e exec npm version major\n   ```\n\n2. **Build the package**:\n\n   ```bash\n   pnpm nx build \u003cpackage-name\u003e --configuration=production\n   ```\n\n3. **Publish with web authentication**:\n\n   ```bash\n   cd dist/packages/\u003cpackage-name\u003e\n   npm publish --access=public\n   ```\n\n   This opens your browser for authentication with security keys (Windows Hello, hardware keys, or TOTP).\n\n### Example: Publishing ng-auth\n\n```bash\n# 1. Bump version (minor for new features)\npnpm --filter @acontplus/ng-auth exec npm version minor\n\n# 2. Build for production\npnpm nx build ng-auth --configuration=production\n\n# 3. Publish to npm\ncd dist/packages/ng-auth\nnpm publish --access=public\ncd ../../..\n```\n\n### Version Management\n\nUse the patch version script to bump package versions and update dependencies:\n\n```bash\n# Interactive mode - prompts for package selection\n.\\scripts\\patch-version.ps1\n\n# Direct mode - specify package name\n.\\scripts\\patch-version.ps1 -PackageName \"@acontplus/utils\"\n.\\scripts\\patch-version.ps1 -PackageName \"core\"\n```\n\nThe script will:\n\n1. Show all available packages with current versions\n2. Prompt for package selection and confirmation\n3. Patch the version using `npm version patch` (e.g., 1.0.11 → 1.0.12)\n4. Automatically update all dependencies across the workspace\n5. Run `pnpm install` to update the lock file\n6. Display a summary of changes\n\n### Nx Commands\n\n```bash\n# Build specific project\npnpm exec nx build core\npnpm exec nx build ng-components\n\n# Test specific project\npnpm exec nx test core\npnpm exec nx test ng-components\n\n# Lint specific project\npnpm exec nx lint core\n\n# Show project graph\npnpm exec nx show projects\n\n# Show dependency graph\npnpm exec nx graph\n```\n\n## 🔧 Nx Development Guide\n\n### Monorepo Structure\n\nThis workspace is an Nx monorepo containing Angular libraries and applications:\n\n- **Libraries**: `core`, `ng-auth`, `ng-components`, `ng-config`, `ng-customer`,\n  `ng-infrastructure`, `ng-notifications`, `ui-kit`, `utils`\n- **Applications**: `demo-app`, `demo-app-e2e`\n\n### Project Dependencies\n\nAlways build dependencies before dependents:\n\n1. `core` - Base utilities, no dependencies\n2. `utils` - Shared utilities, may depend on core\n3. `ng-config` - Configuration services, depends on core\n4. `ng-infrastructure` - Infrastructure services, depends on ng-config and core\n5. `ng-auth` - Authentication module, depends on ng-infrastructure, ng-config,\n   and core\n6. `ng-components` - UI components, depends on core\n7. `ng-customer` - Customer management, depends on ng-components, ng-auth,\n   ng-notifications, and core\n8. `ng-notifications` - Notification components, no dependencies\n9. `ui-kit` - Additional UI components (under development)\n10. `demo-app` - Demo application, depends on all libraries\n\n### Development Best Practices\n\n#### 1. Use Nx Commands\n\nAlways use `pnpm exec nx` commands instead of direct tool execution for\nconsistency and caching.\n\n#### 2. Leverage Affected Commands\n\nUse `pnpm exec nx affected:*` commands to only run operations on projects\naffected by your changes:\n\n```bash\npnpm exec nx affected:build\npnpm exec nx affected:test\npnpm exec nx affected:lint\n```\n\n#### 3. Cache Management\n\nNx automatically caches build and test results. Clear cache when needed:\n\n```bash\nppnpm run clean  # Resets Nx cache\n```\n\n#### 4. Local Registry for Development\n\nFor testing library changes in applications:\n\n```bash\n# Start local npm registry\nppnpm run local-registry\n\n# Build and publish libraries locally\npnpm exec nx release --local\n\n# Use local versions in applications\n```\n\n#### 5. Code Generation\n\nUse Nx generators for consistent project structure:\n\n```bash\n# Generate new library\npnpm exec nx g @nx/angular:library my-lib\n\n# Generate component in specific library\npnpm exec nx g @nx/angular:component my-component --project=ng-components\n```\n\n### Nx Configuration\n\n#### nx.json\n\n- **targetDefaults**: Shared configuration for build, test, lint targets\n- **namedInputs**: Defines what files trigger rebuilds\n- **generators**: Custom generator configurations\n- **release**: Publishing configuration\n\n#### Key Benefits\n\n1. **Fast Builds**: Nx caching reduces build times significantly\n2. **Affected Commands**: Only run operations on changed projects\n3. **Dependency Graph**: Visual understanding of project relationships\n4. **Code Generation**: Consistent project structure with generators\n5. **Scalability**: Efficient handling of large monorepos\n6. **Developer Experience**: Rich tooling and automation\n\n### Troubleshooting\n\n#### Build Issues\n\n- Ensure dependencies are built first\n- Check `pnpm exec nx graph` for dependency relationships\n- Use `pnpm exec nx reset` to clear cache\n\n#### Test Issues\n\n- Run tests individually: `pnpm exec nx test \u003cproject\u003e`\n- Check test configuration in `project.json`\n- Ensure proper imports in test setup\n\n#### Import Issues\n\n- Use path mappings defined in `tsconfig.base.json`\n- Libraries are available as `@acontplus/\u003clib-name\u003e`\n- Check package.json exports in each library\n\n### Migration from npm Workspaces\n\nThis workspace was migrated from npm workspaces to Nx monorepo:\n\n- **Before**: Manual dependency management with npm workspaces\n- **After**: Automated dependency management with Nx\n- **Benefits**: Better caching, affected commands, visual tools\n- **Commands**: Updated to use `pnpm exec nx` instead of npm scripts\n\n### Code Quality Tools\n\n#### ESLint Configuration\n\n- **Global Rules**: Applied to all TypeScript and HTML files\n- **Angular Specific**: Enforces Angular best practices and naming conventions\n- **TypeScript Rules**: Type safety and code quality rules\n- **Formatting Rules**: Consistent code style across the project\n- **Accessibility Rules**: HTML template accessibility checks\n\n#### Prettier Configuration\n\n- **Consistent Formatting**: 2-space indentation, single quotes, trailing commas\n- **File-specific Rules**: Different settings for JSON, Markdown, and YAML files\n- **Project-level Configs**: Each project can have its own Prettier settings\n\n#### EditorConfig\n\n- **Cross-editor Consistency**: Ensures consistent coding style regardless of\n  editor\n- **File-type Specific**: Different rules for TypeScript, HTML, CSS, JSON, etc.\n- **Line Ending Management**: Consistent line endings across platforms\n\n### Code Style Guidelines\n\n#### Component Selectors\n\n- **core, ng-components, ng-customer, ng-notifications**: `acp` prefix\n- **demo-app**: `app` prefix\n\n#### Naming Conventions\n\n- **Components**: kebab-case (e.g., `dynamic-card`)\n- **Directives**: camelCase (e.g., `toUpperCase`)\n- **Services**: camelCase (e.g., `correlationService`)\n- **Models**: camelCase (e.g., `apiResponseModel`)\n\n#### Import Organization\n\n- Angular imports first\n- Third-party libraries\n- Internal library imports\n- Relative imports last\n\n## 📁 Project Structure\n\n```\nacontplus-libs/\n├── apps/\n│   ├── demo-app/               # Demo application\n│   │   ├── src/\n│   │   │   ├── app/            # Application code\n│   │   │   ├── assets/         # Static assets\n│   │   │   ├── environments/   # Environment configurations\n│   │   │   └── index.html\n│   │   ├── project.json        # Nx project configuration\n│   │   └── tsconfig.json\n│   └── demo-app-e2e/           # E2E tests\n│       ├── src/\n│       └── project.json\n├── packages/\n│   ├── core/                   # Core utilities library\n│   │   ├── src/lib/\n│   │   │   ├── environments/   # Environment configuration\n│   │   │   ├── interceptors/   # HTTP interceptors\n│   │   │   ├── models/         # Data models and interfaces\n│   │   │   ├── repositories/   # BaseRepository pattern implementation\n│   │   │   ├── services/       # Core services\n│   │   │   ├── use-cases/      # Use case pattern implementation\n│   │   │   └── utils/          # Utility functions\n│   │   ├── project.json        # Nx project configuration\n│   │   └── README.md           # Core library documentation\n│   ├── ng-components/          # UI components library\n│   │   ├── src/lib/\n│   │   │   ├── components/     # UI components\n│   │   │   ├── services/       # UI-related services\n│   │   │   ├── models/         # UI component models\n│   │   │   └── styles/         # Component styles and themes\n│   │   ├── project.json\n│   │   └── README.md           # UI components documentation\n│   ├── ng-config/                # Core Angular services\n│   ├── ng-auth/                 # Authentication services\n│   ├── ng-infrastructure/       # Infrastructure services\n│   ├── ng-customer/            # Customer management\n│   ├── ng-notifications/       # Notifications system\n│   ├── ui-kit/                 # Additional UI components\n│   └── utils/                  # Shared utilities\n├── docs/                       # Comprehensive documentation\n│   ├── api-response-handling.md\n│   ├── frontend-architecture-guide.md\n│   ├── linting-and-formatting-setup.md\n│   └── style-guide.md\n├── nx.json                     # Nx workspace configuration\n├── package.json                # Root dependencies and scripts\n├── tsconfig.base.json          # Base TypeScript configuration\n└── jest.config.js              # Jest testing configuration\n```\n\n## 🔧 Configuration Files\n\n### Nx (nx.json)\n\n- **Target Defaults**: Shared configuration for build, test, and lint targets\n- **Named Inputs**: Defines what files affect different operations\n- **Cache Settings**: Optimizes build performance\n- **Release Configuration**: Automated publishing setup\n\n### Jest (jest.config.js)\n\n- Angular testing with jest-preset-angular\n- JSDOM environment for component testing\n- Module name mapping for library imports\n- Coverage reporting configuration\n- TypeScript support via ts-jest\n\n### ESLint (eslint.config.js)\n\n- Enforces Angular best practices\n- TypeScript-specific rules\n- Template accessibility checks\n- Consistent code formatting\n\n### Prettier (.prettierrc)\n\n- 2-space indentation\n- Single quotes preferred\n- 100 character line length\n- Trailing commas on multiline\n\n### EditorConfig (.editorconfig)\n\n- UTF-8 encoding\n- LF line endings\n- 2-space indentation\n- File-type specific rules\n\n## 🧪 Testing\n\nThis project uses **Jest** as the test runner for fast, reliable testing with\nexcellent Angular support.\n\n### Running Tests\n\n```bash\n# Run all tests\npnpm run test\n\n# Run tests in watch mode (automatically re-runs on file changes)\npnpm run test:watch\n\n# Run tests with coverage report\npnpm run test:coverage\n\n# Run tests for specific project\npnpm exec nx test core\npnpm exec nx test ng-components\n```\n\n### Jest Configuration\n\n- **Configuration**: `jest.config.js` - Main Jest configuration\n- **Setup**: `setup-jest.ts` - Jest setup and mocks\n- **TypeScript**: `tsconfig.spec.json` - TypeScript configuration for tests\n- **Environment**: Uses `jsdom` environment for Angular component testing\n- **Module Resolution**: Configured to resolve library imports\n\n### Test File Patterns\n\nJest automatically discovers test files matching these patterns:\n\n- `**/__tests__/**/*.ts`\n- `**/?(*.)+(spec|test).ts`\n\n### Coverage Reports\n\nCoverage reports are generated in the `coverage/` directory with:\n\n- **Text summary** in terminal\n- **HTML report** for detailed coverage analysis\n- **LCOV format** for CI/CD integration\n\n## 📦 Building and Publishing\n\n```bash\n# Build all libraries\npnpm run build:libs\n\n# Build specific library\npnpm exec nx build core\npnpm exec nx build ng-components\n\n# Build demo app\npnpm run build\n\n# Start local registry for development\npnpm run local-registry\n\n# Publish libraries (handled by Nx release)\npnpm exec nx release\n```\n\n## 📚 **Documentation**\n\nComprehensive documentation is available across the project:\n\n- **[API Response Handling](docs/api-response-handling.md)** - DDD patterns for\n  API handling\n- **[Frontend Architecture Guide](docs/frontend-architecture-guide.md)** -\n  Architecture patterns and guidelines\n- **[Style Guide](docs/style-guide.md)** - Design system guidelines\n- **[Development Setup](docs/linting-and-formatting-setup.md)** - Code quality\n  tools\n- **[Core Library Guide](packages/core/README.md)** - Complete core library\n  documentation\n- **[UI Components Guide](packages/ng-components/README.md)** - Complete UI\n  components documentation\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Run linting and formatting: `pnpm run lint:all`\n5. Fix any issues: `pnpm run lint:fix` and `pnpm run format`\n6. Run tests: `pnpm run test`\n7. Submit a pull request\n\n### Development Workflow\n\n```bash\n# 1. Make code changes\n# 2. Check formatting\npnpm run format:check\n\n# 3. Format code if needed\npnpm run format\n\n# 4. Check linting\npnpm run lint\n\n# 5. Fix auto-fixable issues\npnpm run lint:fix\n\n# 6. Run tests\npnpm run test\n\n# 7. Build affected projects\npnpm exec nx affected:build\n\n# 8. Run affected tests\npnpm exec nx affected:test\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file\nfor details.\n\n## 🆘 Support\n\n- **Issues**:\n  [GitHub Issues](https://github.com/acontplus/acontplus-libs/issues)\n- **Documentation**: See links in the Documentation section above\n- **Contact**: [Ivan Paz](https://github.com/iferpaz7)\n\n## 🔄 Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for a detailed history of changes and\nimprovements.\n\n## 🏆 **Architecture Assessment**\n\n**Current Status**: Enterprise-grade Nx monorepo solution\n\nThe library now represents a **state-of-the-art, enterprise-ready foundation**\nthat follows modern Angular development patterns with Nx monorepo management.\nIt's perfectly suited for multiple Angular applications and provides an\nexcellent base for building scalable, maintainable applications with efficient\nbuild caching and code sharing.\n\n**This is exactly the kind of foundation you want for a multi-application\nAngular ecosystem.** 🚀\n\n- **Multi-Application Support**: Designed for sharing across multiple Angular\n  apps\n- **Modern Angular Practices**: Latest Angular patterns and best practices\n\n## 🎯 **Key Benefits**\n\n- **Consistent Architecture**: Same patterns across all applications\n- **Easy Configuration**: Environment-specific settings and runtime updates\n- **Scalable BaseRepository Management**: Centralized registration and dynamic\n  creation\n- **Better Testing**: Dependency injection for mocking and isolated components\n- **Developer Experience**: Clear patterns, consistent API design, better error\n  messages\n\n## 🛠️ Development\n\n### Available Scripts\n\n#### Root Level\n\n- `pnpm run build` - Build all projects\n- `pnpm run build-library` - Build core and UI component libraries\n- `pnpm run test` - Run Jest tests for all projects\n- `pnpm run test:watch` - Run Jest tests in watch mode\n- `pnpm run test:coverage` - Run Jest tests with coverage report\n- `pnpm run lint` - Lint all projects\n- `pnpm run lint:fix` - Lint and auto-fix issues\n- `pnpm run format` - Format all code with Prettier\n- `pnpm run format:check` - Check code formatting\n- `pnpm run format:fix` - Format code (alias for format)\n- `pnpm run lint:all` - Run both linting and format checking\n\n#### Individual Projects\n\nEach project has its own format scripts:\n\n- `pnpm run format` - Format project code\n- `pnpm run format:check` - Check project formatting\n- `pnpm run format:fix` - Format project code (alias)\n\n### Code Quality Tools\n\n#### ESLint Configuration\n\n- **Global Rules**: Applied to all TypeScript and HTML files\n- **Angular Specific**: Enforces Angular best practices and naming conventions\n- **TypeScript Rules**: Type safety and code quality rules\n- **Formatting Rules**: Consistent code style across the project\n- **Accessibility Rules**: HTML template accessibility checks\n\n#### Prettier Configuration\n\n- **Consistent Formatting**: 2-space indentation, single quotes, trailing commas\n- **File-specific Rules**: Different settings for JSON, Markdown, and YAML files\n- **Project-level Configs**: Each project can have its own Prettier settings\n\n#### EditorConfig\n\n- **Cross-editor Consistency**: Ensures consistent coding style regardless of\n  editor\n- **File-type Specific**: Different rules for TypeScript, HTML, CSS, JSON, etc.\n- **Line Ending Management**: Consistent line endings across platforms\n\n### Code Style Guidelines\n\n#### Component Selectors\n\n- **acontplus-core**: `acp` prefix\n- **acontplus-ui-components**: `acp` prefix\n- **test-app**: `app` prefix\n\n#### Naming Conventions\n\n- **Components**: kebab-case (e.g., `dynamic-card`)\n- **Directives**: camelCase (e.g., `toUpperCase`)\n- **Services**: camelCase (e.g., `correlationService`)\n- **Models**: camelCase (e.g., `apiResponseModel`)\n\n#### Import Organization\n\n- Angular imports first\n- Third-party libraries\n- Internal library imports\n- Relative imports last\n\n## 📁 Project Structure\n\n```\nacontplus-libs/\n├── apps/\n│   ├── demo-app/               # Demo application\n│   │   ├── src/\n│   │   │   ├── app/            # Application code\n│   │   │   ├── assets/         # Static assets\n│   │   │   ├── environments/   # Environment configurations\n│   │   │   └── index.html\n│   │   ├── project.json        # Nx project configuration\n│   │   └── tsconfig.json\n│   └── demo-app-e2e/           # E2E tests\n│       ├── src/\n│       └── project.json\n├── packages/\n│   ├── core/                   # Core utilities library\n│   │   ├── src/lib/\n│   │   │   ├── environments/   # Environment configuration\n│   │   │   ├── interceptors/   # HTTP interceptors\n│   │   │   ├── models/         # Data models and interfaces\n│   │   │   ├── repositories/   # BaseRepository pattern implementation\n│   │   │   ├── services/       # Core services\n│   │   │   ├── use-cases/      # Use case pattern implementation\n│   │   │   └── utils/          # Utility functions\n│   │   ├── project.json        # Nx project configuration\n│   │   └── README.md           # Core library documentation\n│   ├── ng-components/          # UI components library\n│   │   ├── src/lib/\n│   │   │   ├── components/     # UI components\n│   │   │   ├── services/       # UI-related services\n│   │   │   ├── models/         # UI component models\n│   │   │   └── styles/         # Component styles and themes\n│   │   ├── project.json\n│   │   └── README.md           # UI components documentation\n│   ├── ng-config/              # Configuration services\n│   ├── ng-auth/                # Authentication services\n│   ├── ng-infrastructure/      # Infrastructure services\n│   ├── ng-customer/            # Customer management\n│   ├── ng-notifications/       # Notifications system\n│   ├── ui-kit/                 # Additional UI components\n│   └── utils/                  # Shared utilities\n├── docs/                       # Comprehensive documentation\n│   ├── api-response-handling.md\n│   ├── frontend-architecture-guide.md\n│   ├── linting-and-formatting-setup.md\n│   └── style-guide.md\n├── nx.json                     # Nx workspace configuration\n├── package.json                # Root dependencies and scripts\n├── tsconfig.base.json          # Base TypeScript configuration\n└── jest.config.js              # Jest testing configuration\n```\n\n## 🔧 Configuration Files\n\n### Nx (nx.json)\n\n- **Target Defaults**: Shared configuration for build, test, and lint targets\n- **Named Inputs**: Defines what files affect different operations\n- **Cache Settings**: Optimizes build performance\n- **Release Configuration**: Automated publishing setup\n\n### Jest (jest.config.js)\n\n- Angular testing with jest-preset-angular\n- JSDOM environment for component testing\n- Module name mapping for library imports\n- Coverage reporting configuration\n- TypeScript support via ts-jest\n\n### ESLint (eslint.config.js)\n\n- Enforces Angular best practices\n- TypeScript-specific rules\n- Template accessibility checks\n- Consistent code formatting\n\n### Prettier (.prettierrc)\n\n- 2-space indentation\n- Single quotes preferred\n- 100 character line length\n- Trailing commas on multiline\n\n### EditorConfig (.editorconfig)\n\n- UTF-8 encoding\n- LF line endings\n- 2-space indentation\n- File-type specific rules\n\n## 🧪 Testing\n\nThis project uses **Jest** as the test runner for fast, reliable testing with\nexcellent Angular support.\n\n### Running Tests\n\n```bash\n# Run all tests\npnpm run test\n\n# Run tests in watch mode (automatically re-runs on file changes)\npnpm run test:watch\n\n# Run tests with coverage report\npnpm run test:coverage\n\n# Run tests for specific project\npnpm exec nx test core\npnpm exec nx test ng-components\n```\n\n### Jest Configuration\n\n- **Configuration**: `jest.config.js` - Main Jest configuration\n- **Setup**: `setup-jest.ts` - Jest setup and mocks\n- **TypeScript**: `tsconfig.spec.json` - TypeScript configuration for tests\n- **Environment**: Uses `jsdom` environment for Angular component testing\n- **Module Resolution**: Configured to resolve library imports\n\n### Test File Patterns\n\nJest automatically discovers test files matching these patterns:\n\n- `**/__tests__/**/*.ts`\n- `**/?(*.)+(spec|test).ts`\n\n### Coverage Reports\n\nCoverage reports are generated in the `coverage/` directory with:\n\n- **Text summary** in terminal\n- **HTML report** for detailed coverage analysis\n- **LCOV format** for CI/CD integration\n\n## 📦 Building and Publishing\n\n```bash\n# Build all libraries\npnpm run build:libs\n\n# Build specific library\npnpm exec nx build core\npnpm exec nx build ng-components\n\n# Build demo app\npnpm run build\n\n# Start local registry for development\npnpm run local-registry\n\n# Publish libraries (handled by Nx release)\npnpm exec nx release\n```\n\n## 📚 **Documentation**\n\nComprehensive documentation is available across the project:\n\n- **[API Response Handling](docs/api-response-handling.md)** - DDD patterns for\n  API handling\n- **[Frontend Architecture Guide](docs/frontend-architecture-guide.md)** -\n  Architecture patterns and guidelines\n- **[Style Guide](docs/style-guide.md)** - Design system guidelines\n- **[Development Setup](docs/linting-and-formatting-setup.md)** - Code quality\n  tools\n- **[Core Library Guide](packages/core/README.md)** - Complete core library\n  documentation\n- **[UI Components Guide](packages/ng-components/README.md)** - Complete UI\n  components documentation\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Run linting and formatting: `pnpm run lint:all`\n5. Fix any issues: `pnpm run lint:fix` and `pnpm run format`\n6. Run tests: `pnpm run test`\n7. Submit a pull request\n\n### Development Workflow\n\n```bash\n# 1. Make code changes\n# 2. Check formatting\npnpm run format:check\n\n# 3. Format code if needed\npnpm run format\n\n# 4. Check linting\npnpm run lint\n\n# 5. Fix auto-fixable issues\npnpm run lint:fix\n\n# 6. Run tests\npnpm run test\n\n# 7. Build affected projects\npnpm exec nx affected:build\n\n# 8. Run affected tests\npnpm exec nx affected:test\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file\nfor details.\n\n## 🆘 Support\n\n- **Issues**:\n  [GitHub Issues](https://github.com/acontplus/acontplus-libs/issues)\n- **Documentation**: See links in the Documentation section above\n- **Contact**: [Ivan Paz](https://github.com/iferpaz7)\n\n## 🔄 Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for a detailed history of changes and\nimprovements.\n\n## 🏆 **Architecture Assessment**\n\n**Current Status**: Enterprise-grade Nx monorepo solution\n\nThe library now represents a **state-of-the-art, enterprise-ready foundation**\nthat follows modern Angular development patterns with Nx monorepo management.\nIt's perfectly suited for multiple Angular applications and provides an\nexcellent base for building scalable, maintainable applications with efficient\nbuild caching and code sharing.\n\n**This is exactly the kind of foundation you want for a multi-application\nAngular ecosystem.** 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facontplus%2Facontplus-libs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facontplus%2Facontplus-libs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facontplus%2Facontplus-libs/lists"}