Ship AI · Talks · Coming soon

Replace the Spreadsheet

Turn one spreadsheet-and-email process into an app your team signs in to.

How the night runs.

Twenty minutes of AI news, then Claude Code replaces one spreadsheet-and-email process with a small internal app, from one TOOL-SPEC.md, then five-minute demos from the room.

  1. 01

    Spec

    Roles, the one workflow, permissions and Done when.

  2. 02

    Build

    Next.js, Neon, Better Auth roles and the CSV import.

  3. 03

    Protect

    Server-side checks, row-level access, an audit trail.

  4. 04

    Ship

    Live on Vercel, open only to your team.

The deck.

Every slide from the night, free to share. Open it full size to step through.

Replace the Spreadsheet · slidesOpen full size →

Tonight's tool.

A Phoenix landscaping company's purchase requests, moved out of a spreadsheet and the office inbox. Swap in your own process and let Claude Code build from it.

TOOL-SPEC.mdDesert Bloom Landscaping

Desert Bloom Landscaping

Three roles, one approval workflow, five screens and an audit trail, with the old sheet imported and one AI helper a person signs off on.

The ruleThe server decides, and every change leaves a record.

  • Next.js
  • Neon
  • Drizzle
  • Better Auth admin plugin
  • Papa Parse
  • AI SDK
  • AI Gateway
  • Vercel
  • Playwright
Done when
  • The sheet's rows are in the app and the counts match
  • Submit, approve and order a request, with all three on the timeline
  • A requester can't open anyone else's request, proven by a test
  • The AI draft only posts after a person clicks Post reply
  • Live on Vercel with sign-up off and previews locked
The full TOOL-SPEC.md
# Desert Bloom Landscaping - TOOL-SPEC.md

Purchase requests, moved out of "Purchase Requests 2026.xlsx" and the office inbox into one small internal app. 30 people, 6 crews, one office in Phoenix.

## Today
Crew leads email the office manager when they need equipment or supplies. She copies each email into the spreadsheet, forwards it to the ops manager, and he replies "approved" or "no". Requests get lost, nobody knows the status, and there's no record of who approved what.

## Users and roles
Better Auth's admin plugin with three custom roles:
- `requester`: crew leads. Create requests, see only their own. The default role.
- `approver`: the ops manager. Sees every request, approves, rejects or asks for info.
- `admin`: the office manager and the owner. Everything an approver can do, plus add people, set roles, import the sheet and mark requests ordered and received.

There is no public sign-up. Admins add people from the People screen. The first admin is created from the terminal.

## The workflow
| From | To | Who | Note required |
|---|---|---|---|
| (new) | submitted | requester, admin | no |
| submitted | needs_info | approver, admin | yes |
| needs_info | submitted | the requester | no |
| submitted | approved | approver, admin | no |
| submitted | rejected | approver, admin | yes |
| approved | ordered | admin | no |
| ordered | received | admin, the requester | no |
| submitted, needs_info | cancelled | the requester | no |

- Requests with an estimated cost over $2,500 can only be approved by an admin.
- Nobody approves their own request.

## Screens
1. New request: item, quantity, vendor, estimated cost, needed by, crew, why
2. My requests: the requester's own requests, newest first, with status
3. Queue (approver, admin): submitted and needs_info first, oldest first, filter by crew and status
4. Request page: the details, the timeline from request_events, the actions this person is allowed to take, and the AI helper
5. People (admin): add a person, set their role, ban someone who left

## Data
- `requests`: id, requester_id, crew, item, quantity, vendor, est_cost_cents, needed_by, reason, status, created_at, updated_at
- `request_events`: id, request_id, actor_id, action, from_status, to_status, note, created_at
- Better Auth's own tables for users, sessions and roles

## Permissions
| Action | requester | approver | admin |
|---|---|---|---|
| Create a request | yes | no | yes |
| Read a request | own only | all | all |
| Approve, reject, ask for info | no | yes, up to $2,500 | yes |
| Mark ordered | no | no | yes |
| Use the AI helper | no | yes | yes |
| Add people, set roles | no | no | yes |
| Import the CSV | no | no | yes, from the terminal |

## Rules
- The server decides. Every page, server action and route handler checks the session and the role on the server, through one module, lib/requests.ts. Hiding a button is not a check.
- Row-level access: a requester's queries are always scoped to requester_id = their own id. Asking for anyone else's request by ID returns a 404.
- Every status change goes through one function that writes a request_events row in the same transaction. Nothing updates or deletes an event.
- No secrets in the browser. DATABASE_URL, BETTER_AUTH_SECRET and AI_GATEWAY_API_KEY stay in server code and .env.local.

## Audit trail
The request page shows every event: who, what, from which status to which, the note, and when. Imported rows get one `imported` event with the status they had in the sheet.

