Quick start: build an app with a coding agent
Scaffold the Lunnoa starter, let Claude Code, Cursor, or Codex design and build your app with you, then deploy it as a container.
Describe an idea, approve a short brief, and let a coding agent build a custom app on your Lunnoa deployment. The app starts from lunnoa-starter, a thin Next.js template wired to @lunnoa/client.
Prerequisites
- Node.js 20 or newer
- A Lunnoa Automate deployment URL
- Lunnoa users who can sign in. Add missing people in Lunnoa first (invite, SSO, or SCIM).
- A workspace API key (
lna_…) for the coding agent's CLI commands only. A SuperAdmin creates one in Admin Space → API Keys; see API keys and API authentication. The running app does not use this key. - A coding agent: Claude Code, Cursor, or Codex
What is in the starter
| File | Purpose |
|---|---|
CLAUDE.md / AGENTS.md | Rules the coding agent follows: design first, reuse before creating, build in slices |
BRIEF.md | The build brief. The agent writes it, you approve it before any code is written |
.env | Connection settings (see below) |
Dockerfile | Production image (Next.js standalone) |
npm install runs a postinstall script (lunnoa-client skills install) that puts the lunnoa-solution-design and lunnoa-client skills into .claude/skills/ and .cursor/skills/. See For agents.
Environment variables
| Variable | Purpose |
|---|---|
LUNNOA_URL | Your deployment URL. The app signs people in as Lunnoa users |
LUNNOA_API_KEY | Workspace API key for CLI commands only. Never prefix it with NEXT_PUBLIC_ |
The CLI reads the same .env. The app session does not. See Authentication. Ask a Lunnoa admin to add the app's URL to CORS_ALLOWED_ORIGINS.
Option A: scaffold it yourself
npx @lunnoa/client init my-app --url https://your-deployment.example
cd my-app
npm install
npm run devinit downloads the template, writes .env with LUNNOA_URL and LUNNOA_API_KEY, and asks for any value you did not pass. The app signs people in as Lunnoa users either way. The API key is only for CLI commands. Use --template owner/repo[#ref] or --template ./local-folder for your own starter.
Then open my-app in Claude Code, Cursor, or Codex and describe your idea.
Option B: paste a prompt (no terminal)
Open an empty folder in Claude Code or Cursor and paste this prompt. Replace the placeholder with your idea.
Build me a Lunnoa app: <describe your idea>.
Set up:
1. Run `npx @lunnoa/client init .` in this empty folder (template: lunnoa-automate/lunnoa-starter).
2. Run `npm install` so the Lunnoa skills are installed into .claude/skills and .cursor/skills.
3. Read CLAUDE.md and follow it.
4. Ask me for the Lunnoa URL and an API key (lna_...) for CLI commands only.
Write them only to .env. The app signs people in as Lunnoa users.
Never print the key, commit it, or put it in browser code.
5. Verify the connection with `npx lunnoa-client workflows list --json`.
Then:
6. Use the lunnoa-solution-design skill to interview me about my idea.
7. Inspect the workspace before creating anything, and reuse what exists:
`npx lunnoa-client entity-types list --json`, `tables list --json`, `workflows list --json`,
`agents list --json`, `tools list --for-agent --json`.
8. Write BRIEF.md and wait for my approval before writing any code.
9. Build in small slices. End each slice with a plain-language check I can do in the browser.What happens next
Interview
The agent asks about triggers, users, data, human approvals, and integrations, and maps your answers to Lunnoa primitives: workflows, agents, objects, tables, and queues.
Approve BRIEF.md
The agent writes the brief to
BRIEF.md. Read it, correct it, and approve it. No code is written before that.Build in slices
The agent builds one vertical slice at a time with the
lunnoa-clientskill and ends each with a check you can run yourself. Try it before asking for the next slice.Deploy
Ship the app as a container (below).
Deploy as a container
The starter's Dockerfile builds a Next.js standalone server. Configuration comes from environment variables at runtime, so one image works for any deployment, on any host that runs containers. The container needs LUNNOA_URL only.
docker build -t my-app .
docker run -p 3000:3000 \
-e LUNNOA_URL=https://your-deployment.example \
my-appPass credentials as runtime environment variables, not build arguments, so they never end up in an image layer.
Example: Dokploy
- Push the app to a Git repository.
- In Dokploy, create an Application and connect the repository.
- Set the build type to Dockerfile.
- Add
LUNNOA_URLunder Environment. - Add a domain pointing at container port
3000, then deploy.
Coolify, a plain VM with Docker, or a Kubernetes cluster follow the same pattern: build the Dockerfile, set LUNNOA_URL, expose port 3000.
Browsers call the Lunnoa deployment directly, so add your app's domain to CORS_ALLOWED_ORIGINS on the deployment.
Related
- For agents: skills, paste block, short playbook
- CLI:
init, discovery, and deploy commands - TypeScript client SDK: overview and authentication
- Entities and Tables: objects vs lookup data