> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doglytdc.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Folder structure

> Every file a new script receives, how they are organized and what each one controls.

Every DoglyTdc script is a **repository** with branches, commits and versions. When you create a script (in the panel or through AI with `create_script`), it starts with this folder:

```text theme={null}
my-script/
├── doglytdc.json               script data (name, category, access, version)
├── README.md                   what "Open details" shows
├── SKILL.md                    guide the AI reads before touching the script
├── docs/
│   ├── CARD.md                 card, popup and button guide
│   ├── POPUP.md                popup guide
│   └── usage/*.md              extra usage pages (optional)
├── src/                        the code that runs on the page
│   ├── script.js               entry
│   └── ui/
│       ├── theme.js            colors, corners, font
│       ├── styles.js           CSS generated from the theme
│       ├── button.js           floating button
│       ├── popup.js            script window
│       └── card.js             blocks inside the popup
├── ui/site/                    how the script looks on the site
│   ├── card.html               script card in the list
│   ├── popup.html              details screen
│   ├── styles.css              style of both
│   └── actions.json            @ buttons (copy, install…)
├── painel-dev/                 the script's Dev panel (owner only)
│   ├── painel.json             menu
│   ├── inicio.json             Home parts
│   ├── funcoes/<id>/           functions with their own screen
│   ├── traducoes/<lang>.json   translations
│   └── componentes.md · icones.md · SKILL.md
└── supabase/                   server side of the script (coming soon)
```

## The four parts

> [card] src/ — the script
>
> What runs on the page where the script is used. Goes into the published package.

> [card] ui/site/ — the storefront
>
> The card and details screen on the DoglyTdc site. Applied when you merge into main.

> [card] painel-dev/ — the owner's panel
>
> Menu, Home and functions of your Dev panel. Only you see it.

> [card] supabase/ — the server
>
> Coming soon: this part gets its own documentation.

## What each file is for

| File | What it does | Do you edit it? |
| - | - | - |
| `doglytdc.json` | Name, description (up to 160 characters), category, platforms, access, protection, logo, entry and version. | Yes |
| `README.md` | "Open details" text: how to use it, without revealing the system behind it. | Yes |
| `docs/usage/*.md` | Extra usage pages shown with the README. | Yes |
| `SKILL.md` | Rules for the AI. | Yes |
| `src/script.js` | Entry. Builds button, popup and cards in a Shadow DOM. | Yes |
| `src/ui/theme.js` | The only place for the script's colors and shapes. | Yes |
| `src/ui/*.js` | Button, popup, card and CSS. | Yes, carefully |
| `ui/site/card.html` | Script card in the site list. | Yes |
| `ui/site/popup.html` | Details screen on the site. | Yes |
| `ui/site/styles.css` | Style of the card and details screen. | Yes |
| `ui/site/actions.json` | Buttons marked with `@`. Protected actions (copy, install, buy) stay with DoglyTdc. | Name and position only |
| `painel-dev/` | The whole Dev panel. See [Dev panel](https://docs.doglytdc.dev/en/scripts/dev-panel/overview.md). | Yes |
| `supabase/` | Coming soon. | — |

## What goes into the published package

| Folder | In the package? | When it changes on the site |
| - | - | - |
| `src/` | **Yes**, bundled into one file, minified and (with protection) encrypted. | When you publish a version |
| `ui/site/` | No | When you merge into main |
| `painel-dev/` | No | When you merge into main |
| `README.md`, `docs/` | No | When you merge into main |

* The entry is always `src/script.js`; files use `require("./file.js")` and `module.exports`.
* The final package can be up to **2 MB**. Above that, publishing fails with `PAYLOAD_TOO_LARGE`.

## Workflow

**1. Create a branch**

Never edit main directly. Via MCP: `create_branch`.

**2. Edit the files**

A commit can have up to 100 files.

**3. Validate**

Dev panel: `dev_panel_validate`. Storefront: `validate_presentation`.

**4. Merge into main**

The site, details and Dev panel change right away.

**5. Publish a version**

Only when something in `src/` changed.

## Naming rules

| Item | Rule |
| - | - |
| Dev panel function folder | Lowercase, numbers and `-`, 2 to 32 characters, starting with a letter |
| Translation file | Language code: `pt-BR.json`, `en.json`, `fr.json` |
| File path | Up to 300 characters |
| Commit | Up to 100 files; message of 1 to 200 characters |

> [card] [doglytdc.json](https://docs.doglytdc.dev/en/scripts/folder/doglytdc-json.md)
>
> Every field.

> [card] [Theme, card, popup and button](https://docs.doglytdc.dev/en/scripts/folder/interface.md)
>
> The script's look.

> [card] [Dev panel](https://docs.doglytdc.dev/en/scripts/dev-panel/overview.md)
>
> The owner's panel.

> [card] [Full example](https://docs.doglytdc.dev/en/scripts/folder/full-example.md)
>
> Every template file.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.