@venizia/ardor
v0.1.1
Published
ARDOR - frontend application framework for the VENIZIA family. One entry point over ardor-kernel, ardor-react and ardor-admin: IGNIS inversion of control, a REST data layer, auth and i18n providers, and the React bindings for a react-admin application.
Readme
@venizia/ardor
Frontend application framework for the VENIZIA family - one entry point over
@venizia/ardor-kernel,
@venizia/ardor-react and
@venizia/ardor-admin.
IGNIS is the backend framework; ARDOR is its frontend sibling and a consumer of it - inversion of
control comes from @venizia/ignis-inversion, and the data layer speaks the query vocabulary of
@venizia/ignis-filter.
bun add @venizia/ardor @venizia/ignis-inversion @venizia/ignis-filter reflect-metadataQuick start
import 'reflect-metadata';
import {
BaseArdorApplication,
CoreBindings,
DefaultAuthProvider,
DefaultAuthService,
DefaultI18nProvider,
DefaultRestDataProvider,
type IApplicationInfo,
} from '@venizia/ardor';
export class Application extends BaseArdorApplication {
getAppInfo(): IApplicationInfo {
return { name: 'seller', version: '1.0.0', description: 'Seller console' };
}
bindContext(): void {
this.bind({ key: CoreBindings.REST_DATA_PROVIDER_OPTIONS }).toValue({
url: import.meta.env.VITE_API_URL,
noAuthPaths: ['/auth/login'],
});
this.bind({ key: CoreBindings.AUTH_PROVIDER_OPTIONS }).toValue({
paths: { signIn: '/auth/login' },
endpoints: { afterLogin: '/dashboard' },
});
this.bind({ key: CoreBindings.I18N_PROVIDER_OPTIONS }).toValue({});
this.bind({ key: CoreBindings.DEFAULT_REST_DATA_PROVIDER }).toProvider(DefaultRestDataProvider);
this.bind({ key: CoreBindings.DEFAULT_AUTH_SERVICE }).toClass(DefaultAuthService);
this.bind({ key: CoreBindings.DEFAULT_AUTH_PROVIDER }).toProvider(DefaultAuthProvider);
this.bind({ key: CoreBindings.DEFAULT_I18N_PROVIDER }).toProvider(DefaultI18nProvider);
}
}The full guide, including the root component and the typed hooks, is in the repository README.
Migrating from @minimaltech/ra-core-infra
ARDOR is that package, split and rebranded. See the migration guide - the move is four mechanical edits plus four symbol renames.
License
MIT - see LICENSE.md.
