Skip to content

findgriff/research-intelligence

Repository files navigation

Research Intelligence

AI-powered social media monitoring, narrative detection, and research synthesis — built for academics.

License: MIT Platform: macOS Electron React TypeScript Local-first


Monitor public discourse on Facebook, Instagram and LinkedIn. Detect emerging narratives with TF-IDF clustering and momentum tracking. Turn the evidence into structured research briefs, literature reviews and policy memos — where every claim links back to a verifiable source post.

Screenshots coming — run npm run dev and load the built-in sample dataset from the Dashboard to explore every feature in under a minute.

Features

📡 Monitoring Saved keyword projects across Facebook Pages, Instagram Business accounts and LinkedIn organisations (official APIs only), with hourly/daily/weekly scheduled scans
🧭 Narrative detection TF-IDF + cosine-similarity theme clustering, week-over-week momentum, cross-platform spread, and the accounts driving each narrative
🔔 Alerts Volume-threshold spike detection ("mentions doubled in 24h") and accelerating-narrative alerts
📈 Dashboard Collection volume, platform mix, sentiment split, trending keywords, 12-week activity calendar
✍️ Research generation Briefs, literature reviews, trend reports, policy memos, grant landscape reviews and lecture notes in academic / journalistic / policy / public tones
📚 Honest citations Inline [n] markers; the References section is always built from stored post metadata — the model cannot invent a source
🧑‍🏫 Peer-review assistant Paste or edit a draft, get the most similar posts from your corpus as candidate sources
🗂 Content library Full-text search, filters, JSON/CSV import & export, per-post field notes
🔖 Reference managers One-click BibTeX (Zotero, Mendeley) and RIS (EndNote) export; APA 7 / MLA 9 / Chicago 17 / Harvard formatting
🕵️ Anonymisation Ethics-board mode replaces authors with participant codes and withholds URLs in generated documents
📤 Export Markdown, PDF (native print pipeline), DOCX, LaTeX
🤖 AI, optional Ollama (fully local), Anthropic Claude, or OpenAI — or no AI at all: the deterministic draft engine structures your evidence without an LLM

Quick start

git clone https://github.com/findgriff/research-intelligence.git
cd research-intelligence
npm install          # also rebuilds better-sqlite3 for Electron
npm run dev          # launch in development

First run: open the Dashboard → Load sample dataset. It inserts ~370 clearly-labelled fictional posts so you can try clustering, alerts, trend charts and article generation immediately — no API keys needed.

Build a distributable:

npm run build        # typecheck + bundle + .dmg in dist/

Architecture

┌────────────────────────────  Electron  ────────────────────────────┐
│                                                                    │
│  Main process (Node)                Renderer (Chromium, sandboxed) │
│  ┌──────────────────────┐           ┌──────────────────────────┐   │
│  │ SQLite (better-sqlite3)◄──IPC────► React 18 + Zustand       │   │
│  │ Analysis engine      │  typed    │ Tailwind UI (dark, glass)│   │
│  │  · TF-IDF clustering │  bridge   │ Recharts visualisations  │   │
│  │  · sentiment lexicon │ (preload) │ Markdown editor/preview  │   │
│  │  · spike detection   │           └──────────────────────────┘   │
│  │ Connectors (Graph,   │                                          │
│  │  LinkedIn REST)      │      AI providers (optional)             │
│  │ Scheduler (60s tick) │      · Ollama (local)                    │
│  │ safeStorage secrets  │      · Anthropic Claude                  │
│  │ PDF print pipeline   │      · OpenAI                            │
│  └──────────────────────┘                                          │
└────────────────────────────────────────────────────────────────────┘
  • src/main — window lifecycle, SQLite persistence, analysis services, connectors, IPC
  • src/preload — sandboxed contextBridge exposing a fully-typed window.api
  • src/renderer — the React app (Dashboard, Monitor, Narratives, Research, Library, Settings)
  • src/shared — types + citation formatters used on both sides of the bridge

Built for researchers — the honest-AI philosophy

This tool facilitates research; it does not fabricate it.

  1. Every citation is real. Reference lists are generated from stored post metadata (author, date, URL, platform) — never by the language model. The model is instructed to cite only the numbered sources you selected, and any references section it writes anyway is stripped and replaced.
  2. Verify before you publish. Generated drafts are starting points. Each inline [n] marker links to a source you can open and check. The "suggest sources" assistant surfaces evidence — judging it is your job.
  3. Disclose AI assistance. Most institutions, journals and funders now have AI-use policies. If an LLM helped draft your text, follow your institution's disclosure requirements. The no-AI structured-draft mode exists precisely so the synthesis and prose can be entirely yours.
  4. Respect platform terms and research ethics. Collection uses official APIs with your own credentials — no scraping. Anonymisation mode supports IRB/ethics-board requirements for de-identified social media data.

Privacy-first

  • All data lives in a local SQLite database under ~/Library/Application Support/
  • No accounts, no telemetry, no cloud sync
  • API keys are encrypted at rest via Electron safeStorage (macOS Keychain)
  • Anonymisation mode for ethics-compliant exports

Platform connector notes

Platform Access path Notes
Facebook Meta Graph API (Pages) Public Page posts readable with a Graph token
Instagram Meta Graph API (Business/Creator accounts) The Basic Display API was retired in Dec 2024; Business accounts linked to your Meta app are supported
LinkedIn Community Management API Requires an approved LinkedIn developer app
Anything else Library → Import JSON/CSV import keeps provenance explicit for exports from CrowdTangle-style tools, colleagues' datasets, etc.

Code signing & auto-update (optional)

Local builds are unsigned (identity: null in electron-builder.yml). To distribute outside your own machine:

  1. Remove identity: null and provide CSC_LINK / CSC_KEY_PASSWORD (Developer ID certificate)
  2. Add notarisation credentials (APPLE_ID, APPLE_APP_SPECIFIC_PASSWORD, APPLE_TEAM_ID)
  3. For auto-updates, add electron-updater and a publish target

Roadmap

  • PDF import + annotation linked to monitored content
  • Project sharing / sync for research assistants
  • Direct Zotero connector (live library push, not just BibTeX files)
  • Embedding-based clustering as an alternative to TF-IDF
  • Windows/Linux builds (nothing is macOS-locked except packaging config)

Contributing

PRs welcome. Keep it aligned with the project's principles:

  1. No scraping connectors — official APIs or explicit manual import only
  2. No unattributed generation — anything the AI writes must trace to stored sources
  3. Local-first — no feature may require a remote service to function
  4. npm run typecheck must pass; keep the two-process boundary typed via src/shared

License

MIT © 2026 Research Intelligence contributors

About

AI-powered social media monitoring, narrative detection, and citation-backed research synthesis for academics — local-first macOS app (Electron + React + TypeScript)

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages