@adminiumjs/adminium

中文文档
0.3.50发布于 2026/11/08AGPL-3.0-onlyTypeScriptES Module构建来源已验证近 30 天下载 4415

Fastify server: REST /api/v1, auth, jobs, serves the dashboard build

原始使用文档
文档目录7 节
  1. Install
  2. Commands
  3. Configuration
  4. Databases
  5. What is inside
  6. Related packages
  7. Licence

Adminium

From connection string to shipped dashboard.

Adminium introspects a database — or a schema file — classifies the structure and relations it finds, and generates a complete, themable React admin dashboard. This package is the whole product in one install: the Fastify API, the meta-store migrations, the CLI, and the pre-built dashboard it serves.

Adminium is free and open source under AGPL-3.0-only. Source, issues and releases: https://github.com/MoSofi/Adminium.

npm naming. The @adminium scope and the unscoped name adminium on npm both belong to unrelated parties. Adminium publishes under @adminiumjs — install @adminiumjs/adminium, never a bare adminium. The installed command is still adminium.

Install

Create a project and run it:

npx @adminiumjs/adminium new my-admin --sample
cd my-admin
npm run dev

Or install the command globally:

npm install -g @adminiumjs/adminium
adminium new my-admin

Node.js 22.14 or newer is required. On an older Node the CLI stops with a message saying so.

Running adminium with no arguments creates a project: it asks for a folder name and runs adminium new. To try Adminium without a project, run adminium try: it asks for a database connection, probes it, generates the app, and starts the server on http://localhost:4600.

Commands

CommandWhat it does
adminium new [name]Create a project folder (or make the current folder one), with --sample for a demo database
adminium devRun a project, restarting it when its config or .env changes and reloading its hooks, actions, pages and widgets when they change
adminium buildCompile a project's config, hooks, actions, pages and widgets into .adminium/build
adminium checkCheck a project, its page files, hooks, actions, pages and widgets without starting it (for CI)
adminium pull [--from <url>]Write a project's page and schema files from its database, or from a server running it
adminium eject <address>Turn a page file into a page written in React
adminium try / adminium initInteractive setup without a project: connect a database, generate the app, start the server
adminium startStart the server and serve the dashboard (--port, --host); inside a project, the project
adminium introspect --connection <id>Introspect a connection and store the schema snapshot
adminium migrate [--status]Run the meta-store migrations (idempotent)
adminium export-zipExport the instance configuration as a runnable bundle
adminium import-zip --in <file>Import an instance configuration bundle
adminium generate-promptBuild an LLM enrichment prompt (bring-your-own round trip)
adminium apply-llm-responseValidate an LLM response and apply the accepted suggestions

adminium --help, or adminium <command> --help, prints the full flag list.

Configuration

Everything is environment-driven, validated once at boot.

VariablePurpose
ADMINIUM_SECRETRequired. Master secret, ≥16 chars — e.g. openssl rand -hex 32
PORTListen port (default 4600)
HOSTBind address (default 0.0.0.0)
ADMINIUM_META_URLMeta-store DSN: postgres://, mysql://, or sqlite:<path>
ADMINIUM_DATA_DIRWritable directory for files, exports and backups (default ./data)
ADMINIUM_LOG_LEVELtrace…fatal (default info)
ADMINIUM_TRUST_PROXYEnable behind a TLS-terminating proxy
ADMINIUM_TRUSTED_PROXIESAddresses that count as that proxy (default loopback,uniquelocal)
ADMINIUM_CORS_ORIGINSComma-separated allowed origins
ADMINIUM_BRIDGE_ORIGINSOrigins allowed to hand this instance a connection string (--bridge)
ADMINIUM_NETWORK_FEATURESoff on air-gapped installs — the UI stops offering webhooks/OAuth
ADMINIUM_MAP_SERVERWhere maps' pictures come from (default https://tiles.openfreemap.org); off for no maps
ADMINIUM_ROUTING_SERVERThe OSRM server asked for routes along roads, once switched on in Settings (default https://router.project-osrm.org); off for straight-line estimates only
ADMINIUM_TELEMETRYoff by default

A missing or malformed value fails the boot with the fix printed, rather than starting a half-configured server.

Databases

Adminium reads your data through PostgreSQL, MySQL/MariaDB and SQLite adapters. The meta store (Adminium's own adminium_* tables) runs on Postgres, MySQL or an embedded SQLite file; the Postgres and MySQL drivers ship as optional dependencies, so --no-optional yields a SQLite-only install.

What is inside

This package carries the internal packages the server loads in its own node_modules/@adminium/: engine, meta, i18n, llm, schema-import, manifest, add-on-contracts, widgets and the three database adapters. They are listed in bundleDependencies, so npm installs them from this tarball and never fetches them from the registry, and the compiled @adminium/* imports resolve to those folders. The dashboard ships pre-built in dashboard/, so none of its browser libraries are installed. schemas/ holds the JSON Schemas that a project's page and schema files name with $schema, and templates/ the files adminium new writes.

  • @adminiumjs/public-client: the client app frontends use to call an Adminium instance's public API.
  • @adminiumjs/manifest and @adminiumjs/add-on-contracts: the manifest schema and the add-on contracts, for add-on hosts.

Licence

AGPL-3.0-only. The complete corresponding source for this package is at https://github.com/MoSofi/Adminium. See the bundled LICENSE.

版本与发布记录

@adminiumjs/adminium 共发布 73 个版本,首次发布于 2026/07/21;过去 12 个月发布了 73 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.3.50latest2026/11/08今天
0.3.492026/11/07今天
0.3.482026/11/061 天前
0.3.472026/11/061 天前
0.3.462026/11/052 天前
0.3.452026/11/052 天前

关于 @adminiumjs/adminium 的常见问题

@adminiumjs/adminium 是什么?

Fastify server: REST /api/v1, auth, jobs, serves the dashboard build

如何安装 @adminiumjs/adminium?

在项目目录运行 npm install @adminiumjs/adminium,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 adminium,可以用 npx adminium 直接运行。

@adminiumjs/adminium 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@adminiumjs/adminium 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@adminiumjs/adminium 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^22.14.0 || >=23.6.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@adminiumjs/adminium 可以商用吗?

@adminiumjs/adminium 使用 AGPL-3.0-only 许可。最严格的 Copyleft:除分发外,通过网络向用户提供基于它的服务也需要开源对应源码。闭源 SaaS 使用前务必评估。以上为概括,不构成法律意见,请以许可原文为准。

@adminiumjs/adminium 的下载量有多少?

根据 npm 官方下载统计,@adminiumjs/adminium 在 2026/10/05 – 2026/11/03 这 30 天内被下载 4,415 次,日均约 147 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@adminiumjs/adminium 还在维护吗?

最新版本 0.3.50 发布于 2026/11/08(今天);至今共发布 73 个版本,其中过去 12 个月发布了 73 个;首次发布于 2026/07/21。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。