Operator demo

Mention Detection MVP

RepSentinel continuously indexes Twitter, Reddit, news, blogs, and search snippets. The native sources run every five minutes; Polsia search snippets run in a daily bounded batch. A downstream AI agent can persist a MentionAlert end to end through the existing /api/mvp/emit-alert route. The backend is wired (cron writes Mention rows, sentiment scores through src/lib/mentions/sentiment.ts, the alert envelope is the contract). This page is the operator-facing surface so a reviewer can walk the wire shape without dropping into prisma studio.

Five-source crawl

What RepSentinel indexes

The five-source MVP combines a five-minute native sweep with a daily Polsia search batch. Every saved result is scored through src/lib/mentions/sentiment.ts, and writes a per-row Mention.

Twitter
Social
X recent-search over each brand keyword via the Twitter search API. Tweet ids dedupe via the source-scoped externalId.
https://api.twitter.com/2/tweets/search/recent?query=<keyword>

⚙ Requires TWITTER_BEARER_TOKEN

Reddit
Discussions
Reddit public search.json across keyword matches. Cross-subreddit, scored by upvotes − downvotes at ingest time.
https://www.reddit.com/search.json?q=<keyword>&sort=new
News
News wire
NewsAPI everything-search per brand keyword. Requires NEWS_API_KEY; missing keys fail soft and stamp `errored=1` on IngestRun.
https://newsapi.org/v2/everything?q=<keyword>

⚙ Requires NEWS_API_KEY

Blogs
RSS / blogs
Aggregator RSS reader over BLOG_RSS_FEEDS. Iterates every feed and ingests any post whose body or title matches a brand keyword.
rss://<feed-host>/<feed-slug>.xml

⚙ Requires BLOG_RSS_FEEDS (comma-separated feed URLs)

Search snippets
News wire
Bounded Polsia web-search snippets checked daily, deduped by canonical URL, and retained for downstream drafting.
Polsia search({ query, count: 20 })

⚙ Daily batch; company quota is 200 searches per UTC day

Operator tip: POST /api/cron/seed-mentions stamps synthetic rows tagged mvp-emit so you can walk this page end to end without waiting on a cron tick.

Cron activity

Recent ingest ticks

Negative / neutral feed

Recent flaggable mentions

Try the wire shape

Emit a test alert

This POSTs to /api/mvp/emit-alert and echoes the envelope downstream AI agents receive. The MVP emit path bypasses plan quota and creates no AI draft — the consumer-facing /api/mentions POST still enforces the free=0/solo=100/brand=2000 caps.

Payload
Edit any field and submit. Validation flows back inline, then the JSON envelope appears on the right.
Downstream envelope
This is the JSON shape the next pipeline stage consumes. Successful emits appear below; idle state is empty.

Submit the form to see the JSON envelope echoed here.

If you’re not signed in, the call returns 401 — close that first.

Live emit envelope

Recent MVP alerts

The 25 freshest MentionAlert rows stamped under the mvp-emit tag. Same data the downstream AI drafting stage can consume next. MVP persists these alerts as ready for downstream drafting; it does not create a draft row or invoke AI during ingestion.