tpt-strategygraph

TypeScript
0 stars0 forks0 watchers

Languages

TypeScript97.9%CSS1.6%JavaScript0.3%HTML0.2%
README

TPT StrategyGraph

An open-source enterprise knowledge and market intelligence engine. Automates the research and synthesis phase of management consulting by ingesting documents, scraping websites, extracting entities and relationships into a knowledge graph, and enabling strategic querying and brief generation via LLM.

Built by TPT Solutions · Licensed under the Apache License 2.0


Features

  • Document Ingestion — Upload PDF, DOCX, HTML, TXT, and Markdown files; automatic chunking and entity extraction
  • Web Scraping — Single-page or recursive crawls with configurable depth and cron schedules; Playwright fallback for JS-heavy sites
  • Knowledge Graph — Visualize entities (companies, people, products, markets, regulations, etc.) and their relationships via interactive Cytoscape graph
  • RAG Query — Ask strategic questions; retrieves relevant document chunks via semantic search before querying the LLM
  • Strategic Briefs — Generate Market Entry, Competitive Landscape, M&A Target Analysis, SWOT, and Industry Overview reports; export as Markdown, PDF, DOCX, or PPTX
  • Multi-LLM Support — Anthropic (Claude), OpenAI (GPT), OpenRouter, and Groq; configurable model and temperature per provider
  • Local Embeddings — Semantic search powered by all-MiniLM-L6-v2 via @xenova/transformers; no external embedding API required
  • Offline-capable — SQLite database stored locally at ~/.tpt-strategygraph/data.db

Quick Start

Requirements

  • Node.js 18+
  • npm 9+

Install & Run

npm install
npm run dev

This starts the Electron main process (TypeScript watch) and the Vite renderer dev server concurrently.

Configure an LLM Provider

Open Settings and add at least one provider:

ProviderRecommended model
Anthropicclaude-sonnet-4-20250514
OpenAIgpt-4o
OpenRouterany available model
Groqllama-3.3-70b-versatile

Set one provider as active and save.

Build & Distribute

npm run build   # compile renderer (Vite) + main process (tsc)
npm run dist    # package for Windows (NSIS), macOS (DMG), Linux (AppImage)

Distribution output is written to release/.

Architecture

src/
├── main/          # Electron main process — DB, LLM, scraping, ingestion, IPC
├── preload/       # contextBridge IPC bridge (window.electronAPI)
├── renderer/      # React 18 + Vite frontend
└── shared/        # TypeScript interfaces and IPC channel constants

All renderer↔main communication goes through typed IPC channels defined in src/shared/types.ts. See CLAUDE.md for a full architectural breakdown.

Keyboard Shortcuts

ShortcutAction
Alt+1Strategic Query
Alt+2Knowledge Graph
Alt+3Documents
Alt+4Web Scraping
Alt+5Strategic Briefs
Alt+6Settings
BToggle sidebar

Contributing

Contributions are welcome. Please open an issue before submitting a pull request for significant changes.

License

Copyright 2026 TPT Solutions

Licensed under the Apache License, Version 2.0. See LICENSE for the full text.