Docs
Menu

DocsFor developers

How a Leaf project is made

For developers: what a project holds, what it builds with, and where the reference lives.

Developers are welcome; Leaf is built so you rarely need to look under the hood.

A project

  • TypeScript, built with Astro (sites, pages built ahead or on request) or Vite and React (apps), plus an optional worker for server code. Everything runs on Cloudflare.
  • leaf.json declares what the project needs from Leaf: secret names, the hosts its server code may call, schedules, background tasks, app users' roles, an MCP server.
  • @leaf/sdk is what the code imports: content, forms, translations, sign-in, files, payments, the database, AI, web reads, rooms (real time), mail.
  • AGENTS.md holds the project's decisions, read by the AI at every session.

The reference

The SDK's reference is written for agents and served by Leaf's sdk_read tool, one topic at a time:

Tell your AI

With Leaf, read the SDK guide on payments and explain how a subscription is sold.

Code you write yourself

With a shell (Claude Code, Codex, Cursor), your AI can send a whole folder at once. Every change goes through the same checks and becomes a version in the history.

Exports

A project exports as a zip (code, content, files, translations) from its Settings, and imports into Leaf again.