Schema Templates

Copy-paste schemas for the apps people actually build. Each template is one PUT /v1/schema away from a live REST API with auth, file storage, and access control already wired. Designed to be readable by humans and applicable by AI agents without modification.

Productivity

Todo App

Classic personal task list with auth, owner-scoped writes, and priority enums.

authowner-scopedenums
Content

Blog with Comments

Public-read posts and comments, authenticated authors, owner-scoped edits.

authpublic-readfilescascade
Productivity

Habit Tracker

Daily habits with composite-unique logs (one entry per habit per day).

authowner-scopedcomposite-uniqueenums
Productivity

Bookmarks Manager

Single-table demo with JSON tags and per-user privacy.

authowner-scopedjson
Social

Recipe Sharing

Public recipes with photo uploads and per-user favorites (many-to-many).

authpublic-readfilesmany-to-many
Social

Team Chat

Channels + messages, authenticated-only read, author-only edits.

authauthenticated-readcascade

How to apply a template

  1. Pick a template above and open its page.
  2. Copy the schema JSON (or copy the one-liner agent prompt).
  3. Apply it: PUT https://api.moondb.ai/p/{project_id}/v1/schema with X-Admin-Key: sk_.... Or call set_schema via MCP and let your agent do it. Or hit the Schema tab in the dashboard and paste.

Templates are starter schemas, not framework lock-ins — extend them, rename tables, add columns. MoonDB will diff against the applied version and auto-migrate on every PUT. Destructive changes (drop column, narrow enum) require "confirm_destructive": true in the request body.

Need a backend right now?

Sign up free. Apply any template. Three API calls to a working API.

Get started
Copied to clipboard