All twenty problems
D4What it costs the developer

CRUD hell.

List, form, pagination, search, filters, sorting. Twenty tables, twenty times. It is not intellectually hard, which is exactly why it is expensive.

What actually goes wrong

Each table needs a list with server-side pagination, a sort that cannot be injected into, filters, a search, a create form, an edit form, validation wired to the API’s errors, a delete confirmation, and bulk actions once somebody asks.

Doing it once is a week. Doing it twenty times is a quarter, and the twentieth is subtly different from the first because you learned something in between.

What Grit does about it

  • Generating a resource writes the list, the detail page and the form, with pagination, sorting, filters, search, bulk actions, CSV import and Excel export already in them.
  • The screen is a definition rather than a page, so changing a column is an edit to one file that survives regeneration.
  • Every resource uses the same shared components, so an improvement to the table reaches all twenty screens.

The commands

grit generate resource Invoice --fields "number:string, total:money, due:date, client:belongs_to"
Put a generated table or form in the public web app too
grit expose table Invoice --to apps/web/app/invoices/page.tsx

What it does not do

It is an operator interface, not your product. A screen that joins four models with a chart and a date range is a page you write, using the generated hooks.

Read next