# What Is the Purpose of the `public` Directory in open‑seo?

> Discover the purpose of the public directory in open-seo. Learn how it stores static assets served directly to the browser for instant access at your site's root URL.

- Repository: [Every App/open-seo](https://github.com/every-app/open-seo)
- Tags: internals
- Published: 2026-08-16

---

**The `public` directory in open‑seo stores static assets that are served directly to the browser without build‑time processing, making files instantly available at the site's root URL.**

The `public` folder is a standard convention in modern frontend frameworks, and the **every-app/open‑seo** repository follows this pattern. Files placed here are copied as‑is to the final web output, bypassing compilation steps like bundling or minification. This enables direct access via simple relative paths and supports Progressive Web App (PWA) functionality through icons and manifest files.

## What Files Live in the `public` Directory

Based on the source structure, typical contents include:

- **`favicon.ico`**, **`favicon.png`**, **`favicon-32x32.png`**, **`favicon-16x16.png`** — Browser favicons for tabs and bookmarks
- **`apple-touch-icon.png`** — iOS home screen icon when users add the site to their home screen
- **`android-chrome-192x192.png`**, **`android-chrome-512x512.png`** — Android and PWA icons
- **`transparent-logo.png`** — Logo asset referenced by the UI or documentation
- **`site.webmanifest`** — Web App Manifest defining PWA metadata

## How the `public` Directory Works in open‑seo

During the build process (via Vite or Cloudflare Workers), everything inside `public/` is **emitted unchanged** to the deployment root. A request to `https://<your-domain>/favicon.ico` returns the exact file stored at `public/favicon.ico`.

This behavior enables three key benefits:

1. **Performance optimization** — Static assets bypass server‑side rendering and receive efficient cache headers (e.g., `Cache-Control: public, max-age=86400, immutable`)
2. **PWA compliance** — The `site.webmanifest` and icon set satisfy requirements for installable web applications
3. **Developer simplicity** — Assets can be added without modifying build configuration or import statements

## Referencing public Assets in Code

### React/Next.js Component Example

```tsx
import Head from 'next/head';

export default function Layout() {
  return (
    <Head>
      {/* Resolved automatically from public/favicon.ico */}
      <link rel="icon" href="/favicon.ico" />
      <link rel="manifest" href="/site.webmanifest" />
    </Head>
  );
}

```

### Direct HTML Reference

```html
<!-- Points to public/transparent-logo.png -->
<img src="/transparent-logo.png" alt="Open-SEO logo" />

```

## Key Source Files in every-app/open‑seo

| Path | Purpose |
|------|---------|
| `public/favicon.ico` | Default favicon served at site root |
| `public/site.webmanifest` | PWA manifest with theme colors and icon definitions |
| `public/transparent-logo.png` | Brand logo for UI consumption |

These files demonstrate that the `public` directory serves as the **static asset root**: content is deployed verbatim and exposed directly to end‑users without transformation.

## Summary

- The **`public` directory** holds static, unprocessed files in open‑seo
- Assets are **copied as‑is** to the deployment root during build
- Files are **accessible via root-relative paths** (`/filename`)
- Contents include **favicons, PWA icons, logos, and the web app manifest**
- This setup enables **caching efficiency**, **PWA functionality**, and **zero‑config asset management**

## Frequently Asked Questions

### Can I use subdirectories inside the `public` folder?

Yes. Nested folders within `public/` are preserved in the output structure. A file at `public/images/logo.png` becomes accessible at `/images/logo.png` after deployment.

### Does open‑seo process or optimize files in `public`?

No. Files in `public/` are emitted unchanged. For processed assets like optimized images or bundled scripts, place source files elsewhere in the project and import them through the build system.

### Why does open‑seo include multiple favicon sizes?

Different platforms and devices require specific icon dimensions. The `favicon-16x16.png` and `favicon-32x32.png` serve browser tabs, while `android-chrome-*.png` files support Android PWA installation and `apple-touch-icon.png` supports iOS home screen shortcuts.

### What happens if a `public` file conflicts with a dynamic route?

Most frameworks prioritize static files in `public/` over dynamic routes. In open‑seo, a request matching both a `public/` asset and a server‑rendered path will return the static file.