Daily digest and message backup system
Go to file
2026-03-03 09:11:53 -06:00
data Daily data backup - 2026-02-21 15:04:16 CST 2026-02-21 15:04:16 -06:00
docs Add MP3 audio hosting feature with Supabase Storage integration 2026-02-25 17:12:26 -06:00
memory Signed-off-by: OpenClaw Bot <ai-agent@topdoglabs.com> 2026-03-03 09:11:53 -06:00
public Initial commit from Create Next App 2026-02-18 07:18:00 -06:00
scripts Signed-off-by: OpenClaw Bot <ai-agent@topdoglabs.com> 2026-03-03 09:11:53 -06:00
src Signed-off-by: OpenClaw Bot <ai-agent@topdoglabs.com> 2026-03-03 09:11:53 -06:00
supabase Signed-off-by: OpenClaw Bot <ai-agent@topdoglabs.com> 2026-03-03 09:11:53 -06:00
.gitignore Initial commit from Create Next App 2026-02-18 07:18:00 -06:00
docker-compose.yml Trigger rebuild for production 2026-03-01 16:03:54 -06:00
Dockerfile Signed-off-by: OpenClaw Bot <ai-agent@topdoglabs.com> 2026-02-27 16:25:03 -06:00
eslint.config.mjs Initial commit from Create Next App 2026-02-18 07:18:00 -06:00
next.config.ts Add working blog backup functionality 2026-02-18 09:32:47 -06:00
package-lock.json Signed-off-by: OpenClaw Bot <ai-agent@topdoglabs.com> 2026-02-24 16:33:29 -06:00
package.json Signed-off-by: OpenClaw Bot <ai-agent@topdoglabs.com> 2026-02-24 16:33:29 -06:00
PODCAST_ARCHITECTURE.md Add podcast feature with TTS, RSS feed, and web player 2026-02-23 20:15:27 -06:00
PODCAST_SETUP.md Add podcast feature with TTS, RSS feed, and web player 2026-02-23 20:15:27 -06:00
PODCAST_SUMMARY.md Add podcast feature with TTS, RSS feed, and web player 2026-02-23 20:15:27 -06:00
postcss.config.mjs Initial commit from Create Next App 2026-02-18 07:18:00 -06:00
README.md Signed-off-by: OpenClaw Bot <ai-agent@topdoglabs.com> 2026-03-03 09:11:53 -06:00
schema.sql Signed-off-by: OpenClaw Bot <ai-agent@topdoglabs.com> 2026-03-03 09:11:53 -06:00
tsconfig.json Add podcast feature with TTS, RSS feed, and web player 2026-02-23 20:15:27 -06:00
vercel.json Signed-off-by: OpenClaw Bot <ai-agent@topdoglabs.com> 2026-02-26 16:31:13 -06:00

Daily Digest Blog (blog-backup)

Next.js app for an article-level daily digest. The core model is:

  • One database row per article (blog_articles)
  • Multiple articles can share the same digest_date
  • RSS emits one <item> per article

Local run

npm install
npm run dev

Dev server: http://localhost:3002

Required env vars

Set in .env.local:

  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY
  • SUPABASE_SERVICE_ROLE_KEY
  • CRON_API_KEY

Database setup

Run migrations in supabase/migrations (or apply schema.sql for a fresh setup).

Main table migration:

  • supabase/migrations/20260303_create_blog_articles.sql

API surface

Primary article API

  • GET /api/articles (public)
  • POST /api/articles (auth required)
  • GET /api/articles/:id (public)
  • PATCH /api/articles/:id (auth required)
  • DELETE /api/articles/:id (auth required)

Auth for write routes:

  • Supabase bearer token, or
  • x-api-key: <CRON_API_KEY>

Digest ingestion API

  • POST /api/digest (requires x-api-key)
  • Accepts date + articles[], inserts one blog_articles row per article

RSS

  • GET /api/rss - article feed (one item per article)
  • GET /api/podcast/rss - podcast feed for rows with audio_url

Legacy compatibility

  • GET/POST/DELETE /api/messages is kept as a compatibility shim over blog_articles.

UI pages

  • / public article feed
  • /podcast audio episode list from article rows with audio
  • /admin authenticated article CRUD + audio upload
  • /login Supabase auth

CLI

Use project CLI:

./scripts/blog.sh --help

Recommended commands:

  • article-add
  • article-list
  • article-delete
  • rss

Audio

Audio files are stored in Supabase Storage bucket podcast-audio and linked via:

  • blog_articles.audio_url
  • blog_articles.audio_duration