How sgarg5858/dynamic-forms-poc works
Project type and purpose
• This is an Nx-powered Angular monorepo containing:
• A “shell” Angular application (apps/shell) that demonstrates a dynamic form proof-of-concept.
• Several publishable Angular libraries under libs/ (dynamic-forms, input-errors, personal-details, infrastructure/interfaces).
• An end-to-end test project (apps/shell-e2e).
• The goal is to build a highly extensible, component-driven dynamic form system, factoring out each control type into its own library module, with shared interfaces and configurable error handling.
File structure
• Top-level configs: angular.json, nx.json, tsconfig.base.json—govern workspace layout, build targets, TypeScript resolution.
• apps/shell: the host Angular application that imports and renders dynamic forms using the libraries.
• apps/shell-e2e: Cypress tests for the shell app.
• libs/dynamic-forms: core dynamic form engine (components, resolver service, pipes, tokens).
• libs/input-errors: library handling error-state matching, directives, error components.
• libs/personal-details: example feature library built on top of dynamic-forms (a form for personal details).
• libs/infrastructure/interfaces: shared TypeScript interfaces (DynamicControlConfig, DynamicFormConfig).
• tools/generators: (empty here) potential Nx code generators for scaffolding.
README for additional insights
• It walks through POC “bits” (basic approach, adding form-group support, error handling enhancements).
• Emphasizes SOLID principles, dynamic component resolution via ngComponentOutlet, ViewProviders for ControlContainer, and Configurable ErrorStateMatcher.
• Confirms the tech stack: Angular + Nx + Jest + Cypress.
Detailed capture of essential elements
• Nx workspace as the outer container.
• Libs by domain: Core (dynamic-forms, interfaces), Feature (personal-details), Utility (input-errors).
• Injection of ControlContainer and the configurable ErrorStateMatcher pipeline.
• E2E test runner invoking the shell app on localhost, driving UI through Cypress.