# File Structure

## File Structure

**Skill level:** Everyone · **Time:** 5 minutes

### Inside The Theme Folder
You don't need to understand every folder. Most changes happen in the places marked in **bold** below.

<FileTree>

- covena/
  - .cursor/
    - rules/
      - theme-architecture.mdc rules for the Cursor editor
  - .github/
    - copilot-instructions.md instructions for GitHub Copilot
    - workflows/
      - verify.yml runs `npm run verify` on GitHub
  - .vscode/ recommended VS Code extensions and settings
  - .windsurf/
    - rules/
      - theme-architecture.md rules for the Windsurf editor
  - public/ files served as they are (favicons, the shared social image, and the `_headers` and `.htaccess` host settings)
  - scripts/ helper scripts behind the `npm run` commands, and the checks `npm run verify` runs
  - src/
    - \_\_tests\_\_/ unit tests (`npm run test`)
    - assets/
      - images/ **your images**, optimized at build time
        - covena/ demo photos, one folder per area (attorneys, hero, practice, office, blog, …)
        - icons/ social and custom icons
        - logo.svg the logo file for light backgrounds
        - logo-light.svg the logo file for dark backgrounds
        - favicon.png the source of the favicons
    - **config/** site-wide settings
      - config.toml site name, URL, contact details, forms, header, quick exit, motion, SEO, cookies
      - fonts.json fonts
      - language.json languages
      - menu.en.json header and footer links (English)
      - menu.fr.json header and footer links (French)
      - menu.ar.json header and footer links (Arabic)
      - social.json social media links
    - **content/** all text, images, and options
      - sections/ default content of every section
        - english/
        - french/
        - arabic/
      - homepage/ the 3 homepages (`-index.md`, `home-corporate.md`, `home-family.md`)
      - practice-areas/ one file per practice area
      - industries/ one file per industry
      - attorneys/ one file per lawyer
      - results/ one file per case result
      - offices/ one file per office
      - careers/ one file per open role
      - blog/ insights posts (published under `/insights/`)
      - about/ contact/ consultation/ faq/ fees/ recognition/ reviews/ one folder per single page
      - pages/ legal pages and the component gallery
      - \_file_format.md every page frontmatter field, explained
    - i18n/ small interface text (button labels, form messages, footer text, the main address)
      - en.json
      - fr.json
      - ar.json
    - layouts/
      - Base.astro the page shell (head, header, footer, cookie banner, scripts)
      - components/
        - sections/ one component per section, grouped by kind (`hero/`, `practice/`, `team/`, …)
          - section-ownership.md every section, its content file, and the pages that use it
        - global/ header, footers, logo, head tags
        - cards/ attorney, insight, office, and result cards
        - widgets/ forms, accordion, marquee, cookie banner, back-to-top button
      - shortcodes/ components you can use in Markdown (MDX) files
    - lib/ helpers: content loading, routes, motion, SEO, forms
    - pages/
      - [...lang]/ one file per route, listing the sections of that page in order
    - styles/
      - **theme.css** colors, radii, spacing, type scale, breakpoints
      - motion.css scroll motion styles
    - content.config.ts the fields each collection accepts
    - sections.schema.ts the fields each section accepts
  - AGENTS.md instructions for AI coding tools (read by most of them)
  - CLAUDE.md for Claude Code (imports AGENTS.md)
  - GEMINI.md for Gemini CLI (imports AGENTS.md)
  - SKILLS.md step-by-step recipes for common jobs
  - README.md setup, features, and the launch list
  - PUBLIC-VALUES-NEEDED.md every demo value to replace, and the file it lives in
  - CHANGELOG.md what changed in each version
  - astro.config.mjs Astro settings
  - netlify.toml, vercel.json, vercel.sh, wrangler.toml host settings
  - package.json
  - package-lock.json

</FileTree>

<Aside type="caution">
  `.astro/` and `dist/` are created for you when you run the site. Don't edit
  them: `.astro/config.generated.json` is rebuilt from `config.toml`, and
  `dist/` is rebuilt on every `npm run build`.
</Aside>

### The Three Layers
Covena keeps three things apart, so you can change one without touching the others:

| Layer       | What it is                                          | Where                                       |
| ----------- | --------------------------------------------------- | ------------------------------------------- |
| **Content** | Text, images, buttons, lists, and per-page changes  | `src/content/`, `src/i18n/`, `src/config/` |
| **Layout**  | Which sections a page shows, and in which order     | `src/pages/[...lang]/`                      |
| **Look**    | Colors, type, spacing, and how each section is drawn | `src/styles/`, `src/layouts/components/`   |

Most buyers only ever touch the content layer. See [How Covena Works](/covena/getting-started/how-covena-works/).

### How Content Folders Are Named
Every folder in `src/content/` has one subfolder per language, named after the language (`english`, `french`, `arabic`). The language files in `src/i18n/` and the menus in `src/config/` use the short code instead (`en`, `fr`, `ar`). Both names are set in `src/config/language.json`.

Inside a collection folder, `-index.md` sets up the list page and each other file is one detail page, named after its address:

| File                                                  | Page                              |
| ----------------------------------------------------- | --------------------------------- |
| `src/content/practice-areas/english/-index.md`        | `/practice-areas/`                |
| `src/content/practice-areas/english/employment.md`    | `/practice-areas/employment/`     |
| `src/content/practice-areas/french/employment.md`     | `/fr/practice-areas/employment/`  |
| `src/content/blog/english/first-consultation-what-happens.mdx` | `/insights/first-consultation-what-happens/` |

Keep the same file name in every language folder, so the language switcher can find the matching page.

### Path Shortcuts In Code
Components import each other with short paths set in `tsconfig.json`:

| Shortcut         | Folder                       |
| ---------------- | ---------------------------- |
| `@/components/*` | `src/layouts/components/*`   |
| `@/shortcodes/*` | `src/layouts/shortcodes/*`   |
| `@/helpers/*`    | `src/layouts/helpers/*`      |
| `@/*`            | `src/*`                      |

For example, `@/components/sections/hero/HeroPortraitNavy.astro` is `src/layouts/components/sections/hero/HeroPortraitNavy.astro`.