Registry / devops / phy-django-rest-admin

phy-django-rest-admin

JSON →
library0.0.17jsnpmunverified

Vue 3 component library and client for building admin interfaces on top of Django REST framework. Current version 0.0.17 (pre-release, active development with frequent breaking changes). Ships TypeScript types. Requires element-plus (^2.8.0), Vue 3.4+, and vue-router 4+. Differentiator: auto-generates admin UI from DRF serializers and viewsets, similar to Django's built-in admin but for REST APIs.

npm install phy-django-rest-admin
INSTALL
IMPORT
SIG · PHY-DJANGO-REST-AD
P
phy-django-rest-admin
devopsjavascriptv0.0.17
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AdminRenderer
import { AdminRenderer } from 'phy-django-rest-admin'
import AdminRenderer from 'phy-django-rest-admin/AdminRenderer'
Named export from package root. ESM only, no CJS. Works with Vue 3 and TypeScript.
AdminLayout
import { AdminLayout } from 'phy-django-rest-admin'
const AdminLayout = require('phy-django-rest-admin').AdminLayout
Named export, not default. CJS require() fails as package is ESM-only.
type AdminConfig
import type { AdminConfig } from 'phy-django-rest-admin'
import { AdminConfig } from 'phy-django-rest-admin'
Use `import type` for type-only imports in TypeScript. Runtime import will fail because it's not a value.

Shows minimal setup: create Vue 3 app, install Vue Router and Element Plus, import AdminRenderer component and style, mount with a single admin route.

import { createApp } from 'vue' import { createRouter, createWebHistory } from 'vue-router' import ElementPlus from 'element-plus' import 'element-plus/dist/index.css' import { AdminRenderer } from 'phy-django-rest-admin' import 'phy-django-rest-admin/dist/style.css' const routes = [ { path: '/admin', component: AdminRenderer, props: { baseURL: process.env.VUE_APP_API_BASE ?? 'http://localhost:8000/api', } } ] const router = createRouter({ history: createWebHistory(), routes, }) const app = createApp({}) app.use(ElementPlus) app.use(router) app.mount('#app')
Debug
Known issues
breakingPackage is pre-1.0, breaking changes occur frequently without major version bump.
fix
Pin exact version and test upgrades thoroughly.
affects: <1.0.0
deprecatedThe `useAdmin` composable was renamed to `useAdminStore` in v0.0.15.
fix
Replace `useAdmin` with `useAdminStore` in your code.
affects: >=0.0.15
gotchaPackage is ESM-only; does not support CommonJS require().
fix
Switch to ESM imports (import ... from '...') or configure bundler to handle ESM.
affects: >=0.0.1
gotchaElement Plus CSS must be imported before the package's CSS to avoid style conflicts.
fix
Order imports: 'element-plus/dist/index.css' then 'phy-django-rest-admin/dist/style.css'.
affects: >=0.0.1
Errors
Common errors & fixes
Cannot find module 'phy-django-rest-admin' or its corresponding type declarations.
Package is not installed or missing from node_modules.
fix
Run `npm install phy-django-rest-admin` and ensure it's in dependencies.
Module not found: Error: Can't resolve 'phy-django-rest-admin' in /path/to/src
Webpack or Vite cannot resolve the package due to missing export or wrong path.
fix
Ensure you are using the correct import: `import { AdminRenderer } from 'phy-django-rest-admin'` (not a subpath).
TypeError: Cannot read properties of undefined (reading 'install')
Element Plus not installed or not initialized via app.use() before using admin components.
fix
Install element-plus and add `app.use(ElementPlus)` after creating the app.
Vue Router is not installed or not used. AdminRenderer requires vue-router to be registered.
Missing vue-router dependency or not calling app.use(router).
fix
Install vue-router and create a router instance, then `app.use(router).`
Upgrade
Version history
0.0.17latest on npm
Audit
Dependencies
@element-plus/icons-vuerequiredRequired icon set for element-plus UI components
element-plusrequiredUI framework used for all components
vuerequiredPeer dependency for Vue 3 reactivity and composition API
vue-routerrequiredRequired for routing between admin views
Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
phy-django-rest-admin — npm install phy-django-rest-admin · libregistry