# Extend with Code

**Purpose**: Expand the app's capabilities and scale for production.

**How It Works**: Utilize custom code widgets, integrate external REST APIs, or connect with other tools and services to create a robust, scalable application. Buzzy AI can help you generate code widgets, or you might call on a developer at this point - see the [Buzzy Marketplace](https://marketplace.buzzy.buzz/) for options!

**Key Features**: Scalability, third-party integrations, advanced security, and compliance features.

**Outcome**: A full-stack, production-ready application hosted on a secure Kubernetes infrastructure.

{% hint style="info" %}
For more complicated integration and extensions, it helps to have some dev skills (or access to someone who does)! If you find this daunting or are getting stuck, you might want to call on an expert via the [Buzzy Marketplace](https://marketplace.buzzy.buzz/).
{% endhint %}

***

## Custom code widgets

Custom code widgets allow you to embed custom code in your Buzzy app. Use **embedded markup** for static html or SVG, a **sandboxed iframe** if you have custom code (eg JavaScript), or a **trusted iframe** to embed media such as Youtube or Vimeo.

There are three different ways of using code widgets in your app when it comes to having them present or process app data:

1. Using data from the current row
2. Using data from a child table in a custom format
3. Using data from another table or tables

Learn more about using Buzzy code widgets here:

{% content-ref url="/pages/f4DDPjjRh53ntgsH7wxJ" %}
[Code widget (custom code)](/the-building-blocks/code-widget-custom-code.md)
{% endcontent-ref %}

### Examples

{% content-ref url="/pages/rC6jDlAwZFbmV97rvRXz" %}
[Image Galley Slideshow](/the-building-blocks/code-widget-custom-code/examples/image-galley-slideshow.md)
{% endcontent-ref %}

{% content-ref url="/pages/NHXPealkMyameOcdYluI" %}
[Ratings Average and Distribution](/the-building-blocks/code-widget-custom-code/examples/ratings-average-and-distribution.md)
{% endcontent-ref %}

{% content-ref url="/pages/2tovlgva23UvBQwazXv6" %}
[Event Locations Map](/the-building-blocks/code-widget-custom-code/examples/event-locations-map.md)
{% endcontent-ref %}

***

## Rest API

The Buzzy REST APIs (which are a type of web API) involve requests and responses. You make a request to a resource stored on the server, and the server responds with the requested information. The protocol used to transport the data is HTTP(S). “REST” stands for Representational State Transfer.

Learn more about The Rest API here:

{% content-ref url="/pages/MrUIbfAzPgMlOy6qhpcb" %}
[Buzzy REST API](/rest-api/buzzy-rest-api.md)
{% endcontent-ref %}

### Examples

{% content-ref url="/pages/9sF5zZa0dRZyaemUnuve" %}
[Integrating 3rd party applications](/rest-api/buzzy-rest-api/integrating-3rd-party-applications.md)
{% endcontent-ref %}

{% content-ref url="/pages/OoEFQmIhuI4QTiim8QBt" %}
[Integrating with Mailchimp](/rest-api/buzzy-rest-api/integrating-with-mailchimp.md)
{% endcontent-ref %}

***

## Datatable Rules

Datatables provide the ability to fire rules on events (eg update, click , new row created) that allow Actions to be called.

### Examples

{% content-ref url="/pages/TVlMtbS8M1FPawC9vg4h" %}
[Datatable to Datatable Relationships](/the-building-blocks/datatables-fields-and-data/datatable-to-datatable-relationships.md)
{% endcontent-ref %}

***

## A real live app example - with code snippets!

Beginning life as an idea turned into a prompt turned into a simple MVP via Buzzy AI, which was extended with an AI-powered recommendations engine, the [AI Strategy Plan App](https://app.aistrategyplan.com/) is a great example of the Buzzy **Kickstart/Enhance/Extend process**. Get the low-down here:

{% embed url="<https://www.buzzy.buzz/post/building-the-ai-strategy-app-with-buzzy-a-case-study>" %}

{% embed url="<https://www.buzzy.buzz/post/building-the-ai-strategy-app-with-buzzy>" %}


---

# 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://docs.buzzy.buzz/working-with-buzzy/buzzy-ai/extend-with-code.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.