## AI helper
"Summarize and draft" on the request page, for approvers and admins. It reads the request and its timeline (no emails, no user IDs) and returns a three-line summary and a short draft reply to the requester. A person edits the draft and clicks Post reply, or discards it. The AI never changes a status and never sends anything on its own. Both outcomes are logged.

## Import
The sheet's columns: Date, Requested by, Crew, Item, Qty, Vendor, Est. cost, Needed by, Status, Approved by, Notes.
- Match Requested by and Approved by to people by name or email. Stop on any name that doesn't match.
- Map statuses: New -> submitted, OK / Approved -> approved, No -> rejected, Ordered -> ordered, Got it -> received.
- Dry run first, then one transaction. Running it twice creates no duplicates.
- The CSV lives in data/, which is never committed.

## Out of scope
Email notifications, budgets, vendor accounts, receipts and photo uploads, a mobile app.

## Done when
- [ ] The spreadsheet's rows are in the app, and the counts by status match the CSV
- [ ] A crew lead submits a request, the ops manager approves it, the office marks it ordered, and the timeline shows all three
- [ ] A requester asking for someone else's request gets a 404, proven by a Playwright test
- [ ] An approver can't approve over $2,500 or their own request, proven by a test
- [ ] The AI draft is only posted after a person clicks Post reply
- [ ] It's live on Vercel, sign-up is off, and preview deployments are locked to the Vercel team

The prompts.

