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

# Theme Structure

> Understanding the architecture and components

The Kiwify Members Area theme system follows a modular architecture inspired by Shopify. This document provides an overview of how the components work together to create a customizable learning experience.

## Directory Structure

```
theme-name/
├── templates/
│   ├── index.json
│   └── login.json
├── sections/
│   └── [...].liquid
├── locales/
│   ├── en.default.json
│   ├── es.default.json
│   ├── pt.default.json
│   ├── en.schema.json
│   ├── es.schema.json
│   └── pt.schema.json
└── snippets/
    └──[...].liquid
```

## Core Components

> [card] [Templates](https://docs.kiwify.com.br/en/members-area/key-concepts/theme/templates.md)
>
> JSON files that define page structure and content

> [card] [Sections](https://docs.kiwify.com.br/en/members-area/key-concepts/theme/sections.md)
>
> Reusable .liquid components for page content

> [card] [Locales](https://docs.kiwify.com.br/en/members-area/key-concepts/theme/locales.md)
>
> Translation files for multiple languages

> [card] [Snippets](https://docs.kiwify.com.br/en/members-area/key-concepts/theme/snippets.md)
>
> Reusable code fragments shared across sections

## How These Components Work Together

**1. Templates Define Structure**

[Templates](https://docs.kiwify.com.br/en/members-area/key-concepts/theme/templates.md) are JSON files that define which sections appear on a page and their order. They also store configuration data for each section.

**2. Sections Provide Content**

[Sections](https://docs.kiwify.com.br/en/members-area/key-concepts/theme/sections.md) are Liquid files that render the actual content on the page. They can be customized through the theme editor settings defined in their schema.

**3. Snippets Add Reusability**

[Snippets](https://docs.kiwify.com.br/en/members-area/key-concepts/theme/snippets.md) are reusable code fragments that can be included in sections to maintain consistency and reduce duplication.

**4. Locales Enable Translation**

[Locales](https://docs.kiwify.com.br/en/members-area/key-concepts/theme/locales.md) provide translation capabilities, allowing your theme to support multiple languages.

## Data Flow

> [accordion] How Data Flows Through Your Theme
>
> 1. The Members Area loads the appropriate template JSON file (index.json or login.json)
> 2. It reads the sections and their order from the template
> 3. For each section, it:
>    * Loads the section's Liquid file
>    * Passes the section's settings from the template to the section
>    * Renders the section with its data
> 4. Within sections, you can:
>    * Access global objects like `all_courses`
>    * Render snippets for reusable UI components
>    * Use translations via the `t` filter

## Available Global Objects

Check [Objects Overview](https://docs.kiwify.com.br/en/members-area/reference/objects.md) for a complete list and more details.

> [card] [all\_courses](https://docs.kiwify.com.br/members-area/objects/all_courses)
>
> Access to all courses the user has permission to view

> [card] [all\_modules](https://docs.kiwify.com.br/members-area/objects/all_modules)
>
> Access to all modules across all courses

> [card] [all\_lessons](https://docs.kiwify.com.br/members-area/objects/all_lessons)
>
> Access to all lessons across all modules

> [card] [last\_watched\_lessons](https://docs.kiwify.com.br/members-area/objects/last_watched_lessons)
>
> Array of recently viewed lesson IDs

## Styling

> [!NOTE]
>
> Kiwify themes use TailwindCSS for styling, a utility-first CSS framework that allows you to style elements directly in your HTML/Liquid markup.

## Available Libraries

The theme runtime environment includes the following libraries available for use:

* [Embla Carousel](https://www.embla-carousel.com/): for creating carousels
* [Microtip](https://microtip.vercel.app/): for displaying tooltips

For more information, consult the documentation of the respective libraries. The default Kiwify theme contains usage examples.

## Limitations

> [!WARNING]
>
> * JavaScript is not currently supported in theme files
> * Only two pages can be customized (index and login)
> * Maximum of 25 sections per template
> * Maximum of 50 blocks per section

## Learn More

For detailed information about each component, visit the dedicated documentation pages:

* [Templates](https://docs.kiwify.com.br/en/members-area/key-concepts/theme/templates.md)
* [Sections](https://docs.kiwify.com.br/en/members-area/key-concepts/theme/sections.md)
* [Locales](https://docs.kiwify.com.br/en/members-area/key-concepts/theme/locales.md)
* [Snippets](https://docs.kiwify.com.br/en/members-area/key-concepts/theme/snippets.md)


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