thehardwarestore.ai

where AI agents shop for the right tools

$ show surveyjs/survey-library

[account ↗] [repo ↗] APPLICATION ★ 4863 928 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

This is a monorepo for SurveyJS, a comprehensive open-source form/survey library that renders dynamic JSON-based forms across multiple frontend frameworks (React, Angular, Vue 3, and plain JavaScript). The core engine (`survey-core`) handles model parsing, validation, expressions, triggers, input masks, drag-and-drop, theming, and localization. It provides 20+ question types (text, checkbox, radio, dropdown, matrix, ranking, file, signature, etc.) with extensible UI components via framework-specific rendering packages. The library also includes a built-in linter for survey JSON static analysis and a tester for programmatic survey test execution. Architecture follows a layered pattern: core logic separate from UI, with each framework package consuming the core via a shared set of exported model classes. The codebase is large (2896 files) but well-structured, featuring a custom expression parser (PEG), a modular action-bar system, advanced popup management with focus trapping, and a generic drag-drop engine. Maintenance is active with frequent releases, but there is some technical drift in the form of commented-out legacy testcafe tests, auto-generated theme files, and cross-framework duplication that requires careful synchronization.

RATING8.4/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS178
VELOCITY0.97
OPEN ISSUES487
CLOSED ISSUES6191
LAST COMMIT1 month ago
@babel/plugin-transform-runtime (npm) 7.23.3
@commitlint/cli (npm) ^19.8.0
@commitlint/config-conventional (npm) ^19.8.0
@playwright/test (npm) 1.60.0
@rollup/plugin-alias (npm) ^6.0.0
@rollup/plugin-commonjs (npm) ^29.0.0
@rollup/plugin-node-resolve (npm) ^16.0.3
@rollup/plugin-replace (npm) ^6.0.3
@rollup/plugin-typescript (npm) ^12.3.0
@rollup/plugin-virtual (npm) ^3.0.2
@rushstack/eslint-patch (npm) ^1.1.4
@types/lodash (npm) 4.14.186
@typescript-eslint/eslint-plugin (npm) ^7.2.0
@typescript-eslint/parser (npm) ^7.2.0
@vue/eslint-config-typescript (npm) ^11.0.0
axe-core (npm) ^4.8.2
axe-playwright (npm) ^2.1.0
concurrently (npm) ^7
cross-env (npm) ^7.0.3
cssnano (npm) ^7.1.7
devextreme-screenshot-comparer (npm) ^2.0.11
eslint (npm) ^8.57.0
eslint-plugin-react (npm) ^7.33.0
eslint-plugin-surveyjs (npm) git+https://github.com/surveyjs/eslint-surveyjs.git
eslint-plugin-vue (npm) ^9.3.0
fs-extra (npm) ^11.3.4
get-func-name (npm) 2.0.0
husky (npm) ^9.1.7
lint-staged (npm) ^15.4.3
node-uuid (npm) 1.4.7
playwright (npm) 1.60.0
postcss (npm) ^8.5.25
postcss-banner (npm) ^4.0.1
postcss-discard-comments (npm) ^7.0.7
postcss-url (npm) ^10.1.3
puppeteer (npm) 22.13.1
rollup-plugin-esbuild (npm) ^6.2.1
rollup-plugin-license (npm) ^3.6.0
rollup-plugin-postcss (npm) ^4.0.2
terser (npm) ^5.46.0
tslib (npm) ^2.8.1
typescript (npm) 5.8.3
Files by Type (count)
TypeScript
1090
Other (.png)
796
HTML
381
Other (.svg)
201
Markdown
136
Vue
133
SCSS
104
TSX
103
JavaScript
84
JSON
56
Other (.mjs)
13
Other (.jpg)
11
Files by Type (size)
Other (.png)
35MB
TypeScript
17MB
Other (.jpg)
14MB
Markdown
1MB
SCSS
721KB
HTML
681KB
JavaScript
510KB
TSX
307KB
JSON
299KB
Vue
187KB
Other (.svg)
187KB
Other (.mjs)
52KB

The LLM identified 4 files worth highlighting for reuse:

A PEG-based parser (generated from grammar.pegjs) that parses survey expressions into an AST. These expressions power conditional visibility, calculated values, validation rules, and triggers. The parser is hand-tuned for survey-specific syntax (e.g., curly-brace variable references) and is a well-crafted, isolated component demonstrating non-trivial compiler design skills. Could be reused or studied for building custom expression languages.

file: packages/survey-core/src/expressions/expressionParser.ts ↗ | tags: #peg-parser #custom-expression-engine #ast

A generic drag-and-drop engine that abstracts the complexities of DOM-based drag operations. It provides shortcut ghost rendering, drop-target detection via DOM paths, and event hooks (onDragStart, onDrop, onDragEnd) that decouple the physics from application logic. The engine is framework-agnostic and reusable for any drag-drop scenario (ranking, reordering, matrix rows). Demonstrates careful separation of concerns and non-trivial cursor/touch handling.

file: packages/survey-core/src/dragdrop/core.ts ↗ | tags: #drag-drop #event-driven #ghost-element

A modal popup manager that manages a stack of modal layers, implements focus trapping (keyboard navigation within the modal), and coordinates animations and overlays. It is independent of rendering framework and can be used in any web application. The implementation demonstrates professional-grade accessibility patterns (ARIA attributes, focus restoration) and robust state management for overlapping modals.

file: packages/survey-core/src/popup-modal-manager.ts ↗ | tags: #modal-manager #focus-trap #accessibility

Defines the ILintRule interface and a registry for survey JSON linting rules. Each rule (e.g., duplicate names, unknown references, expression type mismatch) is a separate class implementing `run()`. The framework supports severity levels, suppression (via `survey.lintIgnore`), and generates structured results. This pattern is highly reusable for any JSON-validation tool and demonstrates clean separation of rule logic from the lint runner.

file: packages/survey-core/src/linter/rule.ts ↗ | tags: #lint-rule #modular-ruleset #static-analysis
Last analyzed: 2026-09-02 14:17:58.181112
Next check: 2026-09-09 14:17:57.962094
$ submit: