---
title: "Building ChatGPT Plugins with Supabase Edge Runtime"
description: "A TypeScript template for ChatGPT Plugins runs on Supabase Edge Runtime and provides a path for exposing a TODO API to ChatGPT. The implementation serves the required ai-plugin.json manifest from an Edge Function because static file hosting is not currently supported, and generates an OpenAPI JSON document from endpoint JSDoc annotations with swagger-jsdoc. An Oak router defines TODO routes, while shared CORS headers allow requests from https://chat.openai.com and credentials. Docker configuration runs Edge Runtime locally with a bind-mounted functions directory, enabling changes without rebuilding and exposing requests through localhost:8000. The guide also covers local installation and testing through the ChatGPT UI, then deployment to Fly.io; it notes authentication as a possible next step."
---

# Building ChatGPT Plugins with Supabase Edge Runtime

[Supabase](https://yomu.fyi/company/supabase) · thor\_schaeff · May 15, 2023

**Type:** Tutorial

## Summary

A TypeScript template for ChatGPT Plugins runs on Supabase Edge Runtime and provides a path for exposing a TODO API to ChatGPT. The implementation serves the required ai-plugin.json manifest from an Edge Function because static file hosting is not currently supported, and generates an OpenAPI JSON document from endpoint JSDoc annotations with swagger-jsdoc. An Oak router defines TODO routes, while shared CORS headers allow requests from https://chat.openai.com and credentials. Docker configuration runs Edge Runtime locally with a bind-mounted functions directory, enabling changes without rebuilding and exposing requests through localhost:8000. The guide also covers local installation and testing through the ChatGPT UI, then deployment to Fly.io; it notes authentication as a possible next step.

## Context

ChatGPT Plugins support is rolling out in beta, and the template is intended to help developers get started. Supabase Edge Runtime does not currently support hosting or serving static files, so the required plugin manifest needs to be served through a function.

## Approach / What changed

The template uses TypeScript, Deno Oak, and Supabase Edge Runtime. It imports and serves the ai-plugin.json manifest, generates an OpenAPI JSON document from JSDoc annotations with swagger-jsdoc, adds ChatGPT-specific CORS headers, runs locally in Docker with bind-mounted functions, and provides deployment steps for Fly.io.

## Takeaways

- The ai-plugin.json manifest is served at /.well-known/ai-plugin.json by importing the JSON file into the main function and returning it as an application/json response.
- swagger-jsdoc generates the OpenAPI definition from JSDoc annotations, limiting the endpoints exposed to ChatGPT to those included in the specification.
- The Docker setup maps localhost:8000 to Edge Runtime's container port 9000 and bind-mounts the functions directory, so function changes do not require rebuilding the container.

**Tags:** [Deployment](https://yomu.fyi/topic/deployment), [Docker](https://yomu.fyi/topic/docker), [LLMs](https://yomu.fyi/topic/llm), [Serverless](https://yomu.fyi/topic/serverless), [TypeScript](https://yomu.fyi/topic/typescript)

- Source: [Supabase](https://supabase.com/blog/building-chatgpt-plugins-template)
- Source URL: https://supabase.com/blog/building-chatgpt-plugins-template
- Ingested by Yomu: 2026-08-29T01:18:06.630Z

[Read original post](https://supabase.com/blog/building-chatgpt-plugins-template)
