> ## Documentation Index
> Fetch the complete documentation index at: https://vlyai-1c28d863.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CRUD apps

> Prompts for the bread-and-butter pattern — a list of things, with create / edit / delete.

CRUD is the most common app shape. The five-layer template:

```text theme={null}
**Goal**: Users can manage their {entity}s.

**User**: Authenticated users; each user sees and manages only their own {entity}s.

**Data**:
- `{entities}`: { ownerId, ...fields, createdAt }
- Index: by_owner

**Behavior**:
- /{entities} — list view, sorted newest first, paginated 25/page
- New {entity} button → modal with form
- Each row → click to edit (inline or in a side panel)
- Delete button per row → confirmation modal

**Constraints**:
- Auth-scoped: only show / edit / delete user's own
- Optimistic delete (row disappears immediately)
```

## Variations

<Tabs>
  <Tab title="Sortable & filterable">
    Add: filter pills above the list (status, date range, etc.). Persist filter state in URL query params.
  </Tab>

  <Tab title="Bulk actions">
    Add: checkboxes on each row + "Bulk delete" / "Bulk archive" actions. Confirmation includes the count.
  </Tab>

  <Tab title="Search">
    Add: search bar (Cmd+K) using full-text search on title field.
  </Tab>

  <Tab title="Inline edit">
    Click a field → edit in place → blur to save. Optimistic update.
  </Tab>
</Tabs>

## Related

<CardGroup cols={3}>
  <Card title="Five-layer method" icon="layers" href="/prompting/the-five-layer-method">
    The framework.
  </Card>

  <Card title="Multi-tenant SaaS" icon="building" href="/recipes/multi-tenant-saas">
    Adding multi-user.
  </Card>

  <Card title="Search patterns" icon="search" href="/architecture/search-patterns">
    Adding search.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.