# Deploy a feedback board with a persistent SQL database

A small full-stack example: submit feedback, refresh the page, and read the saved items from SQL.

## How do I give an AI-generated feedback form a persistent backend?

Serve the form and a JavaScript fetch handler in one app. Store submissions in env.DB with bound SQL parameters and read them back on page load. This example separates each browser's demo workspace.

1. Create the table in a numbered SQL migration.
2. Validate the title and status, and protect browser writes with session-bound CSRF tokens and Origin checks.
3. Bind query parameters and restrict every query to the current demo session.
4. Submit an item and reload to verify persistence; share the public URL separately from private ownership instructions.

```javascript
const rows = await env.DB.prepare(
  'SELECT id, title, status FROM feedback WHERE session_id = ?'
).bind(session.id).all();
return Response.json(rows.results);
```

## Limits and evidence

The demo caps a session at 20 items and a title at 160 characters. It is an official example, not a customer testimonial or a multi-user project management product.

Public browser verification date: 2026-11-30. All example data is synthetic; no customer, performance or revenue claims.

Unclaimed apps expire after 72 hours; persistent use requires a human ownership claim.

[Deployment docs](https://backendshare.com/docs)
