Admin system for Tappd NFC + QR cards: turn a sold package into cards with permanent /t/<code> links, set and change where each card goes, count taps, and host Tap Pages.
Stack: Nuxt 4 · Tailwind + shadcn-vue (admin only) · Neon Postgres + Drizzle · Vercel + Vercel Blob.
design/05-website.html (marketing site at /) and design/07-tap-page-sample.html (Tap Pages) are served as-is. Never edit them. pnpm test fails if either changes, and pnpm test:e2e screenshot-compares the live pages against them.
pnpm install- In Neon, create two branches:
main(production) anddev. cp .env.example .env, then fill in the dev branch URL,NUXT_SESSION_PASSWORD(32+ random chars),BLOB_READ_WRITE_TOKENand the admin login.pnpm db:migrate, thenpnpm db:seed.pnpm dev. Open http://localhost:3000 (marketing) and http://localhost:3000/admin.
Seeded demo data: Tap Pages /cafeluna and /andrea, plus a "Demo Bistro" customer with one order per package.
pnpm test: unit and service tests (in-memory PGlite, no setup needed)pnpm test:e2e: builds the app and runs Playwright. Needs.env.test:With aDATABASE_URL=postgresql://postgres:postgres@127.0.0.1:5439/postgres NUXT_SESSION_PASSWORD=<32+ chars> ADMIN_EMAIL=e2e@tappd.ph ADMIN_PASSWORD=e2e-password-123 ALLOW_DB_RESET=1 NUXT_SESSION_COOKIE_SECURE=false127.0.0.1URL, the test run starts its own in-memory Postgres (PGlite), so nothing else is needed. To test against Neon instead, setDATABASE_URLto a Neon test branch. The e2e run wipes and reseeds whatever database it points at.
- Admin → order → Write chips.
- Check the banner: chips must only be written once it says
https://tappd.ph. A chip keeps its URL forever. - For each card: Copy, then in NFC Tools on your phone go to Write → Add a record → URL → paste → Write, tap the card, and switch Written ✓ on.
- Where a card goes can change at any time in the card editor. No rewrite needed.
- Import the repo into Vercel (it detects Nuxt).
- Storage → create a Blob store (this sets
BLOB_READ_WRITE_TOKEN). - Environment variables:
DATABASE_URL(Neon main branch),NUXT_SESSION_PASSWORD,NUXT_PUBLIC_BASE_URL=https://tappd.ph. - Run migrations and create the admin against production. Put the main-branch URL and admin login in
.env.production, then point both commands at that file (plainpnpm db:migratereads.env, which is your dev branch):In PowerShell:DOTENV_CONFIG_PATH=.env.production pnpm db:migrate pnpm db:seed --env .env.production
$env:DOTENV_CONFIG_PATH='.env.production'; pnpm db:migrate. Seed only adds demo data to an empty database. - Add the
tappd.phdomain in Vercel. Start writing customer chips only after this.