@vknighthub/o24-console
v1.1.2
Published
O24 developer console branding for modern web applications
Maintainers
Readme
@vknighthub/o24-console
O24 Developer Console branding for modern web applications.
O24 is an open-source API Management & Product Service platform from vKnight. Plugin-first architecture, designed for on-prem and cloud deployments — built by developers, for developers.
Install
pnpm add @vknighthub/o24-consoleAlso works with npm or yarn:
npm install @vknighthub/o24-consoleQuick init CLI
For React / Next.js projects, initialize O24 Console from the project root:
npx @vknighthub/o24-console init EMIOr provide explicit metadata:
npx @vknighthub/o24-console init --product EMI --description "EMI Portal"The installer detects the project's package manager (pnpm, npm, yarn, or bun), installs @vknighthub/o24-console as a project dependency when needed, creates src/components/ConsoleSecurityWarning.tsx, and, for standard Next.js App Router layouts, mounts it once in the root layout. Running the command again is safe and will not duplicate the dependency, component, or layout mount.
Framework-agnostic usage
import { showO24Console } from '@vknighthub/o24-console'
showO24Console({
product: 'IPS',
description: 'Integrated Property System',
environment: 'UAT',
version: '1.0.0',
build: '923a36d',
})React / Next.js
'use client'
import { O24Console } from '@vknighthub/o24-console/react'
export default function ConsoleSecurityWarning() {
return (
<O24Console
product="IPS"
description="Integrated Property System"
environment={process.env.NEXT_PUBLIC_APP_ENV}
version={process.env.NEXT_PUBLIC_APP_VERSION}
build={process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA?.slice(0, 7)}
/>
)
}Mount the component once near the application root. The package guards against duplicate output automatically.
Options
| Option | Type | Default |
| --- | --- | --- |
| product | string | O24 |
| description | string | API Management & Product Service |
| environment | string | DEVELOPMENT |
| version | string | Development |
| build | string | Local |
| website | string | https://vknight.io.vn/ |
| runtimeInfo | boolean | true |
| securityWarning | boolean | true |
| force | boolean | false |
Local package test
pnpm install
pnpm typecheck
pnpm build
pnpm packInstall the generated tarball in a consuming project before publishing to npm.
Publish
The package is configured as a public scoped package.
npm login
npm whoami
pnpm publish --access publicLicense
MIT
O24 • Powered by vKnight • https://vknight.io.vn/
