원클릭으로
admin-crud-ui
Build administrative CRUD interfaces in the Commons admin panel following established patterns for list, create, and edit views.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Build administrative CRUD interfaces in the Commons admin panel following established patterns for list, create, and edit views.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Advanced Jest test modes in the Commons monorepo — /local/ tests, watch mode, live console output, multi-file batching, and test-failure troubleshooting. For routine "run the test for this file" resolution, call the nx-project-for-file tool instead.
Use Graphite CLI (gt) for stacked PRs and branch management. Use when creating branches, committing changes, submitting PRs, syncing with trunk, or managing stacked pull requests.
Investigate data-integrity / "why does this data look wrong" questions in the Commons codebase (mismatched IDs, orphaned rows, cross-entity divergence, unexpected duplicates, values that don't agree across tables). Use when a ticket or user asks WHY a piece of data is in a surprising state and you must trace it to a root cause through code + production data. Pairs with the commons-sql-query skill for the SQL itself.
Advanced lint/format modes in the Commons monorepo — git-affected linting across a stack, auto-fix, and the full-CI lint pipeline. For routine "lint this file's project" resolution, call the nx-project-for-file tool instead.
Create job files in the Commons monorepo. Use when the user wants to create a new job, backfill script, cache job, export job, sync job, bulk operation, cron task, or any background task that runs via HTTP POST endpoint.
Create database migrations from templates in the Commons monorepo. Use when the user wants to create a migration, add database columns, create tables, or modify the database schema.
| name | Admin CRUD UI |
| description | Build administrative CRUD interfaces in the Commons admin panel following established patterns for list, create, and edit views. |
Build admin interfaces for managing domain entities (markets, clinics, pods, partners, etc.) in the Commons admin panel.
deletedAt column) if deletion is needed. Never allow slug changes after entity creation.safeParse for type-safe validation.See WORKFLOW.md for the step-by-step process to build a new admin CRUD interface.
See TEMPLATES.md for copy-paste-ready templates for each file type.
Each admin entity requires these files. Choose route-based (separate pages for create/edit) or modal-based (inline modals on list page) depending on form complexity.
commons-packages/frontend/admin-container/<entity>/
├── <entity>-manager.tsx # List view (TableV2) + search/sort/delete
├── <entity>-modal.tsx # Modal wrapper for create (and optionally edit)
├── <entity>-form-validation.ts # Zod validation schema
└── graphql/
├── get-<entities>.graphql # List query
├── get-<entity>.graphql # Single entity query (if editing)
├── create-<entity>-mutation.graphql
├── edit-<entity>-mutation.graphql # (if editing)
└── delete-<entity>-mutation.graphql # (if deleting)
For complex create/edit with many fields, split the form into a separate <entity>-form.tsx component that the modal wraps.
commons-packages/frontend/admin-container/<entity>/
├── <entity>-manager.tsx # List view (TableV2)
├── <entity>-form.tsx # Create/edit form (shared component)
├── <entity>-view.tsx # Edit wrapper (fetches data, passes to form)
├── <entity>-form-validation.ts # Zod validation schema
└── graphql/
├── get-<entities>.graphql # List query
├── get-<entity>.graphql # Single entity query
├── create-<entity>-mutation.graphql
├── edit-<entity>-mutation.graphql
└── delete-<entity>-mutation.graphql # (if deleting)
commons-packages/backend/graphql/domain/<entity>/
├── <entity>.ts # @ObjectType class
├── inputs/
│ ├── <entity>-create.input.ts # @InputType for creation
│ └── <entity>-edit.input.ts # @InputType for editing
└── resolvers/
└── <entity>.resolver.ts # Queries + mutations with @Authorization
commons-packages/frontend/admin-container/admin-container.tsxSidebar sections array| Entity | Location | Pattern | Complexity | Notes |
|---|---|---|---|---|
| Athena insurance pkg mappings | admin-container/athena-insurance-package-mapping/ | Modal | Simple | Best modal starting point. Create + delete, search, sorting. |
| Task queues | admin-container/task-queue/ | Modal | Medium | Modal with create + edit, search, sorting, protected items. |
| Regular check-in cadences | admin-container/regular-check-in-cadences/ | Route-based | Simple | Best route-based starting point. Clean TableV2, no sorting. |
| Appointment type criteria | admin-container/appointment-type-criteria/ | Route-based | Simple | TableV2 with edit + delete actions in table cells. |
| Clinics | admin-container/clinics/ | Route-based | Medium | TableV2 with column sorting + filter panel. |
| Pods | admin-container/pods/ | Route-based | Medium | Data enrichment from related entities. |
| Markets | admin-container/markets/ | Route-based | Simple | Exception. Legacy List/ListItem — do not use for new work. |
Default to TableV2 for all new entities. For modal-based UIs, use athena-insurance-package-mapping as the starting reference. For route-based UIs, use regular-check-in-cadences. The List/ListItem pattern (markets) is legacy and should not be used for new admin views.
import {
Banner,
Button,
Card,
FormLayout,
Input,
Layout,
Link,
Modal,
Row,
Search,
SingleSelect,
Spinner,
TableV2,
Text,
useToasts,
} from '@commons/frontend/shared/commonplace';
import { Arg, Ctx, ID, Mutation, Query, Resolver } from '@cityblock/type-graphql';
import { Field, InputType, ObjectType } from '@cityblock/type-graphql';
import { Authorization } from '@commons/backend/graphql/custom-decorators/authorization';
import { ActionType } from '@commons/shared/permissions/action-type.enum';
import { SubjectType } from '@commons/shared/permissions/subject-type.enum';