Directories

Directory database schema

Categories and listings in the Directory Starter. New listings stay pending until you publish them.

1 min read

The Directory Starter is two models.

model Category { id String @id @default(cuid()) slug String @unique name String listings Listing[] }
model Listing {
  slug String @unique
  title String
  summary String
  url String
  categoryId String
  status String @default("pending")
  createdAt DateTime @default(now())
}

status defaults to "pending". Public pages and the sitemap should query published listings only. A pending submission still has a unique slug, but that slug is not a public URL yet.

url is the outbound link for the listing. summary is the text you can use in the meta description. Category slug groups the index.

How those pages are rendered is building a directory with Next.js. Which rows get metadata is SEO architecture for large Next.js directories. A sitemap that follows the same filter is dynamic sitemap architecture.

Product updates for developers shipping with Designyff kits.

Purchased source may be used in personal, commercial, and client projects. Do not redistribute or resell the original source. Terms of Service

Designyff © 2026 | Starter kits for developers | Powered by  Tacko