Skip to content
CAI
Software that uses CAICheck a score

Next2D/framework

60.1

Adequate · 21 September 2026

2.2k

lines of production code

TypeScript

with JavaScript

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is the Next2D Framework, a TypeScript-based application structure designed to manage scene navigation, view lifecycle, and data fetching within a Single Page Application context. It provides a clean architecture that handles routing, HTTP request execution with caching, and dynamic asset generation for media content. The framework exposes a structured API for initializing applications, binding views to view models, and managing global state and configuration.

How it got here

2021–2023 — TypeScript framework scaffolding

12 changes.

This period established the foundational structure of the Next2D Framework by migrating to a TypeScript-based development environment with Vite and Vitest. It introduced a clean architecture featuring Application, View, and ViewModel classes, alongside infrastructure services for data handling and caching. The work also included setting up build scripts, type definitions, and comprehensive testing to support the new modular design.

2025 — Core application architecture and interface definition

5 changes.

This period focused on establishing the foundational architecture of the application by defining strict TypeScript interfaces for configuration, routing, and request handling. It introduced core application lifecycle use cases and domain services to manage view navigation, screen transitions, and loading states. Additionally, new services for URL parsing and routing were implemented alongside comprehensive unit tests to ensure robust validation of the new logic.

Features

Added View and ViewModel base classes with lifecycle support

Introduced abstract base classes for the View-Model pattern in the view layer. The new \ViewModel\ class provides an abstract \initialize\ lifecycle method, while the \View\ class extends \Sprite\ and requires a \ViewModel\ instance, exposing abstract \initialize\, \onEnter\, and \onExit\ lifecycle methods to manage view state transitions. Comprehensive test suites were added for both classes to verify instantiation, method existence, lifecycle execution order, and extensibility.

src/view · high confidence

Added query string and routing request parsing services with tests

New services have been introduced in the application layer to handle URL parsing and routing data extraction. The QueryStringParserService now parses URL query parameters and determines the current route name, handling private routes and redirects based on configuration. The RoutingRequestsParserService retrieves and processes request definitions from the routing configuration, supporting cluster merging to combine multiple request sources. Comprehensive unit tests have been added for both services to verify correct parsing behavior, including edge cases for private routes, redirects, and cluster request aggregation.

src/application/service · high confidence

Added utility functions for normalizing HTTP methods and converting strings to CamelCase

New utility functions have been added to the shared module: \normalizeHttpMethod\ standardizes HTTP method strings to uppercase (defaulting to GET for undefined, empty, or unknown methods), and \toCamelCase\ converts strings with hyphens, slashes, or underscores into CamelCase format. Unit tests have been added for both utilities to verify their behavior.

src/shared · high confidence

Adds TypeScript type definitions for the global Next2D API

A new type declaration file (@types/window.d.ts) has been added to define the global \next2d\ variable and extend the \Window\ interface with the \Next2D\ type from the \@next2d/core\ package. This enables TypeScript projects to correctly recognize and type-check the global Next2D runtime API without needing explicit imports in every file.

@types · high confidence

Initial project scaffolding and development environment setup

This change establishes the foundational structure for the Next2D Framework repository. It introduces a TypeScript-based development environment configured with Vite and Vitest for testing, including a JSDOM environment setup with OffscreenCanvas mocking. The project adopts a clean architecture directory structure (application, domain, infrastructure, interface, view) and enforces code quality through a new ESLint configuration. Documentation is added via README, DEVELOP, and SECURITY guides, alongside standard repository files like .gitignore and .gitattributes.

(repo-wide) · high confidence

Introduction of Application and Context classes for scene management

The application layer now includes an \Application\ class to manage initialization, runtime execution, and view navigation (including SPA-style transitions), and a \Context\ class to track the current View and ViewModel within the main scene. These components replace previous ad-hoc handling with a structured approach for controlling scene transitions and maintaining state, supported by new unit tests for the \Application\ class.

src/application · high confidence

Introduction of TypeScript DTOs and Repository Mapping Infrastructure

This change introduces the core TypeScript data structures and mapping logic for the infrastructure layer. It adds a generic \ResponseDTO\ class to standardize external data conversion and response handling, including support for optional callback identifiers. Additionally, it establishes a \repositoryMap\ that associates request types (json, content, custom) with their respective repository execution functions, alongside a global \response\ map to manage state. Tests have been added to verify the \ResponseDTO\ construction and property assignment.

src/infrastructure/dto · high confidence

New TypeScript repository and caching services

Added TypeScript implementations for Content, Custom, and JSON repositories, along with RequestCacheCheckService and RequestResponseProcessService. These components handle asynchronous data fetching (via Loader, fetch, or custom packages), enforce required request fields, support HTTP method normalization, headers, and bodies, and provide optional response caching. Comprehensive unit tests were added for all new files to verify validation, caching behavior, and request processing.

src/infrastructure/repository · high confidence

New TypeScript use cases for request execution and response cleanup

Added TypeScript implementations for \RequestUseCase\ and \ResponseRemoveVariableUseCase\ in the infrastructure layer. \RequestUseCase\ parses routing configurations to execute specified request types in parallel and returns the results, while \ResponseRemoveVariableUseCase\ cleans up in-memory response data and associated loader info symbols, respecting cache settings to preserve necessary state. Both modules include corresponding test suites verifying their behavior with mocked repositories and configuration states.

