GitHub | Gitee | Official Website | Live Demo | Documentation | 中文
This repository is the frontend of Erupt, a low-code framework for building enterprise admin systems with Java annotations only.
The Java backend describes each data model (fields, editors, validation, relations, permissions) with @Erupt / @EruptField annotations and exposes it as JSON Schema. This Angular app consumes that schema at runtime and renders the complete UI — tables, forms, trees, search panels, dialogs — without any hand-written page code.
You usually don't need this repo. The compiled bundle is shipped inside the
erupt-webMaven artifact, so any Erupt backend already serves the full UI. Clone this project only when you want to customize the frontend itself (branding beyondapp.js, new field components, deeper theme changes) or contribute to it.
- Schema-driven CRUD — tables, forms, tree views, filters, batch operations and row actions are all generated from backend metadata.
- Rich field components — date/time, choice, tag, reference tables, tree selectors, code editor (Monaco), Markdown / rich text (Vditor), attachments, images, maps, auto-complete, and more.
- Form Designer — drag-and-drop designer for building
@Eruptmodels visually. - BI dashboards — grid-based dashboard builder with charts powered by AntV G2Plot.
- Cube (OLAP) — multi-dimensional analysis and drill-down with pivot tables (AntV S2).
- Workflow — visual process builder for the Erupt Flow module.
- AI — AI-assisted views and interactions.
- Templates, Monitor, Terminal — custom template rendering, runtime monitoring and a web terminal (xterm.js).
- Theming — runtime dark mode (including OS-follow), compact mode, configurable primary and header colors, and a dark sidebar option.
- Multi-tab route reuse, i18n, micro-frontend embedding via
@micro-zoe/micro-app, PWA-ready.
| Tool | Version |
|---|---|
| Node.js | 22.0.0 or higher (node -v) |
| Yarn | classic (npm install -g yarn) |
| Backend | a running Erupt backend, default http://localhost:9999 |
# 1. Install dependencies (use yarn, not npm)
yarn install
# 2. Point the dev proxy at your backend (default: http://localhost:9999)
# edit proxy.conf.js -> proxy.target
# 3. Start the dev server (opens the browser automatically)
yarn startAll backend paths (/erupt-api, /erupt-attachment, /erupt-websocket, /erupt-terminal, …) are proxied to the backend by proxy.conf.js, so the app runs on the dev server without CORS configuration.
| Command | Description |
|---|---|
yarn start |
Dev server with backend proxy and live reload |
yarn run build |
Production build (runs Node with a 6 GB heap — the bundle is large) |
yarn run analyze |
Production build with source maps for bundle analysis |
yarn run analyze:view |
Open the bundle analysis in the browser (source-map-explorer) |
yarn run theme |
Regenerate theme CSS via ng-alain-plugin-theme |
There is no test suite in this project.
- Set the output directory in
angular.json→projects.erupt.architect.build.options.outputPath. By default it points at the backend moduleerupt-web/src/main/resources/public, so a build drops straight into the Java project. - Run the build:
yarn run build
- Either rebuild the backend so Spring Boot serves the new bundle, or deploy the output as static files behind a reverse proxy that forwards the backend paths listed in
proxy.conf.js.
The app uses hash-based routing, so no server-side rewrite rules are needed.
Most customization needs no rebuild. src/app.js (served as /app.js) sets window.eruptSiteConfig, which the app reads at startup:
| Key | Purpose |
|---|---|
domain / fileDomain |
Backend API and attachment base URLs (empty = same origin) |
title / desc |
Page title and login description |
logoPath / logoFoldPath / loginLogoPath / logoText |
Branding assets |
theme |
Appearance defaults, each applying only until the user picks something in the settings drawer: primaryColor, headerColor ("primary" or a CSS color), dark (true / false / "auto" = follow the OS), compact, skin ("default" / "brutalist" / "liquid-glass"), menuMode ("normal" sidebar / "split" categories in the header / "dual" two-column sidebar / "top" whole menu in the header / "group" categories as flat group titles / "top-split" categories in the header with their children in a second row). The older top-level darkTheme, compactTheme, brutalistTheme and liquidGlass keys still work. |
tabReuse |
Enable multi-tab route reuse by default |
registerPage |
URL of a custom registration page shown on the login screen |
copyright / copyrightTxt |
Show the copyright footer / custom footer text |
map |
Map vendor for map fields and the map view: {provider: "amap" | "baidu" | "tencent" | "tianditu" | "google" | "osm", key, securityJsCode (amap), mapId (google), darkStyleId (baidu / tencent), tileUrl (osm), center}; the SDK loads from the vendor CDN at runtime. The legacy amapKey / amapSecurityJsCode keys still work |
r_tools / userTools |
Custom items in the header's right toolbar and user menu |
upload(files) |
Override the upload URL and headers |
Lifecycle hooks (startup, login, logout) can be attached through window.eruptEvent, and per-route load/unload callbacks through window.eruptRouterEvent.
src/app/app.component.ts also exposes ng-zorro's modal, message and notification services on window, so external scripts and template pages can reuse them.
src/
├── app.js # Runtime config: window.eruptSiteConfig
├── style-icons-auto.ts # Icon tree-shaking list (only listed icons are bundled)
├── styles/ # Global less, design tokens, theme bundles (dark / compact / brutalist)
└── app/
├── core/ # Startup init, HTTP interceptors, i18n, singleton services
├── shared/ # Shared components, pipes, directives, utils
├── layout/ # Layout shells: erupt (main), passport (login), blank
├── routes/ # Top-level pages: home, fill-form, exceptions
└── build/ # Lazy-loaded feature modules
├── erupt/ # Schema-driven CRUD engine (tables, forms, trees, field components)
├── designer/ # Form designer
├── bi/ # Dashboard builder
├── cube/ # OLAP cube analysis
├── flow/ # Workflow builder
├── ai/ # AI features
├── tpl/ # Custom template rendering
├── monitor/ # Runtime monitoring
└── terminal/ # Web terminal
The heart of the app lives in src/app/build/erupt/: DataService fetches the model schema, UIBuildService maps it to component configuration, and DataHandlerService converts data between the API and the form.
| Layer | Libraries |
|---|---|
| Framework | Angular 21, TypeScript 5.9, RxJS, Less |
| UI | ng-zorro-antd (Ant Design), ng-alain / @delon |
| Data viz | @antv/g2plot, @antv/s2, angular-gridster2, @worktile/gantt |
| Editors | monaco-editor, vditor, UEditor |
| Others | @micro-zoe/micro-app, @xterm/xterm, @panzoom/panzoom |
| GitHub | Gitee | |
|---|---|---|
| Backend | https://github.com/erupts/erupt | https://gitee.com/erupt/erupt |
| Frontend | https://github.com/erupts/erupt-web | https://gitee.com/erupt/erupt-web |
Issues and pull requests are welcome. Please keep code comments in English, use yarn for dependency changes, and remember to register any new nzType icon in src/style-icons-auto.ts — unregistered icons render blank without a build error.