mirror of
https://github.com/tiennm99/store-scraper-bot.git
synced 2026-10-20 00:15:43 +00:00
Phases 1-5 of consolidate-vercel-upstash plan. Replaces Cloudflare Workers + KV with Vercel serverless functions + Upstash Redis. Inlines app-store-scraper / google-play-scraper npm libs (drops the store-scraper.vercel.app HTTP roundtrip). KEY_PREFIX (default 'store-scraper-bot:') namespaces all Redis keys so the Upstash DB can be safely shared with other Vercel projects. - vercel.json + .vercelignore + Vercel-aware package.json scripts - api/webhook.js + api/cron.js Vercel functions (with shared src/app-builder.js); cron auth fails closed when CRON_SECRET unset - src/repository/upstash.js replaces kv.js; all 4 repos take a handle bundling client + prefix - scripts/migrate-atlas-to-upstash.js writes legacy Java Atlas state directly to Upstash with --dry-run + --include-cache flags - .env.example refreshed for the new env surface Phases 6 (Vercel deploy + webhook cutover) and 7 (Docker + wrangler cleanup) remain operator-driven post-deploy.
1.7 KiB
1.7 KiB
Outstanding Work
Quick index of active direction. CF Workers path superseded — bot now targets Vercel + Upstash.
Active plan
260509-1656-consolidate-vercel-upstash — Vercel deploy, Atlas → Upstash data migration, Docker + wrangler cleanup. 7 phases, ~6h.
Superseded plans (left for history; do not execute)
- 260426-2327-cloudflare-deploy-and-smoke — CF Workers deploy. Never completed; superseded by Vercel direction.
- 260505-1425-cloudflare-kv-migration-and-deploy — CF KV migration. Superseded.
Pre-flight (operator)
Before running the active plan:
- Vercel account ready (link or create new project)
- Upstash account ready (free Redis, signup at upstash.com or via Vercel Marketplace)
- Read access to legacy Java bot's MongoDB Atlas (one-shot for Phase 5 migration)
- Java bot can be paused for ~5 min during Phase 6 cutover
Backlog (post-deploy, out of current scope)
- Tests (none exist; original Node port has none either)
- Quarterly Atlas password rotation reminder
- Observability dashboard (CF Workers + Atlas charts)
- CI workflow on push (lint + dry-run bundle size as PR check)
- Telegram bot description / about-text via
setMyDescription(post-deploy)
Reference
- miti99bot validated the same stack (CF Workers + Atlas +
nodejs_compat_v2+mongodb):/config/workspace/tiennm99/miti99bot/plans/260425-1945-mongodb-atlas-migration/ - Archived code-port plan (history of what's now done): archive/260426-2015-cloudflare-worker-code-port