Files
turbostarter/.context/turbostarter-framework-context/sections/extension/api/overview.md
Alejandro Gutiérrez 3527e732d4 feat: turbostarter boilerplate
Production-ready Next.js boilerplate with:
- Runtime env validation (fail-fast on missing vars)
- Feature-gated config (S3, Stripe, email, OAuth)
- Docker + Coolify deployment pipeline
- PostgreSQL + pgvector, MinIO S3, Better Auth
- TypeScript strict mode (no ignoreBuildErrors)
- i18n (en/es), AI modules, billing, monitoring

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:01:55 +01:00

2.1 KiB

title, description, url
title description url
Overview Get started with the API. /docs/extension/api/overview

Overview

To enable communication between your WXT extension and the server in a production environment, the web application with Hono API must be deployed first.
<Card title="Web deployment" description="Deploy your web application to production." href="/docs/web/deployment/checklist" />

TurboStarter is designed to be a scalable and production-ready full-stack starter kit. One of its core features is a dedicated and extensible API layer. To enable this in a type-safe manner, we chose Hono as the API server and client library.

Hono is a small, simple, and ultrafast web framework that gives you a way to define your API endpoints with full type safety. It provides built-in middleware for common needs like validation, caching, and CORS. It also includes an [RPC client](https://hono.dev/docs/guides/rpc) for making type-safe function calls from the frontend. Being edge-first, it's optimized for serverless environments and offers excellent performance.

All API endpoints and their resolvers are defined in the packages/api/ package. Here you will find a modules folder that contains the different feature modules of the API. Each module has its own folder and exports all its resolvers.

For each module, we create a separate Hono route in the packages/api/index.ts file and aggregate all sub-routers into one main router.

The API is then exposed as a route handler that will be provided as a Next.js API route:

import { handle } from "hono/vercel";

import { appRouter } from "@turbostarter/api";

const handler = handle(appRouter);
export { handler as GET, handler as POST };

Learn more about how to use the API in your browser extension code in the following sections: