entity-driven-ui
БесплатноБез исполняемых скриптовНе проверенMetadata-driven CRUD with MUI X DataGrid + FormEngine — entity metadata model, server-driven UI, column/form generation, shared validation, access control…
от TheLobbi★ 22 звезды на GitHubОб этом скилле
Entity-Driven UI with MUI
Build fully dynamic CRUD interfaces from entity metadata — one schema drives DataGrid columns, FormEngine forms, validation, access control, and wizard flows.
Entity Metadata Model
The foundation: a single TypeScript schema that drives everything.
// entity-metadata.ts
type DataType = 'string' | 'number' | 'boolean' | 'date' | 'enum' | 'json';
type WidgetType =
| 'text'
| 'textarea'
| 'number'
| 'checkbox'
| 'switch'
| 'select'
| 'autocomplete'
| 'date'
| 'datetime'
| 'json-editor'
| 'custom';
interface ValidationRule {
type: 'required' | 'min' | 'max' | 'regex' | 'email' | 'custom';
value?: number | string;
message?: string;
key?: string; // backend validation key or expression
}
interface AccessRule {
roles?: string[];
claims?: string[];
readOnly?: boolean;
hidden?: boolean;
}
interface FieldMetadata {
name: string; // "email"
label: string; // "Email address"
dataType: DataType;
widget?: WidgetType;
enumOptions?: { value: string; label: string }[] | string; // static or lookup key
isPrimaryKey?: boolean;
isFilterable?: boolean;
isSortable?: boolean;
validations?: ValidationRule[];
access?: {
read?: AccessRule;
write?: AccessRule;
};
layout?: {
group?: string; // "Contact info"
columnSpan?: 1 | 2 | 3 | 4;
order?: number;
step?: string; // for wizard flows
};
}
interface EntityMetadata {
name: string; // "User"
label: string; // "Users"
api: {
list: string; // "/api/users"
get: string; // "/api/users/:id"
create: string; // "/api/users"
update: string; // "/api/users/:id"
delete?: string; // "/api/users/:id"
};
fields: FieldMetadata[];
}
This single model drives:
- DataGrid columns (types, sorting, filtering, editing, rendering)
- FormEngine schemas (form fields, validation, layout, wizards)
- Access control (field-level read/write visibility)
- Shared validation (one truth, many consumers)
Server-Driven CRUD Page
Next.js Route: /admin/[entity]
// app/admin/[entity]/page.tsx
import { EntityPage } from '@/components/admin/EntityPage';
export default async function AdminEntityPage({
params,
}: {
params: { entity: string };
}) {
const res = await fetch(
`${process.env.ADMIN_API}/entities/${params.entity}/metadata`,
{ cache: 'no-store' },
);
const metadata: EntityMetadata = await res.json();
return <EntityPage metadata={metadata} />;
}
EntityPage Component
'use client';
import { useState, useMemo, useCallback } from 'react';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import Dialog from '@mui/material/Dialog';
import { DataGrid } from '@mui/x-data-grid';
import { buildColumns } from '@/lib/entity/build-columns';
import { EntityForm } from '@/components/admin/EntityForm';
import { useEntityData } from '@/hooks/useEntityData';
import type { EntityMetadata } from '@/types/entity-metadata';
interface EntityPageProps {
metadata: EntityMetadata;
}
export function EntityPage({ metadata }: EntityPageProps) {
const [formOpen, setFormOpen] = useState(false);
const [editingRow, setEditingRow] = useState<any>(null);
const columns = useMemo(() => buildColumns(metadata), [metadata]);
const { rows, rowCount, loading, paginationModel, setPaginationModel, refetch } =
useEntityData(metadata);
const handleEdit = useCallback((row: any) => {
setEditingRow(row);
setFormOpen(true);
}, []);
const handleCreate = useCallback(() => {
setEditingRow(null);
setFormOpen(true);
}, []);
const handleFormSubmit = useCallback(
async (data: Record<string, unknown>) => {
const isNew = !editingRow;
const url = isNew ? metadata.api.create : metadata.api.update;
const method = isNew ? 'POST' : 'PUT';
await fetch(url, {
method,
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(data),
});
setFormOpen(false);
refetch();
},
[editingRow, metadata.api, refetch],
);
return (
<Box sx={{ height: 600, width: '100%' }}>
<Box sx={{ display: 'flex', justifyContent: 'space-between', mb: 2 }}>
<h1>{metadata.label}</h1>
<Button variant="contained" onClick={handleCreate}>
Add {metadata.name}
</Button>
</Box>
<DataGrid
rows={rows}
columns={columns}
loading={loading}
paginationMode="server"
rowCount={rowCount}
paginationModel={paginationModel}
onPaginationModelChange={setPaginationModel}
onRowDoubleClick={(params) => handleEdit(params.row)}
pageSizeOptions={[10, 25, 50]}
/>
<Dialog open={formOpen} onClose={() => setFormOpen(fa
Установить entity-driven-ui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGlobGrepWriteEditBashFAQ
Что делает скилл entity-driven-ui?
Metadata-driven CRUD with MUI X DataGrid + FormEngine — entity metadata model, server-driven UI, column/form generation, shared validation, access control, wizard flows
Как установить скилл entity-driven-ui?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл entity-driven-ui запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic