# File Structure

## **File Structure**

After unzipping the theme, you will find a structure like this:

<FileTree>

- themes/
  - techbyte/ (📌 Main theme folder, the one with `package.json`)
- changelog.html (🔗 Links to online changelog)
- documentation.html (🔗 Links to online documentation)

</FileTree>

---

### **Main Theme Directory Structure**
This is the Astro edition. The Tina and Sanity editions have the same layout, with the differences listed below.

<FileTree>

- techbyte/
  - .cursor/rules/theme-architecture.mdc (AI file)
  - .github/copilot-instructions.md (AI file)
  - .vscode/
  - .windsurf/rules/theme-architecture.md (AI file)
  - public/
    - .htaccess
    - \_headers
    - \_\_astro_font_generated\_\_/
    - images/
      - favicons/
      - gallery/
      - og-image.jpg
    - plyr/
    - umami.is.js
    - videos/
  - scripts/
    - generate-favicons.mjs
    - generate-multilingual-content.mjs
    - inline-critical-css.mjs
    - remove-draft-from-sitemap.mjs
    - remove-multilingual.mjs
    - toml-watcher.mjs
  - src/
    - \_\_tests\_\_/ (Unit tests)
    - assets/
      - images/
    - config/ (Site-wide settings)
      - config.toml
      - fonts.json
      - language.json
      - menu.ar.json
      - menu.en.json
      - menu.fr.json
      - social.json
    - content/ (Markdown/MDX content, with `arabic/`, `english/`, and `french/` inside each folder)
      - about-us/
      - author/
      - blog/
      - contact/
      - faq/
      - homepage/
      - pages/
      - pricing/
      - projects/
      - sections/
      - services/
      - team/
      - testimonial/
    - i18n/
      - ar.json
      - en.json
      - fr.json
    - layouts/
      - components/
        - cards/
        - global/
          - footer/
          - header/
          - Footer.astro
          - FooterCopyright.astro
          - FooterTwo.astro
          - Head.astro
          - Logo.astro
          - SectionBadge.astro
          - SectionTitle.astro
        - sections/
        - seo/
        - utilities/
        - widgets/
        - BlogLayout.astro
        - BlogSinglePageLayout.astro
        - Button.astro
        - ButtonContent.astro
        - ProjectsSingle.astro
        - ServicesSingle.astro
        - SinglePageLayout.astro
      - helpers/
      - shortcodes/
      - Base.astro
    - lib/
      - integrations/
      - utils/
      - contentParser.astro
      - iconNames.ts
      - shortcodes.ts
      - taxonomyParser.astro
    - pages/
      - [...lang]/
        - blog/
        - projects/
        - services/
        - team/
        - 404.astro
        - [page].astro
        - about.astro
        - contact.astro
        - faq.astro
        - home-two.astro
        - index.astro
        - llms-full.txt.ts
        - llms.txt.ts
        - pricing.astro
      - [...path].md.ts
      - 404.astro
      - robots.txt.ts
    - plugins/
      - odometer/
      - fontTailwindPlugin.js
      - scroll-menu.ts
      - sticky-sidebar.js
    - styles/
      - animation.css
      - base.css
      - buttons.css
      - components.css
      - global.css
      - mobile-compact.css
      - navigation.css
      - rtl.css
      - safe.css
      - theme.css
      - utilities.css
    - types/
    - content.config.ts
    - enum.ts
    - env.d.ts
    - sections.schema.ts
  - .editorconfig
  - .gitignore
  - .markdownlint.json
  - .prettierrc
  - AGENTS.md (AI file)
  - CHANGELOG.md
  - CLAUDE.md (AI file)
  - GEMINI.md (AI file)
  - README.md
  - SKILLS.md (AI file)
  - astro.config.mjs
  - jest.config.ts
  - netlify.toml
  - package-lock.json
  - package.json
  - pnpm-workspace.yaml
  - tsconfig.jest.json
  - tsconfig.json
  - vercel.json
  - vercel.sh
  - wrangler.toml

</FileTree>

---

#### What Differs By Edition

| Path                                                                                                  | Astro | Tina | Sanity |
| ----------------------------------------------------------------------------------------------------- | ----- | ---- | ------ |
| `src/content/`, `src/i18n/`, `src/config/menu.<lang>.json`, `src/lib/shortcodes.ts`                   | Yes   | Yes  | No. Content, labels, and menus are documents in your Sanity project |
| `.env.example`                                                                                        | No    | Yes  | Yes    |
| `tina/`, `scripts/tina/`, `scripts/cms/`, `public/admin/`, `src/layouts/components/tina/`, `src/lib/tina/` | No | Yes  | No     |
| `sanity/`, `sanity.config.ts`, `sanity.cli.ts`, `scripts/sanity/`, `scripts/dev.mjs`, `src/lib/sanity/`, `src/sanity-routes/`, `src/middleware.ts` | No | No | Yes |

In the Sanity edition, the demo content is in `sanity/seed/demo-content.json`. In the Tina edition, the blog, projects, and services listing pages and the privacy policy and terms are `.mdx` files, not `.md`.

The folder inside `themes/` can have a different name in each edition. It's always the one with `package.json`.

#### Key Directories & Their Purpose

##### `/public` ⟶ Static Assets

- Stores favicons, the Open Graph image, videos, and other files served as they are.
- Files in this folder are available by URL, such as `/images/og-image.jpg`.

##### `/src/assets/images` ⟶ Theme Images

- A path such as `/images/logo.png` in your settings or content points to this folder.

##### `/src/content` ⟶ Editable Theme Content

- Holds almost all user-editable content for pages and reusable sections.
- Each language has its own folder inside each collection: `english/`, `french/`, and `arabic/`.

##### `/src/layouts` ⟶ Components, Sections, and Shortcodes

- Techbyte stores its UI components under `src/layouts/components/`.
- The project uses path aliases like `@/components/...`, which map to `src/layouts/components/...`.
- MDX shortcodes live in `src/layouts/shortcodes/`.

##### `/scripts` ⟶ Build Helpers

- `toml-watcher.mjs` generates the settings file from `config.toml`.
- `generate-multilingual-content.mjs` adds a language, and `remove-multilingual.mjs` removes every language except your default one.
- `generate-favicons.mjs` creates favicon assets from the source logo.
- `remove-draft-from-sitemap.mjs` strips draft pages out of the generated sitemap during build.
- `inline-critical-css.mjs` inlines critical CSS into the built pages for faster first paint.

---

#### ⚙️ Key Configuration Files

##### `astro.config.mjs` - Astro Configuration

- Configures Astro integrations, markdown plugins, sitemap generation, image behavior, i18n routing, and Tailwind CSS 4.
- Fonts are generated from `src/config/fonts.json`.

##### `src/config/config.toml` - Global Theme Settings

The main settings file. Most settings have a comment. In the Tina edition, it is **Site settings** at `/admin/`. In the Sanity edition, **Site settings** in the Studio wins over the same value in this file, and the language settings and folder names stay here.

| Section                             | What it controls                                                                 |
| ----------------------------------- | -------------------------------------------------------------------------------- |
| `[site]`, `[site.favicon]`          | `title`, `description`, `tagline`, `taglineSeparator`, `baseUrl`, the logo keys, `trailingSlash`, and the favicon |
| `[seo]`                             | `author`, `keywords`, and `robots`                                               |
| `[seo.robotsTxt]`                   | `robots.txt`, including the `aiSearch` and `aiTraining` crawler switches         |
| `[seo.ai]`                          | `llms.txt`, `llms-full.txt`, and the Markdown copies of your pages               |
| `[seo.sitemap]`                     | The sitemap                                                                      |
| `[settings]`                        | The folder names (`blogFolder`, `serviceFolder`, `projectsFolder`, `testimonialFolder`, `teamFolder`), `pagination`, `stickyHeader`, `pageHeaderDefaultImage`, `contactFormAction`, `contactFormProvider`, `footerDescription`, and `footerBackgroundImage` |
| `[settings.smoothScroll]`           | Smooth scrolling. See [Smooth Scroll](../../features/smooth-scroll/)             |
| `[settings.animation]`              | The fade-in on scroll                                                            |
| `[settings.cursor]`                 | The custom cursor                                                                |
| `[settings.copyright]`              | Has no effect. The copyright line is `footer.copyright` in `src/i18n/<lang>.json` |
| `[settings.themeCredit]`            | The theme credit                                                                 |
| `[settings.pageActions]`            | The Ask AI links. See [AI Links & llms](../../features/ai-links-llms/)           |
| `[settings.subscription]`           | The Mailchimp form. See [Subscription](../../customization/subscription/)        |
| `[settings.multilingual]`           | `enable`, `defaultLanguage`, `disableLanguages`, and `showDefaultLangInUrl`      |
| `[settings.contactInfo]`            | `address`, `email`, `phone`, and `mapLink`                                       |
| `[settings.headerOffcanvas]`        | The small-screen menu panel. See [Header](../../customization/header/)           |
| `[settings.navigationButton]`       | The button in the header                                                         |
| `[settings.announcementBar]`        | The announcement in Header 2's top bar                                           |
| `[settings.markup.tableOfContents]` | The table of contents on detail pages                                            |
| `[opengraph]`                       | `image`, `ogLocale`, `ogType`, `twitter`, and `twitterCard`                      |
| `[head]`                            | `content`: your analytics tags and other code for the page head                  |

##### `src/content.config.ts` - Content Collections

- Defines collections for pages, services, blog, projects, team, testimonials, sections, and more.
- Reuses schemas from `src/sections.schema.ts`.

##### Styling & Fonts

- **Theme tokens and design variables** live in `src/styles/theme.css`.
- **Fonts** are configured in `src/config/fonts.json` (Techbyte ships with Kanit and Syne, plus IBM Plex Sans Arabic for Arabic pages).

#### Files For AI Assistants

| File                                    | Read by                                  |
| --------------------------------------- | ---------------------------------------- |
| `AGENTS.md`                             | The rules every other AI file points to. OpenAI Codex reads it directly |
| `SKILLS.md`                             | Step-by-step recipes for common jobs     |
| `CLAUDE.md`                             | Claude Code                              |
| `GEMINI.md`                             | Gemini CLI                               |
| `.github/copilot-instructions.md`       | GitHub Copilot                           |
| `.cursor/rules/theme-architecture.mdc`  | Cursor                                   |
| `.windsurf/rules/theme-architecture.md` | Windsurf                                 |

#### Other Important Files

- **`package.json`** → Dependencies and npm scripts.
- **`tsconfig.json`** → Path aliases such as `@/components/*`, `@/shortcodes/*`, and `@/helpers/*`.
- **`netlify.toml` / `vercel.json` / `vercel.sh` / `wrangler.toml`** → Deployment configuration. See [Deployment](../../deployment/).

<br />

Now that you understand the structure, the next step is branding the site and configuring the logo.