src/infrastructure/usecase · high confidence

New application lifecycle use cases and domain services for view navigation and loading

This change introduces the core application initialization and view navigation logic, including \ApplicationInitializeUseCase\ (which sets up configuration and SPA popstate handling), \ApplicationGotoViewUseCase\ (which manages screen transitions, request/response handling, and callback execution), and \ContextRunUseCase\ (which initializes the rendering context). It also adds domain services to support this flow: \ViewBinderService\ for binding/unbinding Views and ViewModels, \LoadingService\ and \DefaultLoader\ for managing loading animations, and \ScreenOverlayService\ for capturing the screen during transitions. Comprehensive unit tests are provided for all new components.

src/application/usecase, src/domain · high confidence

New build and release utility scripts

Added four new Node.js scripts to the project's build tooling: \clean.js\ removes the dist directory, \create.js\ initializes a project by setting up dependencies, \publish.js\ copies essential files like package.json and LICENSE to the dist folder, and \version.js\ updates the version string in the source code. These scripts support the new release and initialization workflows.

scripts · high confidence

New content wrapper classes for dynamic Animation Tool assets

Added four new classes—MovieClipContent, ShapeContent, TextFieldContent, and VideoContent—that extend the corresponding @next2d/display, @next2d/text, and @next2d/media base types. These wrappers automatically invoke the ContentBuilderService in their constructors, enabling seamless dynamic generation of assets created by the Animation Tool without requiring manual initialization steps.

src/application/content · high confidence

Behavioural changes

Centralized application variable management

The application now consolidates access to global state through a dedicated variable module. This introduces centralized managers for configuration, application context, and package definitions, alongside dedicated storage for query parameters, popstate event queues, and loader information. This structural change ensures that critical runtime data is accessed through a single, consistent entry point rather than scattered across the codebase.

src/application/variable · high confidence

New interface definitions for configuration, routing, and request handling

This change introduces a new set of TypeScript interface definitions in the \src/interface\ directory to structure application configuration and data handling. Specifically, it adds \IConfig\ to define application settings (including platform, stage, SPA mode, and routing), \IRequest\ and \IRequestType\ to standardize HTTP request configurations (supporting JSON, content, custom, and cluster types), \IRouting\ to manage route definitions and redirects, and supporting types like \IAccessType\, \ICallback\, \ILoading\, and \IContent\. These interfaces provide a typed contract for how the application handles configuration, network requests, and view transitions.

src/interface · high confidence

Next2D Framework v4.0.8 TypeScript entry point

The src/index.ts file now serves as the primary entry point for the Next2D Framework, exposing the Application singleton, View, ViewModel, and specific content types (MovieClip, Shape, TextField, Video) for public use. This change marks the framework's transition to a TypeScript-based development environment, consolidating exports and initializing the application instance at load time.

src · high confidence

Test coverage

Added unit tests for ContentBuilderService validation logic

Added a new test suite for the ContentBuilderService that verifies the execute function correctly handles various input states, including successful synchronization when loader data is valid, and early returns when loader info is missing, data is null, or character IDs are not found in the symbols map.

src/application/content/Builder · high confidence

Dependencies

Next2D Framework v4.0.8 dependency and build configuration update

The package.json manifest has been updated to version 4.0.8, introducing a modernized build and development environment. Key changes include upgrading TypeScript to v6.0.3, Vite to v8.2.2, and Vitest to v4.1.11, alongside updates to ESLint (v10.9.1) and its TypeScript parser. The project now explicitly declares itself as an ES module ("type": "module") and defines exports for both import and require contexts. Additionally, peer dependencies for the core Next2D player ecosystem (such as @next2d/core, @next2d/player, and @next2d/renderer) are specified using local file paths, ensuring tight coupling with the corresponding player packages.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 58 → 60 (+2.4)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 98 → 97 (-1.0)
  • Architecture 57 → 61 (+4.5)
  • Maturity 73 → 77 (+3.7)
  • Readiness 54 → 51 (-3.4)
  • Security 52 → 68 (+16.5)

Resolved (16)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No exposed public API
  • Scanner failed to run — not a clean result
  • Test reliability not included
  • single-maintainer — knowledge-concentration (bus factor) risk

New (29)

  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no committed lockfile, so no resolved version to grade)
  • Documentation: no architecture or design documentation (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No assertions (empty test): should return early if root is null (src/domain/service/ViewBinderService.test.ts)
  • No assertions: should return early when context root getter returns falsy (src/domain/entity/DefaultLoader.test.ts)
  • No assertions: should return early when context root getter returns falsy (src/domain/entity/DefaultLoader.test.ts)
  • No assertions: should return early when context root getter returns falsy (src/domain/service/ScreenOverlayService.test.ts)
  • No assertions: should return early when context root getter returns falsy (src/domain/service/ScreenOverlayService.test.ts)
  • No assertions: should update cacheX when tx changes (src/domain/service/ScreenOverlayService.test.ts)
  • …and 9 more

Changes since last survey

  • 3 commits — 3 feature/other, 0 fixes

By area

  • (root) — 3 commits

Notable commits

  • change: #172 ドキュメントを更新
  • change: #173 update packages
  • change: #173 バージョン情報を更新

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

Next2D/framework was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit bccee45ffedb112fd2255ac246124924aa8a3a6e — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b84573e22831.