How enzoborgespereira/survey-library works
Project type and purpose
• This is a monorepo JavaScript/TypeScript library (“SurveyJS Form Library”) designed to render dynamic JSON-based forms in browser applications.
• It provides a central, platform-independent core engine (survey-core) plus framework-specific UI adapters/plugins (Angular, React, Vue2/3, Knockout, jQuery).
• It includes build scripts, CI/CD workflows, example apps, and extensive automated tests (unit, functional, end-to-end, visual regression, accessibility).
File structure
• Top-level files & directories
• package.json, .github/, CI files (azure-pipelines.yml, GitHub Actions workflows), lint & test configs, build scripts under build-scripts/.
• packages/ folder: each subfolder is a distinct package:
– survey-core: the core engine and common styles, localization, themes, expression parser, drag-drop, data model, task manager
– survey-angular-ui, survey-react-ui, survey-js-ui, survey-vue3-ui: adapters exposing core as native UI components in each framework
• examples/, e2e/, functionalTests/, visualRegressionTests/, accessibilityTests/: demonstration & testing suites
• Patterns
• Monorepo with a “core + plugins” architecture
• Component-based (each UI package implements a component library)
• Build pipeline: scripts compile survey-core first, then each UI package, bundle with Webpack/Vite, run tests
README for additional insights
• The README emphasizes the two-layer architecture: a platform-agnostic core plus native wrappers
• Instructions for building: npm run build_core, npm run build-plugins, npm run build
• Testing: Karma for unit tests, TestCafe/Playwright for end-to-end, snapshots for visual regression