> For the complete documentation index, see [llms.txt](https://docs.buzzy.buzz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.buzzy.buzz/working-with-buzzy/buzzy-ai/extend-with-code.md).

# Extend with Code

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

**How It Works**: Utilize custom code widgets, Buzzy Functions, constants, REST APIs, or MCP to connect with other tools and services. Buzzy AI and Builder MCP can help generate code widgets or functions, but production integrations should still be reviewed and tested.

**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 integrations and extensions, it helps to have development skills or access to someone who can review the implementation. Use [API and Extension Surfaces](/developing-and-extending-buzzy/api-and-extension-surfaces.md) to choose the right extension point before building.
{% 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](/developing-and-extending-buzzy/buzzy-rest-api.md)
{% endcontent-ref %}

### Examples

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

{% content-ref url="/pages/OoEFQmIhuI4QTiim8QBt" %}
[Integrating with Mailchimp](/developing-and-extending-buzzy/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>" %}
