Prompt pack · Vibe coding

Backends for Agent-Built Apps: pick a shape, write the contract, keep the data safe

by PaperChaseWebb

A teaching guide for the server side of apps your coding agent builds. Pick one of five backend shapes with six questions, write a BACKEND.md contract the agent follows, and get migrations, sign-in, access rules, secrets, webhooks, jobs, free tier limits and live monitoring right. Includes a rules block and 14 prompts.

Preview card for Backends for Agent-Built Apps
Works withClaude CodeCodexCursorPlain .md
Price
$29
Difficulty
Intermediate
Setup
1 hr
Format
.md file
$29 one time

backends-for-agent-built-apps-shape-contract-data-safety.md · 21 KB · instant download after checkout

Buy now · $29

Want this built for you instead? We can build it for you.

What you end up with

Your agent works inside a written backend contract, sign-in and access rules are tested as three people, schema changes have a way back, and you know what each free tier really allows.

What you get

  • 12 sections in one .md file
  • The six backend jobs and five backend shapes, explained plainly
  • A six-question picker for the shape
  • A BACKEND.md contract template
  • Safe migration, access table, secrets, webhook and job checklists
  • A free tier honesty sheet
  • A rules block for CLAUDE.md, AGENTS.md or a Cursor rule
  • 14 prompts to pick, audit and fix

Who it is for

Builders whose agent makes the front end look done while the server side is guesswork, and who want a plain-words method before real users arrive.

Works with

Claude CodeCodexCursorPlain .md

Solid chips: the agent is named in this listing's own tools list. Dashed chip: Plain Markdown, so it also pastes into other agents such as Grok Bot, Hermes, OpenClaw or Muse. We list those as compatible by format only, not as tested.

Tools needed

Claude Codereads CLAUDE.md and BACKEND.md
Codexreads AGENTS.md and BACKEND.md
Cursorreads the project rule
You needA coding agent such as Claude Code, Codex or Cursor
You needAn app with, or about to get, a database or server
You needAccess to your hosting and database dashboards

Cost to run: Free. Uses the agent and services you already have.
Time to result: A picked shape, a BACKEND.md and a first audit in one afternoon

Sample prompts, free to use

Find hand-written sign-in · Claude Code, Codex, Cursor
Search this repo for any code that hashes passwords, creates or checks session tokens, sends reset links or stores sign-in state. List each file and line.
For each, say which part of the named library [library] should replace it. Do not change code yet.

Agents often write sign-in by hand when no library is named.

Idempotent webhook · Claude Code, Codex, Cursor
Review the webhook handler at [path]. Does it verify the signature before reading the body, store the event id, return early on a repeat, and move slow work to a job?
Fix what is missing, then write a test that sends the same event twice and checks one record changed.

Outside services retry. Your handler has to be safe to run twice.

Free preview of the file

backends-for-agent-built-apps-shape-contract-data-safety.md (excerpt)21 KB total
# Backends for Agent-Built Apps: pick a shape, write the contract, keep the data safe

A PaperChaseWebb teaching guide, version 1.0. Written for Claude Code, Codex and Cursor, and plain Markdown, so the contract file, the rules block and the prompts work in any coding agent.

Coding agents are quick at the screen and careless with the server. Left alone, they reach for whatever they saw most often, invent their own sign-in code, change the database in place, and put a secret where the browser can read it. None of that shows up in a demo. It shows up the week real people start using the app.

This guide teaches the backend side in plain words. You pick one of five backend shapes with six questions, write a short BACKEND.md the agent must follow, and work through the parts that break most often: data and migrations, sign-in and access rules, secrets, webhooks, background jobs, free tier limits and watching the live system. Each part ends with the check that proves it holds.

It comes from our own builds plus public reports we read, checked and rebuilt in our own words. Sources are credited by link in Section 12.

## What is inside

