You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before any Next.js work, find and read the relevant doc in `node_modules/next/dist/docs/`. Your training data is outdated — the docs are the source of truth.
-**Bengali Language Support**: Custom font loading (Kohinoor Bangla) and i18n in `src/i18n/`
337
362
-**SEO Optimization**: Dynamic sitemaps in `src/app/sitemaps/`, Open Graph tags, and schema markup
338
363
-**No test framework**: There are no automated tests — use `bun run play` for backend experimentation
339
-
-**Cloudflare Workers**: `wrangler.toml` is present; `bun run wrangler:dev` starts the worker locally
364
+
-**Cloudflare Workers**: `wrangler.toml` configures a separate cron worker (`src/workers/cron-worker.ts`). `bun run wrangler:dev` starts it locally. The worker fires on `0 2 * * *` and calls `POST /api/cron/cleanup-articles` with `x-cron-secret` header.
365
+
-**Article soft-delete**: Articles have a `delete_scheduled_at` field. Setting it schedules permanent deletion; `article-cleanup-service.ts` processes them when the cron fires. Use `restoreScheduleDeletedArticle` to cancel.
**3. Tag cache entries with `cacheTag()` and bust on mutation with `revalidateTag()`:**
371
397
@@ -394,6 +420,10 @@ export async function updateMyArticle(input) {
394
420
- Do NOT add `'use cache'` to functions that call `cookies()` or `headers()` — it will throw a build error
395
421
- Do NOT add `'use cache'` to mutation actions (`createX`, `updateX`, `deleteX`)
396
422
423
+
<!-- BEGIN:nextjs-agent-rules -->
424
+
397
425
# Next.js: ALWAYS read docs before coding
398
426
399
427
Before any Next.js work, find and read the relevant doc in `node_modules/next/dist/docs/`. Your training data is outdated — the docs are the source of truth.
0 commit comments