Admin consoles on react-admin, with the same dependency injection and filter language as IGNIS, plus sign-in and i18n.
$bun x @venizia/vulcan init --preset ardor --project demo --frontend-dir apps --app admin $cd demo && make dev
import { configuration, CoreBindings, type IRestDataProviderOptions, provide, RuntimeConfig, type TAuthProviderOptions, } from '@venizia/ardor'; @configuration() export class AdminConfiguration { @provide({ key: CoreBindings.REST_DATA_PROVIDER_OPTIONS }) restDataProviderOptions(): IRestDataProviderOptions { const url = RuntimeConfig.get({ key: 'VITE_API_URL', buildTimeEnv: import.meta.env, defaultValue: '/api', }); return { url, noAuthPathRegex: /./ }; } @provide({ key: CoreBindings.AUTH_PROVIDER_OPTIONS }) authProviderOptions(): TAuthProviderOptions { return { use: false }; } }
import 'reflect-metadata'; import { ArdorApplication } from '@venizia/ardor'; import { createRoot } from 'react-dom/client'; import { Application } from '#src/application'; import { Home } from '#src/pages/home'; const application = new Application(); await application.start(); createRoot(document.getElementById('root')!).render( <ArdorApplication container={application} suspense={<p>Loading</p>} dashboard={Home} />, );
src/configurations/admin.configuration.ts: The configuration the preset writes into a new admin: two options, the providers come from the base application. Configuration
src/main.tsx: The mount point of the same preset, without its stylesheet import. Application
The commands of Create a project.
Counted from the repository (0.4.8): the packages and examples folders, every *.test.ts and *.test.tsx file in them, and the imports of Node builtins in the kernel, react and admin sources. A test fails when a number drifts.
The application extends the IGNIS container. Stereotyped classes, @inject, and Ardor.useService({ target }) per namespace.
ReaddataMaps the react-admin calls to the IGNIS filter vocabulary and takes the total from the Content-Range header.
ReadauthA 401 triggers one shared token refresh and one retry per request. No-auth paths are explicit.
Readi18nEnglish and Vietnamese bundles, and useTranslate keys typed through module augmentation.
ReadrepositoryHttpDataSource and HttpRepository from IGNIS, able to share the data provider's token and refresh.
ReadhooksuseDebounce, useAutosave, useConfirm, useCopyToClipboard and typed selector and dispatch factories.
ReadfeaturesFeatures.define packages configurations, resources, routes and messages. RuntimeConfig.get lets one image serve every environment.
ReadmoreEvery public API has a reference page: application, binding keys, network, permission and types.
ReadARDOR is 0.x: a patch release can carry a breaking change. Pin exact versions and read the changelog before upgrading. It ships no socket client: use the IGNIS one.