Every prompt from the deck, in order. Open one, copy it, paste it into Claude Code, Codex or any coding agent.

  1. 01
    Write TOOL-SPEC.md first
    I want to replace one spreadsheet-and-email process at work with a small internal app. Interview me one question at a time and wait for each answer:
    - What happens today: who sends what to whom, and where is it tracked?
    - Who uses it, and what roles do they need? Three at most.
    - What is the one workflow, from request to done, with every status and who moves each one?
    - What are the spreadsheet's columns? I'll paste the header row.
    - Who can see which rows, and who can change what?
    - What should anyone be able to find out later: who decided what, when and why?
    - Where would one AI helper save time, with a person approving what it writes?
    
    Then write TOOL-SPEC.md with these sections: Today, Users and roles, The workflow (a table: from, to, who, note required), Screens, Data, Permissions (a table of actions by role), Rules, Audit trail, AI helper, Import, Out of scope, Done when.
    
    The Rules section must say: the server checks the session and role on every page, action and route; requesters only ever load their own rows; every status change writes an audit row in the same transaction; there is no public sign-up, admins add people; the AI drafts and a person decides; no secrets in the browser.
    
    Stop and wait for my OK before writing any code.
  2. 02
    Set up the project
    Read TOOL-SPEC.md. Set up the project one step at a time and stop after each step.
    
    1. Create a Next.js app with TypeScript, Tailwind CSS and the App Router:
    npx create-next-app@latest requests --ts --tailwind --app --eslint --use-npm --yes
    2. Move TOOL-SPEC.md into requests.
    3. Stop and tell me to do three things myself, then wait until I tell you it's done:
       - cd requests
       - run npx neon@latest init, which sets up Neon's agent tooling for this folder, links a project and writes DATABASE_URL to .env.local. If it asks me to log in or link, I run the commands it prints
       - start Claude Code again inside requests
    
    Do not build any features yet.
  3. 03
    Sign-in with roles
    Read TOOL-SPEC.md. Add the database and sign-in with roles. Read the current docs before writing code: better-auth.com/docs/plugins/admin and better-auth.com/docs/adapters/drizzle. Stop after each step.
    
    1. Database: install drizzle-orm and @neondatabase/serverless, and drizzle-kit as a dev dependency. Connect with DATABASE_URL from .env.local, using Drizzle's neon-serverless driver so transactions work. Never print the connection string.
    2. Auth: install better-auth and the Drizzle adapter its docs name. Turn on email and password with disableSignUp: true, so nobody can create their own account. Generate BETTER_AUTH_SECRET with a command that writes it to .env.local without printing it, and set BETTER_AUTH_URL to http://localhost:3000.
    3. Roles: add the admin plugin with the custom roles from TOOL-SPEC.md, using createAccessControl. Add a request resource with create, read_own, read_all, decide and fulfill. Keep the default admin statements for admin. Set defaultRole to requester. Pass the same ac and roles to adminClient().
    4. Generate the auth schema with npx auth@latest generate, then the Drizzle migration. Show me the changes before applying them.
    5. Tell me to create the first admin myself in my terminal with:
       npx auth@latest create-admin --email <my email> --name "<my name>" --role admin
       Wait until I tell you it's done.
    
    Don't build screens yet. Never print a secret or put one in tracked files or chat.
  4. 04
    Build the one workflow
    Read TOOL-SPEC.md. Build the one workflow. Stop after each step.
    
    1. Create the requests and request_events tables from the Data section. Nothing in the code may update or delete a request_events row.
    2. Write one server-only module, lib/requests.ts, that every page and server action goes through. Each function reads the session from the request headers, checks the role with auth.api.userHasPermission, and scopes the query: for a requester, every query includes requester_id = their own id. No page or component queries the requests table directly.
    3. Write one function, moveRequest(), that checks the move against the workflow table in TOOL-SPEC.md for this person's role, enforces the $2,500 rule and "nobody approves their own request", then updates the status and inserts a request_events row in the same transaction. Rejecting and asking for info require a note.
    4. Build the screens from TOOL-SPEC.md: New request, My requests, Queue, the request page with its timeline, and People (admin only: add a person with the admin plugin's createUser, set their role with setRole, ban someone who left).
    5. Add two test people from People, a requester and an approver. Then show me the queue and one request's timeline after I submit, approve and mark it ordered.
  5. 05
    Import the spreadsheet
    Read TOOL-SPEC.md, section Import. First add data/ to .gitignore. I'll export the sheet to data/requests.csv myself; wait until I tell you it's there. Never commit it.
    
    1. Install papaparse and @types/papaparse. Write scripts/import-requests.ts that parses the CSV with its header row and maps each column to the requests table the way the Import section says, including the status mapping.
    2. Match Requested by and Approved by to people by name or email. List every name that doesn't match and stop. I'll add those people in the app or tell you how to map them.
    3. Run a dry run first with npx tsx: total rows, rows by status, and every row it would skip and why (missing item, bad date, unknown status). Wait for my OK.
    4. Then import inside one transaction. Each imported request gets one request_events row with action imported and the status it had in the sheet. Running the script twice must not create duplicates.
    5. Show me the counts by status in the app next to the counts in the CSV.
  6. 06
    One AI helper
    Read TOOL-SPEC.md, section AI helper. Add a Summarize and draft button to the request page for approvers and admins. Stop after each step.
    
    1. Install the AI SDK with npm install ai. Ask me to create an AI Gateway API key in the Vercel dashboard and add it to .env.local as AI_GATEWAY_API_KEY myself. Wait until I tell you it's done.
    2. Write a server action that checks the role through lib/requests.ts, loads the request and its timeline, and calls generateText through AI Gateway with a "provider/model" string. Check the AI Gateway model list for the current Claude Sonnet model ID instead of guessing. Send only the request fields and notes: no emails, no user IDs.
    3. Ask for a three-line summary (what, why, what's missing) and a short, friendly draft reply to the requester. It must not invent anything that isn't in the request.
    4. Show the draft in an editable box. Nothing is saved until a person clicks Post reply, which saves it as a comment event in request_events. Log ai.draft_used or ai.draft_discarded. The AI never changes a status.
    5. Use a 15-second timeout and a plain error message on failure. Show me a draft for one imported request.
  7. 07
    Protect it on the server
    Read TOOL-SPEC.md, sections Permissions, Rules and Done when. Review the app like a curious person on the team would. Stop after each step.
    
    1. List every page, server action and route handler. Confirm each one checks the session and role on the server, through lib/requests.ts, before loading or changing data. Hiding a button doesn't count. Fix any that don't.
    2. Confirm row-level access: a requester asking for someone else's request by ID gets a 404, from the page and from every server action.
    3. Confirm the Permissions table: a requester can't approve, an approver can't approve over $2,500, add people or import, and nobody can approve their own request.
    4. Check for playwright.config.ts. If it's missing, tell me to run npm init playwright@latest myself and wait until I tell you it's done. Write e2e/access.spec.ts covering steps 2 and 3, plus a signed-out visitor. Read test account emails and passwords from environment variables I'll add to .env.local myself. Never write real credentials into the test.
    5. Run npx playwright test and show me the result.
  8. 08
    Ship it to the team
    Read TOOL-SPEC.md. Get it live for the team only. Stop after each step.
    
    1. Run every check under Done when and npx playwright test. Fix what fails.
    2. Create a GitHub repo and push. Confirm .env.local and data/ are not committed.
    3. Tell me to connect the repo to a new Vercel project in the dashboard, or run vercel link in my terminal. Wait until I tell you it's done.
    4. List the environment variables production needs (DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL set to the live URL, AI_GATEWAY_API_KEY). Tell me to add each one myself with vercel env add <NAME> --environment production, or in the dashboard. Don't print any values. Wait until I tell you it's done.
    5. Tell me to open the project's Settings, Deployment Protection, and turn on Vercel Authentication with Standard Protection, so preview deployments are only visible to our Vercel team. Production stays behind the app's own sign-in with sign-up off. Wait until I tell you it's done.
    6. Deploy, then help me check the live URL: a signed-out visitor sees only the sign-in page, and each role sees only what the Permissions table says. Give me the live URL.

The toolkit.

Everything behind the tool, one job each.

Bring your spreadsheet. Leave with an app.

Date to be announced. Dates go out in the Discord first.

Harbor at dusk · Phoenix, Arizona