Fields & Floors Collectors
Search every numbered sports card on eBay by print run, autograph, rookie status and price, then save searches and get an email when a new card lists.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Lompoc Deals
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
A local promotions feed for Lompoc, California. Businesses post coupons, specials, and announcements; locals browse a feed, search by category, view a map, and optionally subscribe to a weekly email digest.
• Next.js 14 (App Router, TypeScript)
• Tailwind CSS + shadcn/ui components
• Postgres via Neon (@neondatabase/serverless)
• Drizzle ORM for schema and migrations
• Auth.js v5 (NextAuth) with email/password + bcrypt
• Leaflet + react-leaflet for the map (OpenStreetMap tiles, no API key)
• Resend for transactional and digest emails
• Vercel Blob for image uploads
• Hosted on Vercel檢視完整 README ↗A local promotions feed for Lompoc, California. Businesses post coupons, specials, and announcements; locals browse a feed, search by category, view a map, and optionally subscribe to a weekly email digest.
@neondatabase/serverless)git clone <your-repo-url> lompoc-deals
cd lompoc-deals
npm install
Copy .env.example to .env.local and fill in:
DATABASE_URL=postgresql://... # from Neon
AUTH_SECRET=... # openssl rand -base64 32
AUTH_URL=http://localhost:3000 # in prod: https://yourdomain.com
RESEND_API_KEY=re_... # from Resend
BLOB_READ_WRITE_TOKEN=vercel_blob_rw_... # from Vercel Blob
CRON_SECRET=... # openssl rand -base64 32
Generate the two secrets locally:
openssl rand -base64 32 # AUTH_SECRET
openssl rand -base64 32 # CRON_SECRET
npm run db:generate # generates SQL migrations from db/schema.ts
npm run db:migrate # applies migrations to DATABASE_URL
npm run db:seed # 7 categories, 5 sample businesses, 10 sample deals
npm run db:studio # browse data in a local Drizzle Studio UI
npm run dev
Visit http://localhost:3000.
After running npm run db:seed, you can sign in with:
| Role | Password | |
|---|---|---|
| Business owner | [email protected] | password123 |
app/
(public)/ ← homepage feed, biz profiles, categories, search, map, subscribe, favorites
(auth)/ ← login, signup
dashboard/ ← gated business dashboard (profile, deals CRUD, stats)
admin/ ← gated admin (approve businesses, soft-delete deals)
api/
auth/ ← NextAuth route handler
cron/digest/ ← weekly digest cron, bearer-protected
track/click/ ← click-tracking redirect
components/ ← reusable UI (DealCard, SiteHeader, etc.) + shadcn/ui primitives
db/
schema.ts ← Drizzle schema
client.ts ← Drizzle + Neon HTTP client
seed.ts ← seed script
migrations/ ← generated SQL
lib/
auth-actions.ts ← signup, login, logout
biz-actions.ts ← business dashboard server actions
admin-actions.ts ← admin server actions
favorite-actions.ts ← local user favorite toggle
subscribe-actions.ts ← email digest subscribe / confirm / unsubscribe
queries.ts ← read-side query helpers
viewer.ts ← unified session/role/favorites lookup
email.ts ← Resend wrappers
blob.ts ← Vercel Blob upload helper
geocode.ts ← Nominatim address → lat/lng
tracking.ts ← view + click counters
auth.ts ← Auth.js v5 config
middleware.ts ← gates /dashboard/* and /admin/*
docs/
build-plan.md ← original spec
Push to GitHub:
gh repo create lompoc-deals --private --source=. --push
Import to Vercel: https://vercel.com/new → pick the repo → Deploy
Add environment variables in Vercel → Project → Settings → Environment Variables. Same six vars as .env.local. Set AUTH_URL to your production URL (e.g. https://www.lompoclocals.com).
Run migrations against the production DB before first deploy:
DATABASE_URL=<prod-url> npm run db:migrate
DATABASE_URL=<prod-url> npm run db:seed # only if you want sample data in prod
Cron job: vercel.json declares a weekly cron at Saturday 9am UTC hitting /api/cron/digest. Vercel registers it on first deploy. Verify at Vercel → Project → Settings → Cron Jobs.
Custom domain: Vercel → Domains → add your domain. In your DNS provider, add the A record (@ → 76.76.21.21) and CNAME (www → cname.vercel-dns.com) Vercel shows you. Wait a few minutes for SSL.
After domain is live: update AUTH_URL env var in Vercel to https://yourdomain.com and redeploy.
The /api/cron/digest route is protected by an Authorization: Bearer <CRON_SECRET> header. Vercel automatically sends this header with the value of your CRON_SECRET env var when its scheduler hits the route. Without the bearer header, the route returns 401.
To trigger the cron manually for testing:
CRON=$(grep '^CRON_SECRET=' .env.local | cut -d= -f2-)
curl -H "Authorization: Bearer $CRON" http://localhost:3000/api/cron/digest
| Script | Purpose |
|---|---|
npm run dev | Start dev server on port 3000 |
npm run build | Production build |
npm run start | Start production build |
npm run lint | ESLint |
npm run db:generate | Generate SQL migrations from db/schema.ts |
npm run db:migrate | Apply migrations to DATABASE_URL |
npm run db:push | Push schema directly (interactive) |
npm run db:studio | Open Drizzle Studio |
npm run db:seed | Run the seed script |
Private project. All rights reserved.