| Section | What it is for |
|---|---|
| 1. What a backend does | The six jobs, in plain words, so you know what you are choosing |
| 2. Five backend shapes | Hosted database service, functions plus a managed database, edge workers, one small server, local first |
| 3. Pick with six questions | A short decision sheet that points to one shape |
| 4. BACKEND.md | The contract file your agent reads before touching the server |
| 5. Data and migrations | Schema changes the agent can make without losing rows |
| 6. Sign-in and access rules | Use a proven sign-in library and default-deny access |
| 7. Secrets | Where keys live and how to catch one in the browser bundle |
| 8. Webhooks and jobs | Idempotent handlers, retries and scheduled work |
| 9. Free tier honesty sheet | Read limits before you build on them |
| 10. Watch the live system | Errors, slow queries and alert-to-fix loops with a human gate |
| 11. Rules block and prompts | A paragraph for CLAUDE.md, AGENTS.md or a Cursor rule, plus 14 prompts |
| 12. Sources | What we used and how we used it |

Worth knowing

  • This is a method, not a security certification. Have a person review anything that handles money or personal data.
  • Vendor names, key types, access rule syntax and free tier terms change often. Check current docs and pricing pages before you rely on them.

Questions

Do I need to know how to code to use this?

You need to read a table and run what your agent writes. The guide explains each backend job in plain words and gives you the prompts and checks; the agent does the typing.

How is this different from the pre-launch security prompts?

The security prompts are a last check before launch. This guide is how you set the backend up so most of those checks pass the first time: the shape, the contract file, migrations, webhooks, jobs and monitoring.

Does it recommend a specific vendor?

No. It teaches five shapes and how to pick one. You choose the vendor and record it in BACKEND.md.

Details

Version 1.0 · Updated Oct 27, 2026 · Markdown version of this page
License: Personal and commercial use on your own projects and your team's. Do not resell or republish this pack. Download terms

backenddatabasesauthmigrationswebhooksclaude-codecodexcursorsecurityteaching-guide

Related

Preview card for Pre-launch security prompts for vibe-coded apps
Prompt pack$19

Pre-launch security prompts for vibe-coded apps: Supabase RLS, leaked keys and open doors

by PaperChaseWebb

14 prompts that make your coding agent find exposed keys, tables without row level security, open buckets and unverified webhooks in your own app, then fix them one commit at a time.

Works withClaude CodeCodexCursorWindsurfPlain .md
Vibe coding · Beginner · 15 min setup
Preview card for Spec-First Build Docs
Prompt pack$29

Spec-First Build Docs: PRD, design system, architecture note, agents guide and readiness check

by PaperChaseWebb

A Markdown pack of the four documents to write before an agent builds anything, sized to the stakes: a PRD an agent can build from without inventing scope, the smallest design system that holds, a one-page architecture note with reversal costs, an agents guide with a project tree for Claude Code, Codex and Cursor, a weekly staleness pass and a nine-area readiness check.

Works withClaude CodeCodexCursorPlain .md
Vibe coding · Intermediate · 30 min setup
Preview card for AGENTS.md, CLAUDE.md and Cursor rules starter files
Prompt pack$14

AGENTS.md, CLAUDE.md and Cursor rules starter files

by PaperChaseWebb

Six fill-in instruction files for coding agents (base, Next.js plus Supabase, FastAPI, browser game, CLAUDE.md pointer, scoped Cursor rules) and 8 prompts to write, trim and test your own.

Works withClaude CodeCodexCursorPlain .md
Vibe coding · Beginner · 20 min setup
Preview card for Turn production alerts into diagnosed fix PRs with a cloud agent
Agent use case packFree

Turn production alerts into diagnosed fix PRs with a cloud agent

by PaperChaseWebb

A small SaaS team wired its alerts to a Claude Code routine that finds the root cause, explains it in the Slack alert thread and opens a fix PR, and its first serious incident went from alert to merged fix in 13 minutes.

Works withClaude CodePlain .md
Solo business · Advanced · 1 hr setup
Preview card for The six backend jobs and the access table (free sample)
Prompt packFree

The six backend jobs and the access table (free sample)

by PaperChaseWebb

The six jobs every backend does, a default-deny access table, two rules to paste into your agent's rules file and a prompt that tests access as three people.

Works withClaude CodeCodexCursorPlain .md
Vibe coding · Beginner · 15 min setup