About this project
QimenJS is a modular TypeScript infrastructure library, named after "Qimen Dunjia"—an ancient Chinese strategic system for military formation. It builds flexible frontend architectures through Ability composition and Pipeline processing, providing 38 independent sub-packages such as event systems, data pipelines, entity management, internationalization, and HTTP clients, covering from the base layer to the UI layer of frontend applications.
The current version is 0.2.0, in the initial development stage. Core APIs and UI component layers are usable, and the framework flow is operational, but APIs may change in future versions.
The package list is organized by layers:
- **Base Layer (Layer 0)**: Includes unified error handling, logging, common utility functions, async utilities, runtime environment detection, hashing and encoding/decoding, internationalization, request/event context, and cross-package shared base types.
- **Core Layer (Layer 1)**: Includes registry, event bus, cache management, data pipelines, ability composition, and task scheduling.
- **Data Layer (Layer 2)**: Includes data processor framework, validation engine, DOM event adaptation (8 gesture recognitions), MIME type parsing, named regex pattern registrar, schema definitions, and permission system.
- **Service Layer (Layer 3)**: Includes HTTP client (4-stage pipeline + interceptors + SSE streaming), OAuth2 authentication (password/authorization code/client credentials modes + 401 auto-refresh), ABP framework data processor, Spring Data data processor, and system capability set.
- **Application Layer (Layer 4)**: Includes entity management framework (5 Managers + Ability composition architecture), routing system (pure event mode + RouteAbility component capability).
- **UI Layer**: Includes component core infrastructure, UI component capability definitions, UI component implementations (Icon/Button/Toggle/Tabs/Card/Menu/Nav/Panel, etc.), advanced UI components (Step/Timeline/Rating/PropertyGrid/OneTimePassword, etc.), JSON-driven layout definition system, theme resources (light/dark + 10 Chinese-style presets + user customization), Chinese-style icon library (102 SVGs + font icons), and imperative APIs (toast/msgbox).
Architectural features include layered design (unidirectional dependency, no cross-layer references), ability composition (entity managers dynamically compose abilities via AbilityDefinition), pipeline processing (data requests/responses go through pluggable processor pipelines, with ABP/Spring out-of-the-box), environment adaptation (core packages are environment-agnostic, working in browsers/Node.js), and type safety (complete TypeScript type definitions).
The example directory `examples/full-stack/` contains a complete full-stack demo, covering OAuth2 authentication, ABP API user management, Spring Data order management, feature demo pages for 36 QimenJS sub-packages, and internationalization (i18n precompilation + dynamic language switching).
Documentation includes architecture explanations, package descriptions, best practices, and API references. Development commands include installing dependencies, building, running tests, linting, and generating API docs. Versioning follows SemVer, with 0.x.x indicating the initial development stage.
This project is AI-assisted, with most code generated by AI. Thanks to Huawei CodeArts, Trae CN, ChatGPT, DeepSeek, Gemini, Tongyi Qianwen, FitEncode, and other tools. Licensed under MIT.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.