Skip to content

Structure

PreviousNext

Where every file lives and why.

src/
  proxy.ts                     locale redirect + optimistic admin gate
  mdx-components.tsx           typography for the docs
  app/[lang]/
    (site)/…                   public pages — thin wrappers (mirror pattern)
    (site)/docs/[[...slug]]    this documentation
    admin/login, admin/…   staff area (noindex)
  components/
    ui/                        shadcn primitives (untouched upstream code)
    atom/                      compositions: cta, media-frame, page-hero, prose, …
    template/                  site header/footer, mobile action bar
    site/<feature>/            content · queries · actions · validation · form · config
    admin/<feature>/           the matching admin screens and actions
    docs/                      docs sidebar, table of contents, copy page, callouts
    internationalization/      config, dictionaries (ar/en per namespace)
  config/site.ts               contact channels, social, location
  lib/                         db, auth, time, format, validation, guard, seo, source
content/
  docs-en/, docs-ar/           documentation pages (MDX) + meta.json order
prisma/schema.prisma           content + operations models

Feature folder

Every feature in src/components/site/<feature> uses the same file names:

FileRole
content.tsxServer Component the route renders
queries.tsDatabase reads
actions.tsServer Actions
validation.tsZod schemas shared by the form and the action
form.tsxClient form
config.tsStatic configuration for the feature