Build Verse: a poem-quote app on the agent-native chat template
CI / build (push) Successful in 4m26s

Adds a Postgres-backed quotes domain (poems/quotes/favorites) exposed as
five agent-native actions (list-quotes, get-random-quote, create-quote,
toggle-favorite, list-favorites) callable from both chat and the React UI
via useActionQuery/useActionMutation. Moves the primary UI from chat to a
mobile-first Quotes/Favorites experience (chat moves to /chat), adds
manual OpenTelemetry instrumentation exporting traces/metrics/logs over
OTLP, and wires a local Docker Postgres for shared state.
This commit is contained in:
exe.dev user
2026-07-25 17:42:04 +00:00
parent ffea2aeff7
commit 0a18c774a5
44 changed files with 14702 additions and 156 deletions
+31 -20
View File
@@ -1,32 +1,43 @@
# Chat
# Verse
The minimal agent-native starter app — a clean, ChatGPT-style shell with chat at
the center, durable threads, standard app navigation, auth, live sync, and
actions. Start here when you want a real browser app to build on without
committing to a domain template.
**Live app: [chat.agent-native.com](https://chat.agent-native.com)**
Chat is the basic agent-native app starting point. It gives you the app-agent
loop wired end to end and one example action, so you can add your own UI, data,
and actions on top.
A quote app built on poems: browse, search, and favorite quotes drawn from
classic poems, or submit your own. Built with
[Agent Native](https://agent-native.com) — every app operation is a single
`defineAction` callable from the React UI *and* from agent chat.
## Features
- ChatGPT-style shell with a threads list and durable chat history.
- Auth, live sync, and application state wired out of the box.
- The action surface the agent and UI share, plus one example action to copy.
- A minimal, brandable base for any domain app.
- Browse and search quotes by poet, poem, or theme tag.
- Favorite quotes anonymously (per-browser, no login required).
- Submit new quotes, which create the poem record if it doesn't exist yet.
- The same actions are callable from the in-app agent chat at `/chat`.
- Postgres-backed shared state, seeded with ~20 public-domain poems on first boot.
- OpenTelemetry traces/metrics/logs for every action call, exported over OTLP.
## Action surface
See `AGENTS.md` for the full list. In short: `list-quotes`, `get-random-quote`,
`create-quote`, `toggle-favorite`, `list-favorites`.
## Develop locally
Scaffold your own copy and run it:
```bash
npx @agent-native/core@latest create my-app --standalone --template chat
cd my-app
pnpm install
docker compose up -d # starts local Postgres
pnpm dev
```
Full docs: [agent-native.com/docs/template-chat](https://agent-native.com/docs/template-chat).
Set `DATABASE_URL` in `.env` (see `.env.example`) to point at the Postgres
container, or any Postgres/Neon/Supabase/libSQL connection string — schema and
seed data are created automatically on first boot via the migration plugin in
`server/plugins/db.ts`.
## Production
```bash
pnpm build
node .output/server/index.mjs
```
Built on the Agent Native `chat` template:
[agent-native.com/docs/template-chat](https://agent-native.com/docs/template-chat).