Next.js app for Taiwanese movie ratings, theater schedules, and upcoming releases.
Live site: https://www.mvrater.com
Required: Node 22+, .env with DB_URL, OMDB_API_KEY, and SCHEDULE_TASK_API_TOKEN.
npm install
npm run dev
npm test
npm run buildDev server defaults to http://localhost:3000.
Runtime configuration is intentionally small:
DB_URL: MongoDB connection string.OMDB_API_KEY: OMDb API key for IMDb rating backfill.SCHEDULE_TASK_API_TOKEN: shared token for/api/tasks/*.
Read doc/architecture.md first. It is the compact map for data flow, caching, Cloudflare behavior, and the App Router loading pattern.
Local crawler run:
curl -X POST -H "X-Schedule-Task-Token: $SCHEDULE_TASK_API_TOKEN" http://localhost:3000/api/tasks/line
curl -X POST -H "X-Schedule-Task-Token: $SCHEDULE_TASK_API_TOKEN" http://localhost:3000/api/tasks/imdb
curl -X POST -H "X-Schedule-Task-Token: $SCHEDULE_TASK_API_TOKEN" http://localhost:3000/api/tasks/pttCloud Scheduler sends the same X-Schedule-Task-Token header. Configure production with the sensitive Terraform variable schedule_task_api_token.
Live crawler tests are opt-in:
ENABLE_LIVE_CRAWLER_TESTS=true npm testMongoDB indexes: doc/dbSetup.md.
npm run db:rename-movie-bases
npm run db:indexesCloudflare Worker source: cloudflare/vary-fix-worker.js.