# SaaS Template A modern SaaS template built with Next.js 16 and Cloudflare Workers, designed for scalability and performance. ## Site pages - [SaaS Template](https://nextjs-saas-template.lubomirgeorgiev.com/index.md): A modern SaaS template built with Next.js 16 and Cloudflare Workers, designed for scalability and performance. - [Privacy Policy](https://nextjs-saas-template.lubomirgeorgiev.com/privacy.md): Learn how we collect, use, and protect your data - [Terms of Service](https://nextjs-saas-template.lubomirgeorgiev.com/terms.md): Read our terms of service and usage agreement ## Documentation Product documentation for this application: how it works, how to run and deploy it, and how to use its features. - [Features](https://nextjs-saas-template.lubomirgeorgiev.com/docs/features.md): Explore SaaS Template's features, including auth, database, email, and deployment options ## Search API - [Documentation search API](https://nextjs-saas-template.lubomirgeorgiev.com/api/docs/search?q=authentication&limit=8): Find relevant docs. The `q` parameter is required. `limit` defaults to 8 and accepts 1-20. The JSON response returns matching page metadata and excerpts. ## API and MCP - [API reference](https://nextjs-saas-template.lubomirgeorgiev.com/docs/api.md): Browse the public REST API: endpoints, scopes, request and response schemas, and error codes. - [API error codes](https://nextjs-saas-template.lubomirgeorgiev.com/docs/api/errors.md): The stable error codes returned by the public REST API and the MCP server, with their HTTP statuses and what each one means. - [Authentication (API keys and OAuth)](https://nextjs-saas-template.lubomirgeorgiev.com/docs/authentication.md): How to authenticate against the public REST API and the MCP server with an API key or an OAuth 2.1 access token, and what scopes mean. - [Connecting AI agents (MCP)](https://nextjs-saas-template.lubomirgeorgiev.com/docs/mcp.md): Connect Claude, ChatGPT, Cursor, and other agent clients to your account over MCP, with OAuth or an API key. - [API catalog](https://nextjs-saas-template.lubomirgeorgiev.com/.well-known/api-catalog): RFC 9727 linkset with the REST API, the MCP endpoint, and where each one is described. - [OpenAPI document](https://nextjs-saas-template.lubomirgeorgiev.com/api/v1/openapi.json): Exact OpenAPI 3.1 contract with operations, scopes, schemas, and errors. - [MCP endpoint](https://nextjs-saas-template.lubomirgeorgiev.com/mcp): Streamable HTTP endpoint for the same operations as agent tools. Use an API key or OAuth. Authenticated REST requests and MCP calls share a limit of 300 requests per 60 seconds per credential. Responses include `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset`. A 429 response also includes `retry-after`.