# Packages

Frontity projects are built around the idea of packages that encapsulate logic that can be reused across projects. Frontity packages may be considered as the equivalent of WordPress plugins. They're the ingredients of the final Frontity project.

## How to use Frontity packages

Frontity packages are available via [npm](https://www.npmjs.com/search?q=keywords:frontity) and they can be installed as dependencies of your Frontity project (as with any other Node project).

Frontity needs to know the packages we're going to use in the project and how we want to use them. We can set this in the `frontity.settings.js` file, where we can define and configure the packages (by using Namespaces) for the Frontity project.

{% hint style="info" %}
We're going to focus on the use of Frontity packages at a Frontity project level, but the same applies if you're creating a custom Frontity package. You can see more info about how to create your custom package [here](https://api.frontity.org/frontity-cli/create-commands/create-package).
{% endhint %}

## Official Frontity Packages

The official Frontity packages are those created and maintained by the [Frontity Team](https://frontity.org/about-us/).

These packages encapsulate the logic to apply the main features needed in a WordPress + React stack project managed by Frontity.

A Frontity project is basically the sum of the **Core package** plus a selection of **Features packages**. You can also use **Collections packages** to help speed up the development of your Frontity project.

{% hint style="info" %}
The [full list of packages](https://www.npmjs.com/search?q=keywords:frontity) includes others created by the community, such as [these themes](https://api.frontity.org/themes-packages#community-themes) and [these features packages](https://api.frontity.org/features-packages#community-packages). However, only the official `frontity` packages that have a public API are fully documented here.
{% endhint %}

### 💙 [Core package](https://api.frontity.org/frontity-packages/core-package)

This package is the core of the Frontity framework and provides the main utilities of the framework.

* [`frontity`](https://api.frontity.org/frontity-packages/core-package/frontity)

### 🎨 [Themes packages](https://api.frontity.org/frontity-packages/themes-packages)

These packages contain the React project used to render the final output (both in client and server side).

* [`@frontity/mars-theme`](https://api.frontity.org/frontity-packages/themes-packages/frontity-mars-theme)
* [`@frontity/twentytwenty-theme`](https://api.frontity.org/frontity-packages/themes-packages/frontity-twentytwenty-theme)

### ⚡️ [Features packages](https://api.frontity.org/frontity-packages/features-packages)

#### Source package

This package is in charge of getting data from WordPress and make it accesible from React components.

* [`@frontity/wp-source`](https://api.frontity.org/frontity-packages/features-packages/wp-source)

#### Router package

This package is in charge of managing (React) routes in a Frontity project.

* [`@frontity/tiny-router`](https://api.frontity.org/frontity-packages/features-packages/tiny-router)

#### Render package

This package is in charge of converting HTML to React.

* [`@frontity/html2react`](https://api.frontity.org/frontity-packages/features-packages/html2react)

#### SEO packages

These packages are designed to get automatically all the data from WordPress SEO plugins and render it (along with the content) in the final HTML.

* [`@frontity/head-tags`](https://api.frontity.org/frontity-packages/features-packages/head-tags)
* [`@frontity/yoast`](https://api.frontity.org/frontity-packages/features-packages/yoast)

#### Ads packages

These packages allow you to insert ads in your Frontity projects from services such as Google Ad Manager.

* [`@frontity/google-ad-manager`](https://api.frontity.org/frontity-packages/features-packages/google-ad-manager)
* [`@frontity/smart-adserver`](https://api.frontity.org/frontity-packages/features-packages/smart-ads)

#### Analytics packages

A set of official Analytics Frontity packages that you can use to easily add analytics services to your project.

* [`@frontity/google-analytics`](https://api.frontity.org/frontity-packages/features-packages/analytics/google-analytics)
* [`@frontity/google-tag-manager-analytics`](https://api.frontity.org/frontity-packages/features-packages/analytics/google-tag-manager-analytics)
* [`@frontity/comscore-analytics`](https://api.frontity.org/frontity-packages/features-packages/analytics/comscore-analytics)

#### Comments packages

This package adds support for WordPress' native comments.

* [`@frontity/wp-comments`](https://api.frontity.org/frontity-packages/features-packages/wp-comments)

### 📚 Collections packages

These packages are collections of useful components or hooks that you can use in your Frontity project.

* [`@frontity/components`](https://api.frontity.org/frontity-packages/collections-packages/components)
* [`@frontity/hooks`](https://api.frontity.org/frontity-packages/collections-packages/hooks)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.frontity.org/frontity-packages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
