# File Structure

## File Structure

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

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

<FileTree>

- consultiz/
  - .cursor/rules/theme-architecture.mdc rules for Cursor
  - .github/
    - copilot-instructions.md instructions for GitHub Copilot
    - workflows/verify.yml a `verify` workflow for GitHub Actions
  - .vscode/ recommended VS Code extensions and settings
  - .windsurf/rules/theme-architecture.md rules for Windsurf
  - public/ files served as they are (images, favicons, videos, PDFs, `_headers`, and `.htaccess` for Apache)
  - scripts/ helper scripts behind the `npm run` commands
  - src/
    - \_\_tests\_\_/ the theme's unit tests
    - assets/
      - images/ **your images** (logos, photos, icons), optimized at build time
    - **config/** site-wide settings
      - config.toml site name, URL, phone, email, forms, SEO, cookies, motion
      - 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 reusable section
        - english/
        - french/
        - arabic/
      - homepage/ the three homepages (main, corporate consulting, tax and accounting)
      - solutions/ industries/ solution and industry pages (`-index.md` is the list page)
      - blog/ people/ careers/ … one folder per page or collection
      - \_file\_format.md the frontmatter fields every page accepts, with comments
    - i18n/ small interface text (labels, form messages, footer text, address and hours)
      - en.json
      - fr.json
      - ar.json
    - layouts/
      - Base.astro the page shell (head, header, footer, scripts)
      - components/
        - sections/ one component per section, and `section-ownership.md`, which lists them all
        - cards/ cards used inside sections and lists
        - widgets/ smaller parts (forms, page header, breadcrumbs, cookie banner)
        - global/ logo, head tags, and the footers
          - header/ the header, top bar, menu, and contact drawer
          - footer/ the **Ask AI** row and the theme credit
        - seo/ meta tags, Open Graph, and structured data
        - utilities/ images and the cursor follower
      - helpers/ icon components
      - shortcodes/ components you can use inside MDX files
    - lib/ helper code (content loading, i18n, SEO, AI files)
    - pages/
      - [...lang]/ **one file per route** (which sections a page shows, in which order), and `llms.txt.ts`
      - [lang]/404.astro the 404 page of each other language
      - 404.astro the 404 page of the default language
      - [...path].md.ts the Markdown copies of pages
      - robots.txt.ts builds `robots.txt`
    - plugins/ types/ build plugins and shared types
    - **styles/**
      - theme.css colors, type scale, breakpoints
      - navigation.css base.css buttons.css … global styles
    - content.config.ts fields allowed in each collection
    - sections.schema.ts fields allowed in each section and page block
    - page-content.schema.ts fields of the solution, industry, and case study pages
  - AGENTS.md the full rules for AI assistants
  - SKILLS.md step-by-step recipes for common jobs
  - CLAUDE.md GEMINI.md short files that import `AGENTS.md`
  - CHANGELOG.md what changed in each version
  - NEXTJS-TO-ASTRO-GUIDE.md a developer guide to the theme's structure, for React and Next.js developers
  - PUBLIC-VALUES-NEEDED.md the demo values to replace before launch
  - README.md editing map, override rules, and launch notes
  - astro.config.mjs tsconfig.json jest.config.ts
  - netlify.toml vercel.json vercel.sh wrangler.toml hosting settings
  - package.json package-lock.json

</FileTree>

### What Differs By Edition
The tree above is the Astro edition. The other two change these parts:

| Edition | Adds                                                                                                                                  | Changes or leaves out                                                                                                                                                                  |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Tina    | `tina/` (the editor's forms), `scripts/tina/`, `scripts/cms/`, `src/lib/tina/`, `src/layouts/components/tina/`, `.env.example`        | The list pages of `blog/` and `portfolio/` and every file in `pages/` are `.mdx` instead of `.md`. `npm run dev` runs `scripts/tina/run.mjs` instead of `scripts/dev.mjs`            |
| Sanity  | `sanity/` (the Studio's schema and the bundled sample content), `sanity.config.ts`, `sanity.cli.ts`, `scripts/sanity/`, `src/lib/sanity/`, `src/sanity-routes/`, `src/middleware.ts`, `.env.example` | No `src/content/`, no `src/i18n/`, no `src/config/menu.*.json`, and no `NEXTJS-TO-ASTRO-GUIDE.md`. That content is in your Sanity project, or in `sanity/seed/demo-content.json` until you connect one |

### The Three Layers
Consultiz keeps three jobs apart. Knowing which layer you need saves a lot of searching:

| Layer       | Folder                        | Decides                                          | You edit it to…                     |
| ----------- | ----------------------------- | ------------------------------------------------ | ----------------------------------- |
| **Content** | `src/content/`                | What the page says: text, images, links, options | Change copy, lists, buttons, images |
| **Pages**   | `src/pages/[...lang]/`        | Which sections a page shows and in which order   | Reorder, add, or remove sections    |
| **Design**  | `src/layouts/`, `src/styles/` | How each section looks and behaves               | Change markup, styles, or behavior  |

Global settings sit beside them in `src/config/`. In the Sanity edition, the content layer is your Sanity project instead of `src/content/`.

### How Content Folders Are Named
Every content folder has one subfolder per language, and a few file name rules:

- `english/`, `french/`, and `arabic/` hold the same files. Each language reads only its own folder, so keep them in step when you add or rename a file.
- `-index.md` is the content of a list or landing page, for example `src/content/blog/english/-index.md` for the blog list pages.
- Every other file is one entry, and its name becomes the URL: `src/content/solutions/english/cost-optimization.md` is `/solutions/cost-optimization/`.
- Files that start with `_` are ignored. `src/content/_file_format.md` explains the frontmatter fields every page accepts.

A few folders hold the content of one specialized page rather than a list: `industry-style-01/`, `industry-style-02/`, `solution-style-01/`, and `solution-style-02/`. See [Pages](../../customization/pages/).

<Aside type="note">
  `.astro/` and `dist/` are created for you when you run the site. Never edit
  them; your changes would be overwritten. `.astro/config.generated.json` is
  made from `config.toml`, so always edit the TOML file.
</Aside>

### Path Shortcuts In Code
Component files import each other through shortcuts defined in `tsconfig.json`:

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

There is no `src/components/` folder: `@/components/sections/faq/FaqCentered.astro` is `src/layouts/components/sections/faq/FaqCentered.astro`.