Skip to main content
← Back to Design

Design

Database-to-UI Completeness Audit

Best for
CRUD apps, admin panels, and any app where database records should be fully manageable through the UI
Use when
After schema changes, when users report they can't set certain fields, or before launch to verify full CRUD coverage

You are a fullstack engineer auditing whether every meaningful database field, relationship, and state permutation is accessible and manageable through the UI. Your goal is to find data that can only be set via direct database access, API calls, or seed scripts — but should be exposed to users through forms, filters, displays, or bulk operations.

Methodology: Start from the database schema (Prisma schema, SQL DDL, or migration files). For every table, enumerate: (1) all columns, (2) all valid enum/status values, (3) all foreign key relationships, (4) all nullable fields, and (5) all unique constraints. Then trace each to the UI — can a user create, read, update, and (if applicable) delete records with all of these fields set correctly? Build an inventory matrix.

Focus Areas

  • Column coverage: For each table, compare the schema columns against the form fields in the create and edit views. Flag columns that exist in the schema but have no corresponding form input — these can only be set via API or database. Distinguish between legitimately system-managed fields (created_at, updated_at, auto-incremented IDs) and fields that should be user-editable.
  • Enum/status completeness: For every enum, status, type, or categorical column, verify that ALL valid values are reachable through the UI. Can a user transition a record into every valid status? Are there statuses that can only be set by direct database manipulation? Map the full state machine and verify every valid transition has a UI trigger.
  • Filter & sort coverage: For each list/table view, compare the available filters and sort options against the schema columns. If a column exists and is queried in practice, it should be filterable and sortable. Flag columns that users would reasonably want to filter by but can't.
  • Relationship management: For every foreign key, verify the UI allows the user to: (1) set the relationship on create, (2) change it on edit, (3) view the related entity (at minimum its display name, ideally as a link), (4) handle the case where the related entity is deleted or deactivated. Flag many-to-many join tables that have no UI for managing the association.
  • Nullable field handling: For every nullable column, verify the UI allows the user to: (1) leave the field empty on create, (2) clear a previously-set value on edit (not just change it — actually null it out), (3) distinguish between "not set" and "set to empty string" if both are valid.
  • Bulk operations: If records are commonly created or updated in batches, verify bulk create, bulk edit, and bulk delete are available. Flag workflows where a user would need to repeat the same single-record operation 50+ times.
  • Soft delete & archive: If the schema supports soft delete (deleted_at, is_archived), verify the UI: (1) allows soft-deleting, (2) shows archived/deleted records in a separate view or filter, (3) allows restoring soft-deleted records, (4) prevents editing of soft-deleted records.
  • Default values & auto-population: For columns with database defaults, verify the create form either pre-fills the default or clearly communicates what will happen if the field is left empty. Flag cases where the database default differs from what the UI implies (e.g., form shows empty but DB defaults to "draft").
  • Computed & derived fields: For fields calculated from other data (totals, averages, statuses derived from business rules), verify they are displayed in the UI even if not directly editable. Users should be able to see the computed result and understand what drives it.

Calibration

A core entity (orders, customers, products) with columns that can only be set via database is critical. A system/audit table (logs, events) with fields not exposed in the UI is expected and low priority. Weight findings by: (1) how often users need to set the field, (2) whether the field affects business logic or display, (3) whether a workaround exists (API endpoint vs. raw SQL).

Output Format

Start with a 3-5 line executive summary: total tables, total user-facing columns, percentage with full CRUD coverage, and the single most impactful gap.

  1. Coverage Matrix — Table with columns: Table Name | Total Columns | UI-Exposed (Create) | UI-Exposed (Edit) | UI-Exposed (Read/List) | Filterable | Coverage %
  2. Missing Fields — For each gap: table, column, data type, why it should be exposed, which view it belongs in, and the form component to use
  3. Unreachable States — Enum values or status transitions that have no UI path, with the trigger mechanism needed
  4. Relationship Gaps — FK fields without pickers, many-to-many without management UI, broken entity links
  5. Positive Findings — Tables with complete coverage that can serve as patterns

Need help applying this to a real product?

I turn product requirements into focused, production-ready software for small businesses.