Phone-first business card capture for turning card photos into a searchable mini-CRM.
- Open the app on desktop or phone-size browser.
- Sign in with a one-time email link (magic link); each user has a private contact list.
- Tap Add Cards to take a photo or upload card images.
- Store uploaded images in the local Cloudflare R2 binding.
- Store contacts in the local Cloudflare D1 database.
- Review the source card beside or above editable contact fields.
- Save searchable contacts with email, phone, website, map, notes, tags, status, and next step.
- Export CSV, vCard, JSON, standalone HTML, or an iContact-ready CSV for email-marketing imports.
- Run AI extraction in mock mode locally, or switch to OpenAI with an API key.
- Abuse guards: Turnstile on sign-in, per-minute rate limits, and a 25-cards/day extraction quota per user.
npm install
npm run dev -- --host 127.0.0.1Then open:
http://127.0.0.1:5173/
Health check:
Invoke-WebRequest -UseBasicParsing http://127.0.0.1:5173/api/healthnpm run lint
npm test
npm run build
npx wrangler deploy --dry-runCopy .dev.vars.example to .dev.vars, then set:
OPENAI_API_KEY=your_key_here
OPENAI_MODEL=gpt-5-mini
AI_EXTRACTOR=openai
Restart the dev server after changing .dev.vars.
- Leave
SESSION_SECRETunset in.dev.varsto auto-sign-in as the local user (no email needed). - Set
SESSION_SECRETto any 32+ character string to exercise the real magic-link flow; with noRESEND_API_KEY, the sign-in link is printed to the dev-server console instead of emailed. TURNSTILE_SECRET_KEYunset means the Turnstile check is skipped locally.
Cloudflare can host the frontend, Worker API, database, and image storage for this version. No Supabase is needed for the first SaaS cut.
When you are ready to deploy:
npx wrangler login
npx wrangler d1 create cardcap-local
npx wrangler r2 bucket create cardcap-card-images
npx wrangler d1 migrations apply cardcap-local --remote
npx wrangler secret put OPENAI_API_KEYAfter d1 create, replace the placeholder database_id in wrangler.jsonc. For production AI extraction, change AI_EXTRACTOR from mock to openai in wrangler.jsonc, then deploy:
npm run build
npx wrangler deploy- Magic-link auth is implemented but not yet deployed: production still needs
SESSION_SECRET,RESEND_API_KEY, and Turnstile keys (see DEPLOYMENT.md). - The deployed database still holds pre-auth beta data; the deploy sequence snapshots then wipes it (fresh start).