NewLife/NewLife.Cube.MUI

NewLife.Cube.MUI
Detail
Zip
Compare
README.md
# NewLife.Cube.MUI - React 19 + MUI 6 + Vite 6 skin for NewLife.Cube ![GitHub License](https://img.shields.io/github/license/NewLifeX/NewLife.Cube.MUI?logo=github) ![Nuget Downloads](https://img.shields.io/nuget/dt/newlife.cube.mui?logo=nuget) ![Nuget](https://img.shields.io/nuget/v/newlife.cube.mui?logo=nuget) ![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/newlife.cube.mui?label=dev%20nuget&logo=nuget) [![test](https://github.com/NewLifeX/NewLife.Cube.MUI/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/NewLifeX/NewLife.Cube.MUI/actions/workflows/test.yml) <!-- lang:start --> 🌐 [简体中文](/NewLife/NewLife.Cube.MUI/Blob/master/README.zh-CN.md) | [繁體中文](/NewLife/NewLife.Cube.MUI/Blob/master/README.zh-TW.md) | [Español](/NewLife/NewLife.Cube.MUI/Blob/master/README.es.md) | [Deutsch](/NewLife/NewLife.Cube.MUI/Blob/master/README.de.md) | [日本語](/NewLife/NewLife.Cube.MUI/Blob/master/README.ja.md) | [Français](/NewLife/NewLife.Cube.MUI/Blob/master/README.fr.md) | [Português](/NewLife/NewLife.Cube.MUI/Blob/master/README.pt.md) | [Русский](/NewLife/NewLife.Cube.MUI/Blob/master/README.ru.md) | [한국어](/NewLife/NewLife.Cube.MUI/Blob/master/README.ko.md) | [العربية](/NewLife/NewLife.Cube.MUI/Blob/master/README.ar.md) <!-- lang:end --> The **MUI skin** for the third-generation Web API front end of Cube (NewLife.Cube), delivered as a standalone NuGet package and repository. Built with **React 19 + MUI 6 + Vite 6**, it renders metadata-driven lists and forms and follows the Cube skin design specification. **Contents**: [Highlights](/NewLife/NewLife.Cube.MUI/Blob/master/#highlights) · [Documentation](/NewLife/NewLife.Cube.MUI/Blob/master/#documentation) · [Quick Start](/NewLife/NewLife.Cube.MUI/Blob/master/#quick-start) · [Local Development](/NewLife/NewLife.Cube.MUI/Blob/master/#local-development) · [Build and Test](/NewLife/NewLife.Cube.MUI/Blob/master/#build-and-test) · [Release](/NewLife/NewLife.Cube.MUI/Blob/master/#release) · [Related repositories](/NewLife/NewLife.Cube.MUI/Blob/master/#related-repositories) · [Ecosystem Map](/NewLife/NewLife.Cube.MUI/Blob/master/#ecosystem-map) · [Team](/NewLife/NewLife.Cube.MUI/Blob/master/#team) · [License](/NewLife/NewLife.Cube.MUI/Blob/master/#license) ## Highlights - Out of the box: reference the NuGet package, run `AddCube` + `UseCube`, and the embedded admin console is ready; no physical front-end files are required. - Metadata driven: lists, forms, search and detail pages are rendered from backend `meta`; adding an entity needs no front-end work. - Shared npm core: uses `@newlifex/cube` for API, page logic, field mapping and auth; the framework-agnostic core is shared by all Cube skins. - Skin switching: Cube auto-discovers referenced skin packages; switch with the `SpaSkin` setting. - Feature parity with Cube.Vue / Cube.React: sign-in (captcha, MFA, tenant, OAuth), registration, password recovery, account activation, workbench, account center (profile/security), tree tables, column settings, import/export, developer actions, menu search, multi-tab navigation, theming and UI language. - Two test layers: Vitest for utility modules, Playwright for sign-in, navigation/menu search, list enhancements (column settings, tree table, import/export), workbench, account center, UI language/theme and the AI assistant panel. ## Documentation - [Requirements (zh-CN)](/NewLife/NewLife.Cube.MUI/Blob/master/Doc/需求文档.md) - [Feature list (zh-CN)](/NewLife/NewLife.Cube.MUI/Blob/master/Doc/功能清单.md) - [Architecture (zh-CN)](/NewLife/NewLife.Cube.MUI/Blob/master/Doc/架构设计.md) - [Multi-language README guide (zh-CN)](/NewLife/NewLife.Cube.MUI/Blob/master/Doc/README多语言规范.md) ## Quick Start Reference `NewLife.Cube` and `NewLife.Cube.MUI`, then start the host: ```bash dotnet add package NewLife.Cube dotnet add package NewLife.Cube.MUI ``` ```csharp services.AddCube(); var app = builder.Build(); app.UseCube(app.Environment); app.MapControllers(); app.Run(); ``` ## Local Development Start the demo backend and the Vite dev server: ```bash # backend (SQLite, http://localhost:7123) dotnet run --project CubeDemo/MUICubeDemo.csproj # frontend (http://localhost:5181) cd NewLife.Cube.MUI/web pnpm install pnpm dev ``` ### Local boundary channel .NET: `dotnet build 魔方MUI.slnx -p:UseLocalNewLifeSource=true` uses the sibling `../NewLife.Cube` source. npm: `pnpm link:local` / `pnpm unlink:local` switches to `../NewLife.Cube/packages/cube` and back. ## Build and Test Build the web assets, run checks and pack the NuGet package: ```bash cd NewLife.Cube.MUI/web pnpm build pnpm test:unit dotnet build 魔方MUI.slnx -c Release dotnet pack NewLife.Cube.MUI/NewLife.Cube.MUI.csproj -c Release -o out ``` ### E2E tests The Playwright suite in `E2ETest/` covers sign-in, navigation and menu search, list enhancements (column settings, tree table, import/export), the workbench, account center, UI language/theme and the AI assistant panel against the demo site. ```bash # demo site on http://localhost:7123 (SQLite) dotnet run --project CubeDemo/MUICubeDemo.csproj cd E2ETest pnpm install pnpm exec playwright install chromium pnpm test ``` Set `E2E_BASE_URL` (for example `http://localhost:7117`) to target another host/port, or `E2E_NO_WEBSERVER=1` when the site is already running. Admin credentials come from `ADMIN_USER` / `ADMIN_PASS` (default `admin` / `admin`). ## Release CI builds the web assets, embeds `wwwroot` into the DLL, then packs and publishes `NewLife.Cube.MUI` to NuGet. ## Related repositories | Repository | Description | | --- | --- | | [NewLife.Cube](https://github.com/NewLifeX/NewLife.Cube) | Cube core · official Vue skin · `@newlifex/cube` · skin design spec | | [NewLife.Cube.React](https://github.com/NewLifeX/NewLife.Cube.React) | React 19 + Ant Design 6 | | [NewLife.Cube.ArcoVue](https://github.com/NewLifeX/NewLife.Cube.ArcoVue) | Vue 3 + Arco Design Vue | | [NewLife.Cube.Soybean](https://github.com/NewLifeX/NewLife.Cube.Soybean) | Vue 3 + Soybean Admin | | [NewLife.Cube.NaiveUI](https://github.com/NewLifeX/NewLife.Cube.NaiveUI) | Vue 3 + Naive UI | | [NewLife.Cube.Vuetify](https://github.com/NewLifeX/NewLife.Cube.Vuetify) | Vue 3 + Vuetify 3 | | [NewLife.Cube.TDesign](https://github.com/NewLifeX/NewLife.Cube.TDesign) | Vue 3 + TDesign | | [NewLife.Cube.MUI](https://github.com/NewLifeX/NewLife.Cube.MUI) | React 19 + MUI 6 | | [NewLife.Cube.Shadcn](https://github.com/NewLifeX/NewLife.Cube.Shadcn) | React 19 + Radix UI + Tailwind CSS 4 | | [NewLife.Cube.Angular](https://github.com/NewLifeX/NewLife.Cube.Angular) | Angular 19 + NG-ZORRO | | [NewLife.Cube.Svelte](https://github.com/NewLifeX/NewLife.Cube.Svelte) | SvelteKit 2 + Svelte 5 + Tailwind CSS 4 | ## Ecosystem Map NewLife is a layered ecosystem of independently versioned open-source projects. The map below is shared verbatim by every NewLife repository; each project links to its repository and its primary NuGet package. | Project | What it does | Downloads | | --- | --- | --- | | **Foundation** | | | | [NewLife.Core](https://github.com/NewLifeX/X) | Logging, configuration, caching, networking, serialization, scheduling and APM tracing. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Core?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Core) | | [NewLife.XCode](https://github.com/NewLifeX/NewLife.XCode) | Data middleware: single tables at the tens-of-billions scale, automatic sharding, read-write splitting, 10+ databases. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.XCode?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.XCode) | | [NewLife.Net](https://github.com/NewLifeX/NewLife.Net) | High-performance network library: 1.77M pps / 14.5 Gbps on a single machine (TCP 1KB, 2026-10), 4M long-lived TCP connections. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Net?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Net) | | [NewLife.Remoting](https://github.com/NewLifeX/NewLife.Remoting) | Protocol communication and RPC framework for client/server applications and IoT devices. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Remoting?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Remoting) | | [NewLife.Agent](https://github.com/NewLifeX/NewLife.Agent) | Installs .NET applications as OS daemons: Windows services and Linux systemd. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Agent?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Agent) | | [NewLife.Templates](https://github.com/NewLifeX/NewLife.Zero) | `dotnet new` project templates for console, web, API, service, data and IoT projects. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Templates?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Templates) | | **Data & Messaging** | | | | [NewLife.Redis](https://github.com/NewLifeX/NewLife.Redis) | Redis client with microsecond latency, millions of ops/s and built-in message queues. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Redis?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Redis) | | [NewLife.RocketMQ](https://github.com/NewLifeX/NewLife.RocketMQ) | Pure managed RocketMQ client for Apache RocketMQ and Alibaba Cloud Message Queue. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.RocketMQ?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.RocketMQ) | | [NewLife.MQTT](https://github.com/NewLifeX/NewLife.MQTT) | MQTT client and server, including Alibaba Cloud IoT connectivity. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.MQTT?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.MQTT) | | [NewLife.NovaDb](https://github.com/NewLifeX/NewLife.NovaDb) | Hybrid database in C#: embedded or networked, relational, time-series, message queue and KV in one. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.NovaDb?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.NovaDb) | | [NewLife.MySql](https://github.com/NewLifeX/NewLife.MySql) | MySql driver and helper layer built on the NewLife data stack. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.MySql?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.MySql) | | [NewLife.TDengine](https://github.com/NewLifeX/NewLife.TDengine) | Pure managed TDengine ADO.NET driver with REST, WebSocket and native RPC transports, no native dependency. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.TDengine?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.TDengine) | | [NewLife.Presto](https://github.com/NewLifeX/NewLife.Presto) | Pure C# Presto/Trino ADO.NET driver with zero third-party dependencies and XCode ORM integration. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Presto?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Presto) | | **Web & Distributed** | | | | [NewLife.Cube](https://github.com/NewLifeX/NewLife.Cube) | Rapid admin-platform framework: permissions, SSO, OAuth server and CRUD scaffolding. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Cube?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Cube) | | [NewLife.Cube.React](https://github.com/NewLifeX/NewLife.Cube.React) | Decoupled front-end sample for Cube: WebAPI backend with Swagger plus React, Vue and Blazor clients. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Cube.React?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Cube.React) | | [Stardust](https://github.com/NewLifeX/Stardust) | Distributed service platform: node management, APM, configuration center, registry and release center. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Stardust?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Stardust) | | [AntJob](https://github.com/NewLifeX/AntJob) | Distributed task and real-time data scheduling platform with sharding, retries and backfill. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.AntJob?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.AntJob) | | **AI & Vision** | | | | [NewLife.AI](https://github.com/NewLifeX/NewLife.AI) | Unified client for 46 LLM providers plus ChatAI, a ready-to-run web chat application. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.AI?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.AI) | | [NewLife.Imaging](https://github.com/NewLifeX/NewLife.Imaging) | Pure managed imaging foundation: pixel model, codec contracts, drawing and metadata with zero native dependencies. | — | | [NewLife.Vision](https://github.com/NewLifeX/NewLife.Vision) | Vision algorithms: OCR, barcodes, object detection and face recognition on top of NewLife.Imaging. | — | | [NewLife.ML](https://github.com/NewLifeX/NewLife.ML) | Tabular machine learning for .NET: turn database tables and Excel sheets into deployable prediction and classification models. | — | | **Industrial & IoT** | | | | [NewLife.IoT](https://github.com/NewLifeX/NewLife.IoT) | IoT standard library defining protocol contracts and device abstractions. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.IoT?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.IoT) | | [NewLife.Modbus](https://github.com/NewLifeX/NewLife.Modbus) | Modbus TCP/RTU/ASCII implementation on top of NewLife.IoT. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Modbus?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Modbus) | | [NewLife.Siemens](https://github.com/NewLifeX/NewLife.Siemens) | Siemens PLC protocol on top of NewLife.IoT. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Siemens?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Siemens) | | [NewLife.Omron](https://github.com/NewLifeX/NewLife.Omron) | Omron PLC protocol on top of NewLife.IoT. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Omron?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Omron) | | [NewLife.Melsec](https://github.com/NewLifeX/NewLife.Melsec) | Mitsubishi Melsec PLC protocol on top of NewLife.IoT. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Melsec?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Melsec) | | [NewLife.Schneider](https://github.com/NewLifeX/NewLife.Schneider) | Schneider PLC communication driver built on Modbus TCP. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Schneider?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Schneider) | | [NewLife.OPC](https://github.com/NewLifeX/NewLife.OPC) | OPC client for industrial data access. | — | | [NewLife.BACnet](https://github.com/NewLifeX/NewLife.BACnet) | BACnet building-automation protocol stack. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.BACnet?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.BACnet) | | [NewLife.LoRa](https://github.com/NewLifeX/NewLife.LoRa) | LoRaWAN low-power wide-area protocol for long-range IoT connectivity. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.LoRa?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.LoRa) | | [ZeroIoT](https://github.com/NewLifeX/ZeroIoT) | Lightweight open-source IoT platform with gateway and device management. | — | | **Vehicle Telematics** | | | | [NewLife.JT808](https://github.com/NewLifeX/NewLife.JT808) | JT/T 808 vehicle positioning protocol: 70+ message bodies, 2011/2013/2019. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.JT808?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.JT808) | | [NewLife.JT809](https://github.com/NewLifeX/NewLife.JT809) | JT/T 809 platform-to-platform protocol for transport authorities. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.JT809?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.JT809) | | [NewLife.JT1078](https://github.com/NewLifeX/NewLife.JT1078) | JT/T 1078 in-vehicle video: RTP parsing, FLV/fMP4 remuxing and live streaming. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.JT1078?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.JT1078) | | **Domain Components** | | | | [NewLife.Office](https://github.com/NewLifeX/NewLife.Office) | One package for Excel, Word, PPT, PDF and 15+ document formats. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Office?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Office) | | [NewLife.Audio](https://github.com/NewLifeX/NewLife.Audio) | Cross-platform audio: codecs, device I/O, DSP, containers and streaming. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Audio?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Audio) | | [NewLife.Video](https://github.com/NewLifeX/NewLife.Video) | Video codecs, container formats, frame processing and streaming. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Video?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Video) | | [NewLife.Map](https://github.com/NewLifeX/NewLife.Map) | Unified interface over Baidu, AMap, Tencent and Tianditu with geocoding and coordinate conversion. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Map?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Map) | | [NewLife.IP](https://github.com/NewLifeX/NewLife.IP) | IPv4 geolocation with an offline memory-mapped database and an online API fallback. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.IP?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.IP) | | [NewLife.Holiday](https://github.com/NewLifeX/NewLife.Holiday) | Chinese holiday and adjusted-workday identification library with built-in annual data and lunar festival support, fully offline. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.Holiday?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.Holiday) | | **Tools & Products** | | | | [CrazyCoder](https://github.com/NewLifeX/XCoder) | Developer toolbox: network, serial port, crypto, regex, Modbus and MQTT. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.XCoder?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.XCoder) | | [NewLife.UnitTest](https://github.com/NewLifeX/NewLife.UnitTest) | Unit test extensions: test base classes, data-driven tests and dependency-injection helpers. | [![NuGet](https://img.shields.io/nuget/dt/NewLife.UnitTest?style=flat-square&logo=nuget&label=downloads)](https://www.nuget.org/packages/NewLife.UnitTest) | | [GitCandy](https://github.com/NewLifeX/GitCandy) | Self-hosted Git source code management system. | — | | [LuckyClover](https://github.com/NewLifeX/LuckyClover) | Installs the matching .NET runtime automatically when launched from an older host. | — | > Badges show the primary package of each project; theme, extension and satellite packages are listed on their NuGet pages. The 30+ packages not listed here (FTP, Office extensions, protocol drivers and more) are available under the [NewLifeX organization](https://github.com/NewLifeX) and on [newlifex.com](https://newlifex.com). ## Team <img src="https://newlifex.com/logo.png" width="48" align="right" alt="NewLife" /> Founded in 2002, the NewLife team has spent more than two decades on the .NET and IoT ecosystem, maintains nearly 100 open-source projects (44 of them core to this map), and delivers integrated software and hardware solutions for power, logistics, healthcare, industrial control and internet industries. We live by the motto "learning has no seniority — mastery earns respect". Open-source components have been downloaded <!--nuget-total:start-->6.48M<!--nuget-total:end--> times from NuGet (ecosystem-wide, as of 2026-10). Website: https://newlifex.com · Open source organization: https://github.com/NewLifeX <details> <summary>WeChat Official Account: 智能大石头 (scan to follow)</summary> ![智能大石头](https://newlifex.com/stone.jpg) </details> ## License This project is licensed under [MIT](https://github.com/NewLifeX/NewLife.Cube.MUI/blob/master/LICENSE); the strong-name certificate `newlife.snk` is published so you can build and replace assemblies yourself, and the sources may be modified and redistributed without attribution. > If this project is helpful to you, welcome to Star it, share it with your team, or provide improvement suggestions via Issue/PR.