Getting Started
Welcome to MastraKit — the AI-first agent platform boilerplate
What is MastraKit?
MastraKit is a production-ready monorepo boilerplate for building AI agent platforms. Users interact via web chat, ChatGPT/Claude Desktop, or MCP clients. The AI agent IS the product.
Architecture
Your project ships with 5 services, each deployed as a Cloudflare Worker:
| Service | Purpose | Port |
|---|---|---|
| Web | TanStack Start + React 19 frontend, chat UI | 3000 |
| API | Hono REST API, business logic, Stripe billing | 3001 |
| Auth | Better Auth, JWT, organization management | 4333 |
| Mastra | AI agent, tools, MCP server | 4111 |
| Metering | Usage tracking, credit ledger | 4222 |
Each service has its own Turso (LibSQL) database. Multi-tenancy is built in — all queries filter by organization.
Quick Start
The fastest path from license to running project:
- Get a License — Purchase your license key
- Prerequisites — Install the required tools
- Scaffold — Create your project with
npx mastrakit - Local Development — Run the stack locally (with or without a tunnel)
- Configure Secrets — Set up API keys and credentials
- Deploy — Deploy to Cloudflare Workers
- GitHub & CI/CD — Set up environments, workflows, and Conductor
Key Technologies
- Frontend: TanStack Start, React 19, TailwindCSS, Radix UI
- Backend: Hono (Cloudflare Workers), Drizzle ORM
- AI: Mastra framework, Anthropic/OpenAI, MCP protocol
- Auth: Better Auth with JWT, social login (Google, GitHub)
- Database: Turso (LibSQL) with database branching
- Payments: Stripe (subscriptions + credit packages)
- CI/CD: GitHub Actions, Conductor workspace automation