All Prompts

Build and host a web app on Yard

by Yard

Build a web app with a database and Yard sign-in, hosted on Yard with no servers to run.

First, confirm Yard is set up on this machine. Run `yard version`, and check that the Yard skill exists at ~/.agents/skills/yard/SKILL.md (%USERPROFILE%\.agents\skills\yard\SKILL.md on Windows). If either the CLI or the skill is missing, fetch https://yard.sh/setup.txt and follow it through to the end before you do anything else. If both are already in place, go straight to the task below.

---

Build a small web app and host it on Yard, with a database and sign-in handled by Yard.

1. Ask me what the app should do, in a sentence or two, and propose the screens and data it needs. Check yard me --json for .team_permissions.service and yard_auth. If either is missing, stop and give me https://yard.sh/pricing.
2. In the Yard project linked to this directory, run yard service init app. Replace the notes example with my app, keeping the same shape: one _service.js that exports a fetch handler (no ports, no listen(), no Express), static files next to it, relative URLs everywhere, and tables in numbered .sql files in .yard/migrations. Store times as integer milliseconds.
3. Leave "access": "authenticated" on the service and use the X-Yard-User-Id header to scope each user's data. Never build login, sessions or password storage.
4. Run yard dev --json in the background and test the API with curl as two different personas (Cookie: yard_dev_identity=signed-in, then yard_dev_identity=member) to prove one user can't see another's data. Then run yard service check and yard push.

Don't publish. Show me the local URL and the review URL, and offer to put the release in a preview sandbox so I can try it hosted.