entity-design

Design Spiderly entities with attributes, relationships, and UI mappings.

61|24|Updated Sep 14, 2024
One-click install
npx skills add https://github.com/filiptrivan/spiderly --skill entity-design-filiptrivan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: entity-design
Source: https://github.com/filiptrivan/spiderly/tree/main/claude-plugins/skills/entity-design
Command: npx skills add https://github.com/filiptrivan/spiderly --skill entity-design-filiptrivan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing Spiderly entities with correct attributes, relationships, and UI mappings ensures generated DTOs, validators, mappers, and admin UI align with business rules and developer workflows.

Core Features & Use Cases

  • Enforces Spiderly conventions by requiring [SpiderlyEntity] on hand-written entities and guiding DTO generation and UI scaffolding.
  • Documents base classes, including BusinessObject<T> and ReadonlyObject<T>, and explains how they influence IDs, timestamps, and CRUD scaffolding.
  • Outlines property rules, explicit FK support, and relationship patterns (One-to-Many, Many-to-One, Simple/Multi Many-to-Many, and ordered one-to-many) with practical guidance for real-world models.
  • Covers UI control auto-mapping and attribute-driven UI hints to ensure consistent admin forms and frontend bindings.
  • Provides complete design guidance for configuring relationships (M2O, M2M, ordered O2M), file uploads, and UI control mapping across the codebase.

Quick Start

Provide a minimal hand-written entity class annotated with [SpiderlyEntity] including a navigation property, an explicit FK, and a basic CRUD-ready structure to demonstrate the standard design.

Frequently Asked Questions about entity-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure EF Core entity relationships for automatic UI scaffolding?

Entity relationship configuration for automatic UI scaffolding requires marking classes with [SpiderlyEntity] and applying specific attributes for M2O, M2M, and ordered O2M patterns to align generated DTOs and validators with business rules.

What is the [SpiderlyEntity] attribute used for in entity design?

The [SpiderlyEntity] attribute enforces Spiderly conventions on hand-written entity classes, ensuring that generated DTOs, validators, mappers, and admin UI templates align correctly with your configured data models and CRUD workflows.

How do I set up file uploads in my entity classes?

Setting up file uploads involves applying specific UI attributes and property rules within your Spiderly entity classes, which then automatically map to the correct UI controls in the generated admin forms and frontend bindings.

Can I use BusinessObject and ReadonlyObject base classes for CRUD scaffolding?

BusinessObject<T> and ReadonlyObject<T> base classes provide the foundation for IDs, timestamps, and CRUD scaffolding, guiding how your entity structures interact with the generated admin UI and data persistence layers.

Why are my generated DTOs and validators misaligned with my entity properties?

Generated DTOs and validators misalign when entity classes lack required markers like [SpiderlyEntity] or violate property rules, explicit FK support, and UI control auto-mapping conventions needed for consistent frontend bindings.

What's the best way to map UI controls to entity properties automatically?

Automatic UI control mapping relies on attribute-driven UI hints applied directly to entity properties, ensuring that the generated admin forms and frontend bindings consistently reflect the intended input types and validation rules.